1 # Maintainer: Jan de Groot <jgc@archlinux.org>
6 pkgdesc="GNU Standard C++ library version 3"
8 url="https://gcc.gnu.org"
11 makedepends=('binutils' 'gcc')
12 options=('!makeflags')
13 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2
14 gcc-3.4.3-no_multilib_amd64.patch
15 gcc-3.4.6-ucontext.patch
17 md5sums=('18c52e6fb8966b7700665dca289d077f'
18 '6b3d00b8d079805be1b895f7f6ce47a0'
19 '8504bb22dae9d49e8b6d70d7e6910f1b'
20 '982ec78eed2887657189aefbe0c642d0'
21 'bf36b281a9fc81f624f31f2623a3ad0e')
26 patch -Np1 -i $srcdir/gcc-3.4.3-no_multilib_amd64.patch
27 patch -Np1 -i $srcdir/gcc-3.4.6-ucontext.patch
29 # fix build issue with recent gcc
30 sed -i "s#O_CREAT#O_CREAT, 0666#" gcc/collect2.c
33 sed -i -e 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
35 patch -Np0 -i ../siginfo.patch
41 export CFLAGS="-march=${CARCH/_/-} -O2"
42 export CXXFLAGS="-march=${CARCH/_/-} -O2"
46 CPP=/usr/bin/cpp ../gcc-${pkgver}/configure --prefix=/usr --enable-shared \
47 --enable-languages=c++ --enable-threads=posix --enable-__cxa_atexit \
48 --disable-multilib --libdir=/usr/lib
49 make all-target-libstdc++-v3 BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O"
53 cd ${srcdir}/gcc-build
54 make DESTDIR=${pkgdir} install-target-libstdc++-v3
56 # Remove includefiles and libs provided by gcc
57 rm -rf ${pkgdir}/usr/{include,share/locale}
58 rm -f ${pkgdir}/usr/lib/*.a
59 rm -f ${pkgdir}/usr/lib/libstdc++.so