yoink some KISS linux gcc tidbits
This commit is contained in:
parent
57245b2091
commit
6bcf71310c
1 changed files with 35 additions and 16 deletions
51
gcc/build
51
gcc/build
|
@ -1,27 +1,46 @@
|
||||||
wget -O gcc-11.1.0.tar.gz https://gcc.gnu.org/pub/gcc/releases/gcc-11.1.0/gcc-11.1.0.tar.xz
|
wget -O gcc-11.1.0.tar.gz https://gcc.gnu.org/pub/gcc/releases/gcc-11.1.0/gcc-11.1.0.tar.xz
|
||||||
tar -xf gcc-11.1.0.tar.gz
|
tar -xf gcc-11.1.0.tar.gz
|
||||||
cd gcc-11.1.0
|
cd gcc-11.1.0
|
||||||
wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
|
|
||||||
wget https://ftp.gnu.org/gnu/mpfr/mpfr-4.1.0.tar.xz
|
|
||||||
wget https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz
|
|
||||||
tar -xf gmp-6.2.1.tar.xz
|
|
||||||
tar -xf mpfr-4.1.0.tar.xz
|
|
||||||
tar -xf mpc-1.2.1.tar.gz
|
|
||||||
|
|
||||||
mv gmp-6.2.1 gmp
|
# Use lib not lib64 by default.
|
||||||
mv mpfr-4.1.0 mpfr
|
sed '/m64=/s/lib64/lib/' gcc/gcc/config/i386/t-linux64 > _
|
||||||
mv mpc-1.2.1 mpc
|
mv -f _ gcc/gcc/config/i386/t-linux64
|
||||||
|
sed 's/lib64/lib/' gcc/gcc/config/i386/linux64.h > _
|
||||||
|
mv -f _ gcc/gcc/config/i386/linux64.h
|
||||||
|
|
||||||
sed -i '/m64=/s/lib64/lib/' ./config/i386/t-linux64
|
|
||||||
sed -i 's/lib64/lib/' ./config/i386/linux64.h
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
../configure --prefix=/usr --enable-languages=c,c++,d,fortran,go,objc,obj-c++
|
../configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--infodir=/usr/share/info \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-symvers \
|
||||||
|
--disable-libmpx \
|
||||||
|
--disable-libmudflap \
|
||||||
|
--disable-libsanitizer \
|
||||||
|
--disable-werror \
|
||||||
|
--disable-fixed-point \
|
||||||
|
--disable-libstdcxx-pch \
|
||||||
|
--disable-nls \
|
||||||
|
--enable-checking=release \
|
||||||
|
--enable-__cxa_atexit \
|
||||||
|
--enable-default-pie \
|
||||||
|
--enable-default-ssp \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-threads \
|
||||||
|
--enable-tls \
|
||||||
|
--enable-languages=c,c++
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
||||||
ln -s gcc "$1/usr/bin/cc"
|
# Save 35MB. (from KISS)
|
||||||
echo "#!/bin/sh" > "$1"/usr/bin/c99
|
find "$1" -name libgtkpeer.a -exec rm -f {} +
|
||||||
echo "exec cc -std=c99 "$@"" >> "$1"/usr/bin/c99
|
find "$1" -name libgjsmalsa.a -exec rm -f {} +
|
||||||
chmod +x "$1"/usr/bin/c99
|
find "$1" -name libgij.a -exec rm -f {} +
|
||||||
|
|
||||||
|
ln -sf gcc "$1/usr/bin/cc"
|
||||||
|
cp -f ../c99 "$1/usr/bin"
|
||||||
|
|
Loading…
Reference in a new issue