aboutsummaryrefslogtreecommitdiff
path: root/repos/core/gcc/abuild
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-06-13 00:25:03 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-06-13 00:25:03 +0800
commit239ced844ea434e623686094af3de168f90e4391 (patch)
tree541d2c575f3b3832ca1a3087bde3f65dc74a8f89 /repos/core/gcc/abuild
parent3f80bb67166389b3acabf8f024ee1ad1a4364c1f (diff)
downloadalicelinux-239ced844ea434e623686094af3de168f90e4391.tar.gz
alicelinux-239ced844ea434e623686094af3de168f90e4391.zip
repos updated
Diffstat (limited to 'repos/core/gcc/abuild')
-rw-r--r--repos/core/gcc/abuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/repos/core/gcc/abuild b/repos/core/gcc/abuild
new file mode 100644
index 00000000..62eb4457
--- /dev/null
+++ b/repos/core/gcc/abuild
@@ -0,0 +1,53 @@
+name=gcc
+version=14.1.0
+release=1
+source="https://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.xz
+ c89
+ c99"
+keep_static=1
+
+build() {
+ # /lib is 64bit libraries directory
+ sed -e '/m64=/s/lib64/lib/' \
+ -i.orig gcc/config/i386/t-linux64
+
+ mkdir -v build
+ cd build
+
+ SED=sed \
+ ../configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --enable-languages=c,c++,objc,obj-c++,lto \
+ --enable-lto \
+ --disable-bootstrap \
+ --disable-libmpx \
+ --with-system-zlib \
+ --with-pkgversion="Alice Linux" \
+ --disable-fixincludes \
+ --enable-threads=posix \
+ --enable-__cxa_atexit \
+ --enable-default-pie \
+ --enable-default-ssp \
+ --disable-multilib \
+ --disable-libsanitizer \
+ --with-zstd=no
+ make
+ make DESTDIR=$PKG -j1 install
+
+ #mkdir $PKG/lib
+ #ln -sv ../usr/bin/cpp $PKG/lib/cpp
+ ln -sv gcc $PKG/usr/bin/cc
+
+ install -v -dm755 $PKG/usr/lib/bfd-plugins
+ ln -sfv ../../lib/gcc/$(gcc -dumpmachine)/$version/liblto_plugin.so \
+ $PKG/usr/lib/bfd-plugins/
+
+ mkdir -pv $PKG/usr/share/gdb/auto-load/usr/lib
+ mv -v $PKG/usr/lib/*gdb.py $PKG/usr/share/gdb/auto-load/usr/lib
+
+ install -Dm755 $SRC/c89 $PKG/usr/bin/c89
+ install -Dm755 $SRC/c99 $PKG/usr/bin/c99
+
+ rm -r $PKG/usr/share/$name-$version
+}