summaryrefslogtreecommitdiff
path: root/cross
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-01-16 23:25:08 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-01-16 23:25:08 -0300
commit8b17c0c06c905cf95978e79c8077ac76304a37fd (patch)
treee82b47f7e4ba1b3b03b924207b93b319fe19df2b /cross
parent1688695d0e71e57427d1b681340b7f3c47fcd5f2 (diff)
Got glibc-headers
Diffstat (limited to 'cross')
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD12
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD19
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD168
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch20
-rw-r--r--cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD (renamed from cross/mips-linux-api-headers/PKGBUILD)17
5 files changed, 146 insertions, 90 deletions
diff --git a/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD
index 82260cc58..d4d3afe38 100644
--- a/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD
+++ b/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD
@@ -2,14 +2,13 @@
_pkgname=binutils
_target="mips64el-unknown-linux-gnu"
-# We don't add the target because it duplicates it /usr/lib/$target/$target
-_sysroot="/usr/lib"
+_sysroot="/usr/${_target}"
unset CFLAGS CXXFLAGS LDFLAGS
pkgname=cross-${_target}-binutils
pkgver=2.22
-pkgrel=7
+pkgrel=11
pkgdesc="A set of programs to assemble and manipulate binary and object files for the MIPS architecture"
url="http://www.gnu.org/software/binutils/"
arch=('i686' 'x86_64')
@@ -26,13 +25,13 @@ build() {
./configure --build=${CHOST} \
--host=${CHOST} \
--target=${_target} \
- --prefix=${_sysroot} \
+ --prefix=/usr \
--disable-nls \
--disable-multilib \
--disable-werror \
--enable-ld=yes \
--enable-gold=no \
- --with-sysroot=${_sysroot}/${_target}
+ --with-sysroot=${_sysroot}
make
}
@@ -42,6 +41,5 @@ package() {
make DESTDIR=${pkgdir} install
- mv ${pkgdir}/usr/lib/lib/libiberty.a ${pkgdir}${_sysroot}/${_target}/lib/
- rm -r ${pkgdir}/usr/lib/lib ${pkgdir}/usr/lib/share
+ rm -r ${pkgdir}/usr/{lib,share}
}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD
index 2a9f13e25..da49a903f 100644
--- a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD
+++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD
@@ -4,26 +4,24 @@
# Change the following variables to match your target
_pkgname=gcc
_target="mips64el-unknown-linux-gnu"
-_sysroot="/usr/lib"
+_sysroot="/usr/${_target}"
_ARCH=mips
unset LDFLAGS CFLAGS CXXFLAGS
pkgname=cross-${_target}-gcc-core
pkgver=4.6.2
-pkgrel=5
+pkgrel=8
pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (static version)"
url="http://www.gnu.org/software/binutils/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl')
options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
-source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-core-${pkgver}.tar.bz2")
-md5sums=('780f614ab18c7a9066dec6387d7490b2')
+source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-${pkgver}.tar.bz2")
+md5sums=('028115c4fbfb6cfd75d6369f4a90d87e')
build() {
- export PATH=${_sysroot}/bin:$PATH
-
cd ${srcdir}
mkdir gcc-build && cd gcc-build
@@ -35,7 +33,6 @@ build() {
--host=${CHOST} \
--target=${_target} \
--prefix=/usr \
- --libexecdir=/usr/lib \
--with-local-prefix=${_sysroot} \
--disable-multilib \
--disable-libmudflap \
@@ -45,7 +42,6 @@ build() {
--disable-shared \
--with-arch=loongson2f \
--with-abi=n32 \
- --with-tune=loongson2f \
--enable-__cxa_atexit \
--with-gmp \
--with-mpfr \
@@ -58,14 +54,15 @@ build() {
--disable-libgomp \
--disable-libmudflap \
--disable-nls \
- --enable-languages=c
+ --enable-languages=c \
+ --with-libs \
+ --with-headers
make ${MAKEFLAGS} all-gcc
}
package() {
- #cd ${srcdir}/${_pkgname}-build
- cd ${srcdir}
+ cd ${srcdir}/${_pkgname}-build
make ${MAKEFLAGS} DESTDIR=${pkgdir} install-gcc
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD
index 26026c6b0..ea816086f 100644
--- a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD
@@ -6,27 +6,28 @@
_pkgname=glibc
_target="mips64el-unknown-linux-gnu"
-_sysroot="/usr/lib/${_target}"
+_sysroot="/usr/${_target}"
_ARCH=mips
unset CFLAGS CXXFLAGS LDFLAGS
pkgname=cross-${_target}-glibc-headers
pkgver=2.15
-pkgrel=3
+pkgrel=4
_glibcdate=20111227
pkgdesc="GNU C Library"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/libc"
license=('GPL' 'LGPL')
groups=("${_target}-devel")
-depends=("${_ARCH}-linux-api-headers>=3.1.6" 'tzdata')
+depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata')
makedepends=("cross-${_target}-binutils"
"cross-${_target}-gcc-core")
options=('!strip')
install=glibc.install
source=(ftp://ftp.archlinux.org/other/glibc/${_pkgname}-${pkgver}_${_glibcdate}.tar.xz
http://repo.parabolagnulinux.org/other/glibc-ports-${pkgver}_${_glibcdate}.tar.xz
+ configure.patch
glibc-2.10-dont-build-timezone.patch
glibc-2.10-bz4781.patch
glibc-__i686.patch
@@ -69,7 +70,7 @@ mksource() {
}
mksource-ports() {
- git clone http://sourceware.org/git/glibc-ports.git
+ tsocks git clone git://sourceware.org/git/glibc-ports.git
pushd glibc-ports
git checkout -b glibc-${pkgver}-arch origin/release/${pkgver}/master
popd
@@ -79,48 +80,52 @@ mksource-ports() {
build() {
cd ${srcdir}/glibc
- # timezone data is in separate package (tzdata)
- patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
+ # export PATH=${_sysroot}/bin/:$PATH
- # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
- patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch
+ # timezone data is in separate package (tzdata)
+ patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
- # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
- # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
- patch -Np1 -i ${srcdir}/glibc-__i686.patch
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
+ patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch
- # http://www.exploit-db.com/exploits/15274/
- # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...)
- patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
+ # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
+ patch -Np1 -i ${srcdir}/glibc-__i686.patch
- # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...)
- # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
- patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
+ # http://www.exploit-db.com/exploits/15274/
+ # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
- # Revert commit causing issues with crappy DNS servers...
- # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER!
- # Note that both these patches appear not to fix the issue completely:
- # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
- # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...)
- patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...)
+ # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
+ patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
- # re-export RPC interface until libtirpc is ready as a replacement
- # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
- patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
- # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
- patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
+ # Revert commit causing issues with crappy DNS servers...
+ # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER!
+ # Note that both these patches appear not to fix the issue completely:
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch
- # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
- # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...)
- patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
+ # re-export RPC interface until libtirpc is ready as a replacement
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
- # revert commit c5a0802a - causes various hangs
- # https://bugzilla.redhat.com/show_bug.cgi?id=769421
- patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+ # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
- # revert optimized math routines that can cause crashes (FS#27736, FS#27743)
- # obviously not a real fix...
- patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch
+ # revert commit c5a0802a - causes various hangs
+ # https://bugzilla.redhat.com/show_bug.cgi?id=769421
+ patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
+ # revert optimized math routines that can cause crashes (FS#27736, FS#27743)
+ # obviously not a real fix...
+ patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch
+
+ patch -Np0 -i ${srcdir}/configure.patch
ln -s ../glibc-ports ports
@@ -128,32 +133,73 @@ build() {
mkdir glibc-build
cd glibc-build
- echo "slibdir=${_sysroot}/lib" >> configparms
-
-# From crosstool-ng:
-# glibc's prefix must be exactly /usr, else --with-sysroot'd gcc will get
-# confused when $sysroot/usr/include is not present.
-# Note: --prefix=/usr is magic!
-# See http://www.gnu.org/software/libc/FAQ.html#s-2.2
- export PATH=${_sysroot}/bin:$PATH
-
- BUILD_CC="${CHOST}-gcc" \
- CC="${_target}-gcc -O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop" \
- AR="${_target}-ar" \
- RANLIB="${_target}-ranlib" \
- ${srcdir}/glibc/configure \
- --prefix=/usr \
- --build=$CHOST --host=$_target \
- --with-headers=/usr/lib/${_ARCH}/include \
- --libdir=${_sysroot}/usr/lib --libexecdir=${_sysroot}/usr/lib \
- --enable-add-ons=nptl,libidn,ports \
- --enable-kernel=2.6.27 \
- --with-tls --with-__thread \
- --without-gd \
- --without-cvs --disable-profile
+ echo "libc_cv_ctors_header=no" >> config.cache
+ echo "libc_cv_forced_unwind=yes" >> config.cache
+ echo "libc_cv_c_cleanup=yes" >> config.cache
+
+ BUILD_CC=${CHOST}-gcc \
+ CFLAGS=" -EL -march=loongson2f -mabi=n32 -O2 -U_FORTIFY_SOURCE " \
+ CC=${_target}-gcc \
+ AR=${_target}-ar \
+ RANLIB=${_target}-ranlib \
+ ${srcdir}/glibc/configure \
+ --prefix=/usr \
+ --build=${CHOST} \
+ --host=${_target} \
+ --without-cvs \
+ --disable-profile \
+ --without-gd \
+ --with-headers=/usr/${_target}/usr/include \
+ --cache-file=${srcdir}/glibc-build/config.cache \
+ --disable-debug \
+ --disable-sanity-checks \
+ --enable-kernel=2.6.27 \
+ --with-__thread \
+ --with-tls \
+ --enable-shared \
+ --with-fp \
+ --enable-add-ons=nptl,ports
+
}
package() {
cd ${srcdir}/glibc-build
- make install_root=${pkgdir} install-bootstrap-headers=yes install-headers
+ headers_dir=${pkgdir}${_sysroot}/usr/include
+
+ make ${MAKEFLAGS} install_root=${pkgdir}${_sysroot} all-bootstrap-headers=yes install-headers
+
+ msg "Installing some headers manually"
+ mkdir -p "${headers_dir}/gnu"
+ touch "${headers_dir}/gnu/stubs.h"
+ cp -v "${srcdir}/glibc/include/features.h" "${headers_dir}/features.h"
+ cp -v bits/stdio_lim.h "${headers_dir}/bits/stdio_lim.h"
+
+ mkdir -p ${pkgdir}${_sysroot}/usr/lib
+
+ make csu/subdir_lib
+ cp csu/crt1.o csu/crti.o csu/crtn.o ${pkgdir}${_sysroot}/usr/lib
+
+ ${_target}-gcc -nostdlib \
+ -nostartfiles \
+ -shared \
+ -x c /dev/null \
+ -o ${pkgdir}${_sysroot}/usr/lib/libc.so
+
}
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ '98d028ee63fca2821414ebcac0af0e5b'
+ '39f80ba6bcda6b010a66f9c61e9a0017'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '6970bcfeb3bf88913436d5112d16f588'
+ '7da8c554a3b591c7401d7023b1928afc'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'dc7550e659ddd685bd78a930d15a01f2'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch
new file mode 100644
index 000000000..5393ae5cd
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch
@@ -0,0 +1,20 @@
+--- configure 2011-12-18 02:53:21.000000000 -0300
++++ configure 2012-01-14 15:20:13.737901264 -0300
+@@ -7210,13 +6940,14 @@
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5
+ $as_echo "$libc_cv_gcc_builtin_expect" >&6; }
+-if test "$libc_cv_gcc_builtin_expect" = no; then
+- as_fn_error $? "support for __builtin_expect needed" "$LINENO" 5
++if test "$libc_cv_gcc_builtin_expect" = yes; then
++ $as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
++
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5
+ $as_echo_n "checking for __builtin_memset... " >&6; }
+-if ${libc_cv_gcc_builtin_memset+:} false; then :
++if ${libc_cv_gcc_builtin_memset+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat > conftest.c <<\EOF
diff --git a/cross/mips-linux-api-headers/PKGBUILD b/cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD
index bff8c272b..277890098 100644
--- a/cross/mips-linux-api-headers/PKGBUILD
+++ b/cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD
@@ -3,9 +3,10 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
export ARCH=mips
-_sysroot="/usr/lib/${ARCH}"
+_target=mips64el-unknown-linux-gnu
+_sysroot="/usr/${_target}"
-pkgname=mips-linux-api-headers
+pkgname=${_target}-linux-api-headers
pkgver=3.1.6
_basekernel=3.1
pkgrel=2
@@ -15,6 +16,8 @@ url="http://www.gnu.org/software/libc"
license=('GPL2')
source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz"
"http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz")
+md5sums=('d73df15ab1d36fe3c102755d8f42117f'
+ 'cb42276bca126c676c51d02d74bf7fe7')
build() {
cd "${srcdir}/linux-${_basekernel}"
@@ -29,13 +32,5 @@ build() {
package() {
cd "${srcdir}/linux-${_basekernel}"
- make INSTALL_HDR_PATH=${pkgdir}${_sysroot} headers_install
-
- # use headers from libdrm
- rm -rf ${pkgdir}${_sysroot}/include/drm
-
- # clean-up unnecessary files generated during install
- find ${pkgdir} -name .install -or -name ..install.cmd | xargs rm -f
+ make ARCH=${ARCH} INSTALL_HDR_PATH=${pkgdir}${_sysroot}/usr headers_install
}
-md5sums=('d73df15ab1d36fe3c102755d8f42117f'
- 'cb42276bca126c676c51d02d74bf7fe7')