summaryrefslogtreecommitdiff
path: root/core/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'core/gcc')
-rw-r--r--core/gcc/PKGBUILD73
-rw-r--r--core/gcc/gcc-libs.install4
-rw-r--r--core/gcc/gcc_mips64el_lib.patch25
3 files changed, 73 insertions, 29 deletions
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index 2a0bdbb2f..32a53b565 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -4,26 +4,36 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
-pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
+if [[ "${CARCH}" != "mips64el" ]]; then
+ pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
+else
+ pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc')
+fi
pkgver=4.6.2
pkgrel=6
_snapshot=4.6-20120120
_libstdcppmanver=20111215 # Note: check source directory name when updating this
pkgdesc="The GNU Compiler Collection"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://gcc.gnu.org"
-makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada')
+if [[ "${CARCH}" != "mips64el" ]]; then
+ makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada')
+else
+ makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl')
+fi
checkdepends=('dejagnu')
options=('!libtool' '!emptydirs')
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++-man.${_libstdcppmanver}.tar.bz2
gcc_pure64.patch
+ gcc_mips64el_lib.patch
gcc-hash-style-both.patch)
md5sums=('f7ca5d9f7a07216577f81318b7cf56ef'
'450772ce32daed97d7383199f8797f33'
'4030ee1c08dd1e843c0225b772360e76'
+ '67e337993d821d72fccacbed52d48c34'
'4df25b623799b148a0703eaeec8fdf3f')
if [ -n "${_snapshot}" ]; then
@@ -43,6 +53,8 @@ build() {
if [ "${CARCH}" = "x86_64" ]; then
patch -Np1 -i ${srcdir}/gcc_pure64.patch
+ elif [ "${CARCH}" = "mips64el" ]; then
+ patch -Np0 -i ${srcdir}/gcc_mips64el_lib.patch
fi
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
@@ -51,11 +63,18 @@ build() {
cd ${srcdir}
mkdir gcc-build && cd gcc-build
+
+ if [[ "${CARCH}" != "mips64el" ]]; then
+ languages=c,c++,ada,fortran,go,lto,objc,obj-c++
+ else
+ languages=c,c++,fortran,lto,objc,obj-c++
+ fi
+
${_basedir}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info \
- --with-bugurl=https://bugs.archlinux.org/ \
- --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
+ --with-bugurl=https://bugs.parabolagnulinux.org/ \
+ --enable-languages=$languages \
--enable-shared --enable-threads=posix \
--with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
@@ -96,16 +115,16 @@ package_gcc-libs()
make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
- make -j1 DESTDIR=${pkgdir} install-target-libquadmath
+ make -j1 DESTDIR=${pkgdir} install-target-libquadmath
make -j1 DESTDIR=${pkgdir} install-target-libgfortran
make -j1 DESTDIR=${pkgdir} install-target-libobjc
# remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc}
- rm -rf ${pkgdir}/usr/lib/{gcc/,libgfortran.spec}
+ rm -rf ${pkgdir}/usr/lib{,32}/{gcc/,libgfortran.spec}
# remove static libraries
find ${pkgdir} -name *.a -delete
-
+
# Install Runtime Library Exception
install -Dm644 ${_basedir}/COPYING.RUNTIME \
${pkgdir}/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION
@@ -119,21 +138,21 @@ package_gcc()
install=gcc.install
cd gcc-build
-
+
# unfortunately it is much, much easier to install the lot and clean-up the mess...
make -j1 DESTDIR=${pkgdir} install
- rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
- rm $pkgdir/usr/lib/*.so*
- rm $pkgdir/usr/lib/lib{ffi,gfortran,go{,begin},objc,quadmath}.a
- rm $pkgdir/usr/lib/libgfortran.spec
- rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,libgfortranbegin.a}
- rm -r $pkgdir/usr/lib/go
- rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath}.info
- rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
- rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
- rm $pkgdir/usr/share/man/man3/ffi*
+ rm -f $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
+ rm -f $pkgdir/usr/lib{,32}/*.so*
+ rm -f $pkgdir/usr/lib{,32}/lib{ffi,gfortran,go{,begin},objc,quadmath}.a
+ rm -f $pkgdir/usr/lib{,32}/libgfortran.spec
+ rm -rf $pkgdir/usr/lib{,32}/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}
+ rm -f $pkgdir/usr/lib{,32}/gcc/$CHOST/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h}
+ rm -f $pkgdir/usr/lib{,32}/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,libgfortranbegin.a}
+ rm -rf $pkgdir/usr/lib{,32}/go
+ rm -f $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath}.info
+ rm -f $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
+ rm -f $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
+ rm -f $pkgdir/usr/share/man/man3/ffi*
# many packages require these symlinks
install -dm755 ${pkgdir}/lib
@@ -200,11 +219,11 @@ package_gcc-fortran()
make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
-
+
# remove libraries included in gcc-libs
- rm ${pkgdir}/usr/lib/lib{gfortran,quadmath}.so*
- rm ${pkgdir}/usr/share/info/libquadmath.info
-
+ rm -f ${pkgdir}/usr/lib{,32}/lib{gfortran,quadmath}.so*
+ rm -f ${pkgdir}/usr/share/info/libquadmath.info
+
# Install Runtime Library Exception
install -Dm644 ${_basedir}/COPYING.RUNTIME \
${pkgdir}/usr/share/licenses/gcc-fortran/RUNTIME.LIBRARY.EXCEPTION
@@ -221,7 +240,7 @@ package_gcc-objc()
install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
# remove libraries included in gcc-libs
- rm ${pkgdir}/usr/lib/libobjc.so*
+ rm -f ${pkgdir}/usr/lib{,32}/libobjc.so*
# Install Runtime Library Exception
install -Dm644 ${_basedir}/COPYING.RUNTIME \
@@ -237,7 +256,7 @@ package_gcc-ada()
cd gcc-build/gcc
make -j1 DESTDIR=$pkgdir ada.install-{common,info}
install -m755 gnat1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver
-
+
# Install Runtime Library Exception
install -Dm644 ${_basedir}/COPYING.RUNTIME \
${pkgdir}/usr/share/licenses/gcc-ada/RUNTIME.LIBRARY.EXCEPTION
diff --git a/core/gcc/gcc-libs.install b/core/gcc/gcc-libs.install
index 23553b8f0..a880434ae 100644
--- a/core/gcc/gcc-libs.install
+++ b/core/gcc/gcc-libs.install
@@ -4,13 +4,13 @@ filelist=(libgomp.info libquadmath.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
+ [ -f $infodir/$file.gz ] && 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
+ [ -f $infodir/$file.gz ] && install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
done
}
diff --git a/core/gcc/gcc_mips64el_lib.patch b/core/gcc/gcc_mips64el_lib.patch
new file mode 100644
index 000000000..425758e88
--- /dev/null
+++ b/core/gcc/gcc_mips64el_lib.patch
@@ -0,0 +1,25 @@
+--- gcc/config/mips/t-linux64.orig 2011-04-09 20:28:51.729723495 -0300
++++ gcc/config/mips/t-linux64 2011-04-09 20:29:06.913724013 -0300
+@@ -18,7 +18,7 @@
+
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+ MULTILIB_DIRNAMES = n32 32 64
+-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
++MULTILIB_OSDIRNAMES = ../lib ../lib32 ../lib64
+
+ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+
+--- gcc/config/mips/linux64.h.orig 2011-04-09 20:27:06.909723735 -0300
++++ gcc/config/mips/linux64.h 2011-04-09 20:28:16.033723803 -0300
+@@ -35,9 +35,9 @@
+ %{!shared: \
+ %{profile:-lc_p} %{!profile:-lc}}"
+
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
+ #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
+-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
++#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKERN32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)