summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-02-01 18:32:53 +0000
committerdavidovski <david@davidovski.xyz>2022-02-01 18:32:53 +0000
commit447af192b0a68e9d7cce43bba9614b4c2b5c0bb6 (patch)
tree5711eb7fdc3eb0ba0d8a6570d51373274a1451bf
parent2e7063cd2fc10d6fbcf552bd4a7da6e6634efcdc (diff)
reverted gcc to just c/c++
-rw-r--r--repo/devel/gcc.xibuild38
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
}
+
+