summaryrefslogtreecommitdiff
path: root/staging
diff options
context:
space:
mode:
Diffstat (limited to 'staging')
-rw-r--r--staging/binutils/PKGBUILD95
-rw-r--r--staging/binutils/binutils.install17
-rw-r--r--staging/gcc/PKGBUILD21
-rw-r--r--staging/gcc/gcc-4.7.1-libgo-mksysinfo.patch15
4 files changed, 138 insertions, 10 deletions
diff --git a/staging/binutils/PKGBUILD b/staging/binutils/PKGBUILD
new file mode 100644
index 000000000..067cf289f
--- /dev/null
+++ b/staging/binutils/PKGBUILD
@@ -0,0 +1,95 @@
+# $Id: PKGBUILD 162862 2012-07-02 13:30:53Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+
+pkgname=binutils
+pkgver=2.22
+pkgrel=8
+_date=20120323
+pkgdesc="A set of programs to assemble and manipulate binary and object files"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/binutils/"
+license=('GPL')
+groups=('base-devel')
+depends=('glibc>=2.16' 'zlib')
+checkdepends=('dejagnu')
+options=('!libtool' '!distcc' '!ccache')
+install=binutils.install
+source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2)
+md5sums=('de2ac4298732827f8af706fc24020330')
+
+mksource() {
+ mkdir ${pkgname}-${_date}
+ cd ${pkgname}-${_date}
+ export _TAG=binutils-2_22-branch
+ export 'CVSROOT=:pserver:anoncvs@sourceware.org:/cvs/src'
+ cvs -z9 co -r $_TAG binutils || return 1
+ mv src binutils
+ tar -cvjf ../binutils-${pkgver}_${_date}.tar.bz2 binutils/*
+}
+
+build() {
+ cd ${srcdir}
+ mkdir binutils-build && cd binutils-build
+
+ [[ $CARCH == "x86_64" ]] && CONFIGFLAG="--enable-64-bit-bfd --disable-multilib"
+
+ ${srcdir}/binutils/configure --prefix=/usr \
+ --enable-ld=default --enable-gold \
+ --enable-plugins --enable-threads \
+ --enable-shared $CONFIGFLAG
+
+ # check the host environment and makes sure all the necessary tools are available
+ make configure-host
+
+ make tooldir=${pkgdir}/usr
+
+ # Rebuild libiberty.a with -fPIC
+ cp -a libiberty libiberty-pic
+ make -C libiberty-pic clean
+ make CFLAGS="$CFLAGS -fPIC" -C libiberty-pic
+
+ # Rebuild libbfd.a with -fPIC
+ # hidden visability prevent 3rd party shared libraries exporting bfd non-stable API
+ cp -a bfd bfd-pic
+ make -C bfd-pic clean
+ make CFLAGS="$CFLAGS -fPIC -fvisibility=hidden" -C bfd-pic
+
+ # Rebuild libopcodes.a with -fPIC
+ cp -a opcodes opcodes-pic
+ make -C opcodes-pic clean
+ make CFLAGS="$CFLAGS -fPIC" -C opcodes-pic
+}
+
+check() {
+ cd ${srcdir}/binutils-build
+
+ # do not abort on errors - manually check log files
+ # gold testsuite does not build with _FORTIFY_SOURCE (due to -O0 -Werror)
+ make CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}" \
+ CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}" -k check || true
+}
+
+package() {
+ cd ${srcdir}/binutils-build
+ make prefix=${pkgdir}/usr tooldir=${pkgdir}/usr install
+
+ # Add some useful headers
+ install -m644 ${srcdir}/binutils/include/libiberty.h ${pkgdir}/usr/include
+ install -m644 ${srcdir}/binutils/include/demangle.h ${pkgdir}/usr/include
+
+ # install libraries rebuilt with -fPIC
+ install -m644 libiberty-pic/libiberty.a ${pkgdir}/usr/lib
+ install -m644 bfd-pic/libbfd.a ${pkgdir}/usr/lib
+ install -m644 opcodes/libopcodes.a ${pkgdir}/usr/lib
+
+ # Remove Windows/Novell specific man pages
+ rm -f ${pkgdir}/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
+
+ # Remove these symlinks, they are not ABI stable.
+ # Programs should compile static to the .a file.
+ rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
+ echo "INPUT ( /usr/lib/libbfd.a -liberty -lz )" >${pkgdir}/usr/lib/libbfd.so
+ echo "INPUT ( /usr/lib/libopcodes.a -lbfd )" >${pkgdir}/usr/lib/libopcodes.so
+}
diff --git a/staging/binutils/binutils.install b/staging/binutils/binutils.install
new file mode 100644
index 000000000..8bf9f3a47
--- /dev/null
+++ b/staging/binutils/binutils.install
@@ -0,0 +1,17 @@
+infodir=usr/share/info
+filelist=(as.info bfd.info binutils.info configure.info gprof.info ld.info standards.info)
+
+post_upgrade() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
diff --git a/staging/gcc/PKGBUILD b/staging/gcc/PKGBUILD
index 7bbb7f7c0..4c3dfc6f4 100644
--- a/staging/gcc/PKGBUILD
+++ b/staging/gcc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 162787 2012-06-30 13:53:51Z allan $
+# $Id: PKGBUILD 162860 2012-07-02 13:12:42Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
@@ -6,7 +6,7 @@
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
pkgver=4.7.1
-pkgrel=2
+pkgrel=4
#_snapshot=4.7-20120505
_libstdcppmanver=20120605 # Note: check source directory name when updating this
pkgdesc="The GNU Compiler Collection"
@@ -20,15 +20,15 @@ source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
#ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
gcc_pure64.patch
- gcc-4.7.0-cloog-0.17.patch
gcc-4.7.1-libada-pic.patch
- gcc-4.7.1-libgo-write.patch)
+ gcc-4.7.1-libgo-write.patch
+ gcc-4.7.1-libgo-mksysinfo.patch)
md5sums=('933e6f15f51c031060af64a9e14149ff'
'767c62f9a047c4434f2345decf1d0819'
'ced48436c1b3c981d721a829f1094de1'
- '575f7d17b022e609447a590e481b18b5'
'2acbc9d35cc9d72329dc71d6b1f162ef'
- 'df82dd175ac566c8a6d46b11ac21f14c')
+ 'df82dd175ac566c8a6d46b11ac21f14c'
+ '8e847244dba042d0aa3297713edaf70c')
if [ -n "${_snapshot}" ]; then
@@ -50,15 +50,15 @@ build() {
patch -p1 -i ${srcdir}/gcc_pure64.patch
fi
- # compatibility with latest cloog
- patch -p1 -i ${srcdir}/gcc-4.7.0-cloog-0.17.patch
-
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53679
patch -p1 -i ${srcdir}/gcc-4.7.1-libgo-write.patch
# bug to file...
patch -p1 -i ${srcdir}/gcc-4.7.1-libada-pic.patch
+ # http://gcc.gnu.org/ml/gcc-patches/2012-06/msg01946.html
+ patch -p0 -i ${srcdir}/gcc-4.7.1-libgo-mksysinfo.patch
+
echo ${pkgver} > gcc/BASE-VER
cd ${srcdir}
@@ -75,6 +75,7 @@ build() {
--disable-libstdcxx-pch --enable-libstdcxx-time \
--enable-gnu-unique-object --enable-linker-build-id \
--with-ppl --enable-cloog-backend=isl \
+ --disable-ppl-version-check --disable-cloog-version-check \
--enable-lto --enable-gold --enable-ld=default \
--enable-plugin --with-plugin-ld=ld.gold \
--with-linker-hash-style=gnu \
@@ -100,7 +101,7 @@ package_gcc-libs()
{
pkgdesc="Runtime libraries shipped by GCC"
groups=('base')
- depends=('glibc>=2.15')
+ depends=('glibc>=2.16')
install=gcc-libs.install
cd gcc-build
diff --git a/staging/gcc/gcc-4.7.1-libgo-mksysinfo.patch b/staging/gcc/gcc-4.7.1-libgo-mksysinfo.patch
new file mode 100644
index 000000000..427efe8a6
--- /dev/null
+++ b/staging/gcc/gcc-4.7.1-libgo-mksysinfo.patch
@@ -0,0 +1,15 @@
+--- libgo/mksysinfo.sh 2012-06-29 14:23:30.684708901 +0200
++++ libgo/mksysinfo.sh 2012-06-29 14:23:20.782761973 +0200
+@@ -522,10 +522,10 @@ grep '^const _DT_' gen-sysinfo.go |
+ # The rusage struct.
+ rusage=`grep '^type _rusage struct' gen-sysinfo.go`
+ if test "$rusage" != ""; then
+- rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
+- rusage=`echo $rusage | sed -e 's/^ *//'`
+ # Remove anonymous unions from GNU/Linux <bits/resource.h>.
+ rusage=`echo $rusage | sed -e 's/Godump_[0-9]* struct {\([^}]*\)};/\1/g'`
++ rusage=`echo $rusage | sed -e 's/type _rusage struct //' -e 's/[{}]//g'`
++ rusage=`echo $rusage | sed -e 's/^ *//'`
+ nrusage=
+ while test -n "$rusage"; do
+ field=`echo $rusage | sed -e 's/^\([^;]*\);.*$/\1/'`