diff options
Diffstat (limited to 'repo/devel/gcc.xibuild')
-rw-r--r-- | repo/devel/gcc.xibuild | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/repo/devel/gcc.xibuild b/repo/devel/gcc.xibuild index 54dc38e..8043772 100644 --- a/repo/devel/gcc.xibuild +++ b/repo/devel/gcc.xibuild @@ -1,7 +1,7 @@ #!/bin/bash MAKEDEPS=(grep make libxml2 dejagnu inetutils libiconv) -DEPS=(glibc binutils mpc gdb) +DEPS=(glibc binutils mpc) PKG_VER=11.2.0 SOURCE=https://ftp.gnu.org/gnu/gcc/gcc-$PKG_VER/gcc-$PKG_VER.tar.xz @@ -17,7 +17,8 @@ prepare () { case $(uname -m) in x86_64) - sed -i.orig '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64 + sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 ;; esac } @@ -26,11 +27,13 @@ build () { mkdir -v build cd build - ../configure \ - --prefix=/usr \ - --disable-multilib \ - --with-system-zlib \ - --enable-languages=c,c++,d,fortran,go,objc,obj-c++ && + ../configure --prefix=/usr \ + LD=ld \ + --enable-languages=c,c++ \ + --disable-multilib \ + --disable-bootstrap \ + --with-system-zlib + make } @@ -48,18 +51,15 @@ check () { package () { make DESTDIR=$PKG_DEST install - mkdir -pv $PKG_DEST/usr/share/gdb/auto-load/usr/lib && - mv -v $PKG_DEST/usr/lib/*gdb.py $PKG_DEST/usr/share/gdb/auto-load/usr/lib && + rm -rf $PKG_DEST/usr/lib/gcc/$(gcc -dumpmachine)/11.2.0/include-fixed/bits/ chown -v -R root:root \ - $PKG_DEST/usr/lib/gcc/*linux-gnu/$PKG_VER/include{,-fixed} + $PKG_DEST/usr/lib/gcc/*linux-gnu/11.2.0/include{,-fixed} + ln -sv cpp $PKG_DEST/usr/lib/cpp - rm -rf $PKG_DEST/usr/lib/gcc/$(gcc -dumpmachine)/$PKG_VER/include-fixed/bits/ + ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/11.2.0/liblto_plugin.so \ + $PKG_DEST/usr/lib/bfd-plugins/ - ln -v -sf ../usr/bin/cpp $PKG_DEST/lib && - ln -v -sf gcc $PKG_DEST/usr/bin/cc && - install -v -dm755 $PKG_DEST/usr/lib/bfd-plugins && - ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/$PKG_VER/liblto_plugin.so $PKG_DEST/usr/lib/bfd-plugins/ # sanity checks echo 'int main(){}' > dummy.c @@ -72,4 +72,12 @@ package () { grep "/lib.*/libc.so.6 " dummy.log grep found dummy.log + # move a misplaced file + mkdir -pv $PKG_DEST/usr/share/gdb/auto-load/usr/lib + mv -v $PKG_DEST/usr/lib/*gdb.py $PKG_DEST/usr/share/gdb/auto-load/usr/lib + + # set gcc as the default c compiler + ln -s gcc $PKG_DEST/usr/bin/cc } + + |