summaryrefslogtreecommitdiff
path: root/core/gcc/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'core/gcc/PKGBUILD')
-rw-r--r--core/gcc/PKGBUILD73
1 files changed, 46 insertions, 27 deletions
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index 17e499c1e..5ea4f6637 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -4,27 +4,37 @@
# 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=7
_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
gcc-4.6.2-cloog-0.17.patch)
md5sums=('f7ca5d9f7a07216577f81318b7cf56ef'
'450772ce32daed97d7383199f8797f33'
'4030ee1c08dd1e843c0225b772360e76'
+ '67e337993d821d72fccacbed52d48c34'
'4df25b623799b148a0703eaeec8fdf3f'
'6d9939a2e667376031679ac9f9c49263')
@@ -45,6 +55,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
@@ -56,11 +68,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 \
@@ -101,16 +120,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
@@ -124,21 +143,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
@@ -205,11 +224,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
@@ -226,7 +245,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 \
@@ -242,7 +261,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