Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

68 lines
1.9 KiB

name=gcc
version=4.9.2
gmp_version=6.0.0
gmp_minver=a
mpfr_version=3.1.2
mpc_version=1.0.2
dlextract "http://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
"4df8ee253b7f3863ad0b86359cd39c43"
download "http://ftp.gnu.org/gnu/gmp/gmp-$gmp_version$gmp_minver.tar.xz" \
"1e6da4e434553d2811437aa42c7f7c76"
download "http://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \
"e3d203d188b8fe60bb6578dd3152e05c"
download "http://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \
"68fadff3358fb3e7976c7a398a0af4c3"
cd "$name-$version"
extract "gmp-$gmp_version$gmp_minver.tar.xz"
extract "mpfr-$mpfr_version.tar.xz"
extract "mpc-$mpc_version.tar.gz"
mv "gmp-$gmp_version" gmp
mv "mpfr-$mpfr_version" mpfr
mv "mpc-$mpc_version" mpc
for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
cp -u $file $file.orig
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
mkdir "../$name-build"; cd "../$name-build"
"../$name-$version/configure" \
--target="$target" \
--prefix=/tools \
--with-sysroot="$dir_install" \
--with-newlib \
--without-headers \
--with-local-prefix=/tools \
--with-native-system-header-dir=/tools/include \
--disable-nls \
--disable-shared \
--disable-multilib \
--disable-decimal-float \
--disable-threads \
--disable-libatomic \
--disable-libgomp \
--disable-libitm \
--disable-libquadmath \
--disable-libsanitizer \
--disable-libssp \
--disable-libvtv \
--disable-libcilkrts \
--disable-libstdc++-v3 \
--enable-languages=c,c++
make; make DESTDIR="$dir_install" install