2012-04-20 07:43:56 +08:00
|
|
|
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2015-08-23 05:45:43 +08:00
|
|
|
pkgname=('gcc' 'gcc-libs' 'lib32-gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go')
|
2017-03-17 14:36:56 +08:00
|
|
|
pkgver=6.3.1
|
|
|
|
_pkgver=6
|
|
|
|
_islver=0.16.1
|
2017-05-29 05:13:39 +08:00
|
|
|
pkgrel=3
|
2017-03-17 14:36:56 +08:00
|
|
|
_commit=4fc407888a30c5d953816b05c8a8e98ec2ab3101
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgdesc="The GNU Compiler Collection"
|
2012-11-14 05:58:35 +08:00
|
|
|
arch=('x86_64')
|
2011-04-12 02:22:13 +08:00
|
|
|
license=('GPL' 'LGPL' 'FDL' 'custom')
|
2010-03-13 23:25:19 +08:00
|
|
|
url="http://gcc.gnu.org"
|
2017-05-29 02:21:06 +08:00
|
|
|
makedepends=('binutils>=2.27' 'libmpc' 'gcc-ada' 'doxygen' 'git' 'lib32-gcc-libs')
|
2014-05-23 17:33:16 +08:00
|
|
|
checkdepends=('dejagnu' 'inetutils')
|
|
|
|
options=('!emptydirs')
|
2017-03-17 14:36:56 +08:00
|
|
|
source=(git+https://gcc.gnu.org/git/gcc.git#commit=${_commit}
|
|
|
|
http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2)
|
|
|
|
md5sums=('SKIP'
|
|
|
|
'ac1f25a0677912952718a51f5bc20f32')
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
_libdir="usr/lib/gcc/$CHOST/$pkgver"
|
|
|
|
|
2013-09-25 19:52:37 +08:00
|
|
|
prepare() {
|
2017-03-17 14:36:56 +08:00
|
|
|
cd ${srcdir}/gcc
|
2015-08-22 07:12:09 +08:00
|
|
|
|
2017-03-17 14:36:56 +08:00
|
|
|
# link isl for in-tree build
|
|
|
|
ln -s ../isl-${_islver} isl
|
2015-08-22 07:12:09 +08:00
|
|
|
|
2010-03-13 23:25:19 +08:00
|
|
|
# Do not run fixincludes
|
|
|
|
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
2013-09-25 19:52:37 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
# Arch Linux installs x86_64 libraries /lib, so do we
|
2014-05-24 18:50:49 +08:00
|
|
|
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
|
2012-03-17 03:17:47 +08:00
|
|
|
|
2013-09-25 19:52:37 +08:00
|
|
|
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
|
|
|
|
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
|
|
|
|
|
2017-03-17 14:36:56 +08:00
|
|
|
mkdir ${srcdir}/gcc-build
|
2013-09-25 19:52:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ${srcdir}/gcc-build
|
|
|
|
|
2013-04-27 02:24:28 +08:00
|
|
|
# using -pipe causes spurious test-suite failures
|
|
|
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
|
|
|
|
CFLAGS=${CFLAGS/-pipe/}
|
|
|
|
CXXFLAGS=${CXXFLAGS/-pipe/}
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2017-03-17 14:36:56 +08:00
|
|
|
${srcdir}/gcc/configure --prefix=/usr \
|
|
|
|
--libdir=/usr/lib \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
2014-05-23 02:46:58 +08:00
|
|
|
--with-bugurl=https://chakraos.org/bugtracker \
|
2011-10-08 08:02:42 +08:00
|
|
|
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
|
2017-03-17 14:36:56 +08:00
|
|
|
--enable-shared \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-libmpx \
|
|
|
|
--with-system-zlib \
|
|
|
|
--with-isl \
|
|
|
|
--enable-__cxa_atexit \
|
|
|
|
--disable-libunwind-exceptions \
|
|
|
|
--enable-clocale=gnu \
|
|
|
|
--disable-libstdcxx-pch \
|
|
|
|
--disable-libssp \
|
|
|
|
--enable-gnu-unique-object \
|
|
|
|
--enable-linker-build-id \
|
|
|
|
--enable-lto \
|
|
|
|
--enable-plugin \
|
|
|
|
--enable-install-libiberty \
|
|
|
|
--with-linker-hash-style=gnu \
|
|
|
|
--enable-gnu-indirect-function \
|
|
|
|
--enable-multilib \
|
|
|
|
--disable-werror \
|
2015-08-22 07:12:09 +08:00
|
|
|
--enable-checking=release \
|
|
|
|
--with-default-libstdcxx-abi=gcc4-compatible
|
2015-09-14 13:32:43 +08:00
|
|
|
|
2010-09-23 05:38:29 +08:00
|
|
|
make
|
2014-05-23 02:46:58 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# make documentation
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libstdc++-v3/doc doc-man-doxygen
|
2011-10-08 08:02:42 +08:00
|
|
|
}
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-10-08 08:02:42 +08:00
|
|
|
check() {
|
2012-11-14 05:58:35 +08:00
|
|
|
cd ${srcdir}/gcc-build
|
2011-10-08 08:02:42 +08:00
|
|
|
|
|
|
|
# increase stack size to prevent test failures
|
|
|
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827
|
|
|
|
ulimit -s 32768
|
|
|
|
|
|
|
|
# do not abort on error as some are "expected"
|
2014-09-16 19:53:45 +08:00
|
|
|
make -k check || true
|
2017-03-17 14:36:56 +08:00
|
|
|
${srcdir}/gcc/contrib/test_summary
|
2011-04-12 02:22:13 +08:00
|
|
|
}
|
|
|
|
|
2017-03-17 14:36:56 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
package_gcc-libs()
|
|
|
|
{
|
|
|
|
pkgdesc="Runtime libraries shipped by GCC"
|
|
|
|
groups=('base')
|
2017-03-17 14:36:56 +08:00
|
|
|
depends=('glibc>=2.25')
|
2015-08-23 05:45:43 +08:00
|
|
|
conflicts=('gcc-libs-multilib')
|
|
|
|
provides=('gcc-libs-multilib=${pkgver}')
|
|
|
|
replaces=('gcc-libs-multilib')
|
2014-09-16 19:53:45 +08:00
|
|
|
options=('!emptydirs' '!strip')
|
2012-11-14 05:58:35 +08:00
|
|
|
install=gcc-libs.install
|
|
|
|
|
|
|
|
cd ${srcdir}/gcc-build
|
2014-09-16 19:53:45 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
|
|
|
|
rm ${pkgdir}/${_libdir}/libgcc_eh.a
|
2017-03-17 14:36:56 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
for lib in libatomic \
|
|
|
|
libcilkrts \
|
|
|
|
libgfortran \
|
2017-03-17 14:36:56 +08:00
|
|
|
libgo \
|
2014-05-23 02:46:58 +08:00
|
|
|
libgomp \
|
|
|
|
libitm \
|
|
|
|
libquadmath \
|
|
|
|
libsanitizer/{a,l,ub}san \
|
|
|
|
libstdc++-v3/src \
|
|
|
|
libvtv; do
|
|
|
|
make -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
|
2012-11-14 05:58:35 +08:00
|
|
|
done
|
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
|
2012-11-14 05:58:35 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libobjc DESTDIR=${pkgdir} install-libs
|
2017-03-17 14:36:56 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
|
|
|
|
|
2017-03-17 14:36:56 +08:00
|
|
|
make -C $CHOST/libmpx DESTDIR=${pkgdir} install
|
|
|
|
rm ${pkgdir}/usr/lib/libmpx.spec
|
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
for lib in libgomp \
|
|
|
|
libitm \
|
|
|
|
libquadmath; do
|
|
|
|
make -C $CHOST/$lib DESTDIR=${pkgdir} install-info
|
|
|
|
done
|
|
|
|
|
2015-08-23 05:45:43 +08:00
|
|
|
# remove stuff in lib32-gcc-libs
|
|
|
|
rm -r ${pkgdir}/usr/lib32
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# Install Runtime Library Exception
|
2017-03-17 14:36:56 +08:00
|
|
|
install -Dm644 ${srcdir}/gcc/COPYING.RUNTIME \
|
2010-03-13 23:25:19 +08:00
|
|
|
${pkgdir}/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION
|
|
|
|
}
|
|
|
|
|
2015-08-23 05:45:43 +08:00
|
|
|
package_lib32-gcc-libs()
|
|
|
|
{
|
|
|
|
pkgdesc="Runtime libraries shipped by GCC (32-bit)"
|
|
|
|
depends=('lib32-glibc>=2.22')
|
|
|
|
options=('!emptydirs' '!strip')
|
|
|
|
|
|
|
|
cd ${srcdir}/gcc-build
|
|
|
|
|
|
|
|
make -C $CHOST/32/libgcc DESTDIR=${pkgdir} install-shared
|
|
|
|
rm ${pkgdir}/${_libdir}/32/libgcc_eh.a
|
|
|
|
|
|
|
|
for lib in libatomic \
|
|
|
|
libcilkrts \
|
|
|
|
libgfortran \
|
2017-03-17 14:36:56 +08:00
|
|
|
libgo \
|
2015-08-23 05:45:43 +08:00
|
|
|
libgomp \
|
|
|
|
libitm \
|
|
|
|
libquadmath \
|
|
|
|
libsanitizer/{a,l,ub}san \
|
|
|
|
libstdc++-v3/src \
|
|
|
|
libvtv; do
|
|
|
|
make -C $CHOST/32/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
|
|
|
|
done
|
|
|
|
|
|
|
|
make -C $CHOST/32/libobjc DESTDIR=${pkgdir} install-libs
|
|
|
|
|
|
|
|
# remove stuff in gcc-libs-multilib
|
|
|
|
rm -r ${pkgdir}/usr/lib
|
|
|
|
|
|
|
|
# Install Runtime Library Exception
|
2017-03-17 14:36:56 +08:00
|
|
|
install -Dm644 ${srcdir}/gcc/COPYING.RUNTIME \
|
2015-08-23 05:45:43 +08:00
|
|
|
${pkgdir}/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
package_gcc()
|
|
|
|
{
|
|
|
|
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
|
2017-05-29 05:13:39 +08:00
|
|
|
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.27' 'libmpc' 'isl')
|
2015-08-23 18:16:54 +08:00
|
|
|
optdepends=("lib32-gcc-libs: to compile with -m32")
|
2015-08-23 05:45:43 +08:00
|
|
|
conflicts=('gcc-multilib')
|
|
|
|
provides=('gcc-multilib=${pkgver}')
|
|
|
|
replaces=('gcc-multilib')
|
2012-11-14 05:58:35 +08:00
|
|
|
groups=('base-devel')
|
2014-05-23 02:46:58 +08:00
|
|
|
options=('staticlibs')
|
2012-11-14 05:58:35 +08:00
|
|
|
install=gcc.install
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
cd ${srcdir}/gcc-build
|
2014-05-23 02:46:58 +08:00
|
|
|
|
|
|
|
make -C gcc DESTDIR=${pkgdir} install-driver install-cpp install-gcc-ar \
|
|
|
|
c++.install-common install-headers install-plugin install-lto-wrapper
|
|
|
|
|
2015-09-14 13:32:43 +08:00
|
|
|
install -m755 -t $pkgdir/usr/bin/ gcc/gcov{,-tool}
|
2014-05-23 02:46:58 +08:00
|
|
|
install -m755 -t $pkgdir/${_libdir}/ gcc/{cc1,cc1plus,collect2,lto1}
|
|
|
|
|
|
|
|
make -C $CHOST/libgcc DESTDIR=${pkgdir} install
|
2015-09-14 13:32:43 +08:00
|
|
|
make -C $CHOST/32/libgcc DESTDIR=${pkgdir} install
|
2015-08-23 05:45:43 +08:00
|
|
|
rm ${pkgdir}/usr/lib{,32}/libgcc_s.so*
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libstdc++-v3/src DESTDIR=${pkgdir} install
|
|
|
|
make -C $CHOST/libstdc++-v3/include DESTDIR=${pkgdir} install
|
|
|
|
make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install
|
|
|
|
make -C $CHOST/libstdc++-v3/python DESTDIR=${pkgdir} install
|
2015-09-14 13:32:43 +08:00
|
|
|
make -C $CHOST/32/libstdc++-v3/src DESTDIR=${pkgdir} install
|
|
|
|
make -C $CHOST/32/libstdc++-v3/include DESTDIR=${pkgdir} install
|
|
|
|
make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install
|
2012-11-14 05:58:35 +08:00
|
|
|
|
2015-09-14 13:32:43 +08:00
|
|
|
make DESTDIR=${pkgdir} install-libcc1
|
2012-11-14 05:58:35 +08:00
|
|
|
install -d $pkgdir/usr/share/gdb/auto-load/usr/lib
|
2014-05-23 02:46:58 +08:00
|
|
|
mv $pkgdir/usr/lib/libstdc++.so.6.*-gdb.py \
|
|
|
|
$pkgdir/usr/share/gdb/auto-load/usr/lib/
|
2015-08-23 05:45:43 +08:00
|
|
|
rm -f ${pkgdir}/usr/lib{,32}/libstdc++.so*
|
2014-05-23 02:46:58 +08:00
|
|
|
|
|
|
|
make DESTDIR=${pkgdir} install-fixincludes
|
|
|
|
make -C gcc DESTDIR=${pkgdir} install-mkheaders
|
2015-09-14 13:32:43 +08:00
|
|
|
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C lto-plugin DESTDIR=${pkgdir} install
|
2015-09-14 13:32:43 +08:00
|
|
|
install -dm755 ${pkgdir}/usr/lib/bfd-plugins/
|
|
|
|
ln -s /usr/lib/gcc/$CHOST/${pkgver}/liblto_plugin.so \
|
|
|
|
${pkgdir}/usr/lib/bfd-plugins/
|
2014-05-23 02:46:58 +08:00
|
|
|
|
|
|
|
make -C $CHOST/libcilkrts DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
|
|
|
|
install-nodist_cilkincludeHEADERS
|
|
|
|
make -C $CHOST/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
|
|
|
|
install-nodist_libsubincludeHEADERS
|
|
|
|
make -C $CHOST/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
|
|
|
make -C $CHOST/libquadmath DESTDIR=${pkgdir} install-nodist_libsubincludeHEADERS
|
2015-09-14 13:32:43 +08:00
|
|
|
make -C $CHOST/libsanitizer DESTDIR=${pkgdir} install-nodist_{saninclude,toolexeclib}HEADERS
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
2015-09-14 13:32:43 +08:00
|
|
|
make -C $CHOST/libmpx DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
|
|
|
make -C $CHOST/32/libcilkrts DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
|
|
|
make -C $CHOST/32/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
|
|
|
make -C $CHOST/32/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
|
|
|
make -C $CHOST/32/libsanitizer DESTDIR=${pkgdir} install-nodist_{saninclude,toolexeclib}HEADERS
|
|
|
|
make -C $CHOST/32/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
|
|
|
make -C $CHOST/32/libmpx DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
|
2014-05-23 02:46:58 +08:00
|
|
|
|
|
|
|
make -C libiberty DESTDIR=${pkgdir} install
|
|
|
|
# install PIC version of libiberty
|
|
|
|
install -m644 ${srcdir}/gcc-build/libiberty/pic/libiberty.a ${pkgdir}/usr/lib
|
|
|
|
|
|
|
|
make -C gcc DESTDIR=${pkgdir} install-man install-info
|
|
|
|
rm ${pkgdir}/usr/share/man/man1/{gccgo,gfortran}.1
|
|
|
|
rm ${pkgdir}/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info
|
|
|
|
|
|
|
|
make -C libcpp DESTDIR=${pkgdir} install
|
|
|
|
make -C gcc DESTDIR=${pkgdir} install-po
|
|
|
|
|
|
|
|
# many packages expect this symlink
|
2012-11-14 05:58:35 +08:00
|
|
|
ln -s gcc ${pkgdir}/usr/bin/cc
|
|
|
|
|
|
|
|
# POSIX conformance launcher scripts for c89 and c99
|
|
|
|
cat > $pkgdir/usr/bin/c89 <<"EOF"
|
2010-05-16 23:08:55 +08:00
|
|
|
#!/bin/sh
|
|
|
|
fl="-std=c89"
|
|
|
|
for opt; do
|
|
|
|
case "$opt" in
|
|
|
|
-ansi|-std=c89|-std=iso9899:1990) fl="";;
|
|
|
|
-std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
exec gcc $fl ${1+"$@"}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat > $pkgdir/usr/bin/c99 <<"EOF"
|
|
|
|
#!/bin/sh
|
|
|
|
fl="-std=c99"
|
|
|
|
for opt; do
|
|
|
|
case "$opt" in
|
|
|
|
-std=c99|-std=iso9899:1999) fl="";;
|
|
|
|
-std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
exec gcc $fl ${1+"$@"}
|
|
|
|
EOF
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
chmod 755 $pkgdir/usr/bin/c{8,9}9
|
2010-05-16 23:08:55 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# install the libstdc++ man pages
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libstdc++-v3/doc DESTDIR=$pkgdir doc-install-man
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# Install Runtime Library Exception
|
2014-05-23 02:46:58 +08:00
|
|
|
install -d ${pkgdir}/usr/share/licenses/gcc/
|
|
|
|
ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc/
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
package_gcc-fortran()
|
|
|
|
{
|
|
|
|
pkgdesc="Fortran front-end for GCC"
|
|
|
|
depends=("gcc=$pkgver-$pkgrel")
|
2015-08-23 05:45:43 +08:00
|
|
|
conflicts=('gcc-fortran-multilib')
|
|
|
|
provides=('gcc-fortran-multilib=${pkgver}')
|
|
|
|
replaces=('gcc-fortran-multilib')
|
2014-05-23 02:46:58 +08:00
|
|
|
options=('staticlibs' '!emptydirs')
|
2012-11-14 05:58:35 +08:00
|
|
|
install=gcc-fortran.install
|
|
|
|
|
|
|
|
cd ${srcdir}/gcc-build
|
2017-03-17 14:36:56 +08:00
|
|
|
make -C $CHOST/libgfortran DESTDIR=$pkgdir install-cafexeclibLTLIBRARIES \
|
2015-09-14 13:32:43 +08:00
|
|
|
install-{toolexeclibDATA,nodist_fincludeHEADERS}
|
2017-03-17 14:36:56 +08:00
|
|
|
make -C $CHOST/32/libgfortran DESTDIR=$pkgdir install-cafexeclibLTLIBRARIES \
|
2015-09-14 13:32:43 +08:00
|
|
|
install-{toolexeclibDATA,nodist_fincludeHEADERS}
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
|
|
|
|
make -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
|
|
|
|
install -Dm755 gcc/f951 $pkgdir/${_libdir}/f951
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
ln -s gfortran ${pkgdir}/usr/bin/f95
|
|
|
|
|
|
|
|
# Install Runtime Library Exception
|
2014-05-23 02:46:58 +08:00
|
|
|
install -d ${pkgdir}/usr/share/licenses/gcc-fortran/
|
|
|
|
ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-fortran/
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
package_gcc-objc()
|
|
|
|
{
|
|
|
|
pkgdesc="Objective-C front-end for GCC"
|
|
|
|
depends=("gcc=$pkgver-$pkgrel")
|
2015-08-23 05:45:43 +08:00
|
|
|
conflicts=('gcc-objc-multilib')
|
|
|
|
provides=('gcc-objc-multilib=${pkgver}')
|
|
|
|
replaces=('gcc-objc-multilib')
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
cd ${srcdir}/gcc-build
|
2014-05-23 02:46:58 +08:00
|
|
|
make DESTDIR=$pkgdir -C $CHOST/libobjc install-headers
|
|
|
|
install -dm755 $pkgdir/${_libdir}
|
|
|
|
install -m755 gcc/cc1obj{,plus} $pkgdir/${_libdir}/
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# Install Runtime Library Exception
|
2014-05-23 02:46:58 +08:00
|
|
|
install -d ${pkgdir}/usr/share/licenses/gcc-objc/
|
|
|
|
ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-objc/
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
package_gcc-ada()
|
|
|
|
{
|
|
|
|
pkgdesc="Ada front-end for GCC (GNAT)"
|
|
|
|
depends=("gcc=$pkgver-$pkgrel")
|
2015-08-23 05:45:43 +08:00
|
|
|
conflicts=('gcc-ada-multilib')
|
|
|
|
provides=('gcc-ada-multilib=${pkgver}')
|
|
|
|
replaces=('gcc-ada-multilib')
|
2014-05-23 02:46:58 +08:00
|
|
|
options=('staticlibs' '!emptydirs')
|
2012-11-14 05:58:35 +08:00
|
|
|
install=gcc-ada.install
|
|
|
|
|
|
|
|
cd ${srcdir}/gcc-build/gcc
|
2014-05-23 02:46:58 +08:00
|
|
|
make DESTDIR=$pkgdir ada.install-{common,info}
|
|
|
|
install -m755 gnat1 $pkgdir/${_libdir}
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2015-09-14 13:32:43 +08:00
|
|
|
cd ../$CHOST/32/libada
|
|
|
|
make DESTDIR=${pkgdir} INSTALL="install" \
|
|
|
|
INSTALL_DATA="install -m644" install-gnatlib
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
ln -s gcc ${pkgdir}/usr/bin/gnatgcc
|
2014-05-23 02:46:58 +08:00
|
|
|
|
|
|
|
# insist on dynamic linking, but keep static libraries because gnatmake complains
|
|
|
|
mv ${pkgdir}/${_libdir}/adalib/libgna{rl,t}-${_pkgver}.so ${pkgdir}/usr/lib
|
|
|
|
ln -s libgnarl-${_pkgver}.so ${pkgdir}/usr/lib/libgnarl.so
|
|
|
|
ln -s libgnat-${_pkgver}.so ${pkgdir}/usr/lib/libgnat.so
|
|
|
|
rm ${pkgdir}/${_libdir}/adalib/libgna{rl,t}.so
|
|
|
|
|
2015-09-14 13:32:43 +08:00
|
|
|
install -d ${pkgdir}/usr/lib32/
|
|
|
|
mv ${pkgdir}/${_libdir}/32/adalib/libgna{rl,t}-${_pkgver}.so ${pkgdir}/usr/lib32
|
|
|
|
ln -s libgnarl-${_pkgver}.so ${pkgdir}/usr/lib32/libgnarl.so
|
|
|
|
ln -s libgnat-${_pkgver}.so ${pkgdir}/usr/lib32/libgnat.so
|
|
|
|
rm ${pkgdir}/${_libdir}/32/adalib/libgna{rl,t}.so
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# Install Runtime Library Exception
|
2014-05-23 02:46:58 +08:00
|
|
|
install -d ${pkgdir}/usr/share/licenses/gcc-ada/
|
|
|
|
ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-ada/
|
2011-10-08 08:02:42 +08:00
|
|
|
}
|
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
package_gcc-go()
|
|
|
|
{
|
|
|
|
pkgdesc="Go front-end for GCC"
|
|
|
|
depends=("gcc=$pkgver-$pkgrel")
|
2016-08-23 18:00:41 +08:00
|
|
|
conflicts=('gcc-go-multilib' 'go')
|
2015-08-23 05:45:43 +08:00
|
|
|
provides=('gcc-go-multilib=${pkgver}')
|
|
|
|
replaces=('gcc-go-multilib')
|
2015-09-14 13:32:43 +08:00
|
|
|
options=('!emptydirs')
|
2012-11-14 05:58:35 +08:00
|
|
|
install=gcc-go.install
|
2011-10-08 08:02:42 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
cd ${srcdir}/gcc-build
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C $CHOST/libgo DESTDIR=$pkgdir install-exec-am
|
2015-09-14 13:32:43 +08:00
|
|
|
make -C $CHOST/32/libgo DESTDIR=$pkgdir install-exec-am
|
2014-05-23 02:46:58 +08:00
|
|
|
make -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
|
|
|
|
install -Dm755 gcc/go1 $pkgdir/${_libdir}/go1
|
|
|
|
|
2015-09-14 13:32:43 +08:00
|
|
|
make DESTDIR=${pkgdir} install-gotools
|
2011-10-08 08:02:42 +08:00
|
|
|
|
2012-11-14 05:58:35 +08:00
|
|
|
# Install Runtime Library Exception
|
2014-05-23 02:46:58 +08:00
|
|
|
install -d ${pkgdir}/usr/share/licenses/gcc-go/
|
|
|
|
ln -s ../gcc-libs/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-go/
|
2011-10-08 08:02:42 +08:00
|
|
|
}
|