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.
64 lines
1.8 KiB
64 lines
1.8 KiB
10 years ago
|
name=gcc
|
||
9 years ago
|
version=5.2.0
|
||
|
gmp_shortver=6.0.0
|
||
|
gmp_version=${gmp_shortver}a
|
||
|
mpfr_version=3.1.3
|
||
|
mpc_version=1.0.3
|
||
|
|
||
|
dlextract "https://ftp.gnu.org/gnu/$name/$name-$version/$name-$version.tar.bz2" \
|
||
|
"a51bcfeb3da7dd4c623e27207ed43467"
|
||
|
download "https://ftp.gnu.org/gnu/gmp/gmp-$gmp_version.tar.xz" \
|
||
10 years ago
|
"1e6da4e434553d2811437aa42c7f7c76"
|
||
9 years ago
|
download "https://ftp.gnu.org/gnu/mpfr/mpfr-$mpfr_version.tar.xz" \
|
||
|
"6969398cd2fbc56a6af570b5273c56a9"
|
||
|
download "https://ftp.gnu.org/gnu/mpc/mpc-$mpc_version.tar.gz" \
|
||
|
"d6a1d5f8ddea3abd2cc3e98f58352d26"
|
||
|
header_end
|
||
10 years ago
|
|
||
|
cd "$name-$version"
|
||
|
|
||
9 years ago
|
extract "gmp-$gmp_version.tar.xz"
|
||
10 years ago
|
extract "mpfr-$mpfr_version.tar.xz"
|
||
|
extract "mpc-$mpc_version.tar.gz"
|
||
9 years ago
|
mv "gmp-$gmp_shortver" gmp
|
||
10 years ago
|
mv "mpfr-$mpfr_version" mpfr
|
||
|
mv "mpc-$mpc_version" mpc
|
||
|
|
||
9 years ago
|
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
|
||
|
"$(dirname "$($target-gcc -print-libgcc-file-name)")/include-fixed/limits.h"
|
||
|
|
||
10 years ago
|
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
|
||
|
|
||
|
mkdir "../$name-build"; cd "../$name-build"
|
||
|
|
||
|
CC="$target-gcc" \
|
||
|
CXX="$target-g++" \
|
||
|
AR="$target-ar" \
|
||
|
RANLIB="$target-ranlib" \
|
||
|
"../$name-$version/configure" \
|
||
|
--prefix=/tools \
|
||
|
--with-local-prefix=/tools \
|
||
|
--with-native-system-header-dir=/tools/include \
|
||
|
--enable-languages=c,c++ \
|
||
|
--disable-libstdcxx-pch \
|
||
|
--disable-multilib \
|
||
|
--disable-bootstrap \
|
||
|
--disable-libgomp
|
||
|
|
||
|
make; make DESTDIR="$dir_install" install
|
||
|
ln -s gcc "$dir_install/tools/bin/cc"
|
||
10 years ago
|
|
||
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh et:
|