Skip to content

Commit c5a6ddf

Browse files
committed
Upload last of the instructions for the 64-bit toolchain
1 parent 3c5fe89 commit c5a6ddf

27 files changed

Lines changed: 604 additions & 0 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Tool Chain: Binutils PASS 2 of 2
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
mkdir -v build && cd build
12+
../configure \
13+
--target=${MLFS_TARGET} \
14+
--build=${MLFS_HOST} \
15+
--host=${MLFS_TARGET} \
16+
--prefix=/tools \
17+
--disable-nls \
18+
--disable-werror \
19+
--with-lib-path=/tools/lib \
20+
--with-sysroot
21+
22+
PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make
23+
make install
24+
make -C ld clean
25+
make -C ld LIB_PATH=/usr/lib:/lib
26+
cp -v ld/ld-new /tools/bin
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Tool Chain: GCC-8.2.0 PASS 2 of 2
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
tar -xf ../mpfr-4.0.1.tar.xz
13+
mv -v mpfr-4.0.1 mpfr
14+
tar -xf ../gmp-6.1.2.tar.xz
15+
mv -v gmp-6.1.2 gmp
16+
tar -xf ../mpc-1.1.0.tar.gz
17+
mv -v mpc-1.1.0 mpc
18+
19+
# Apply patches from Void-Linux
20+
patch -Np0 -i ../gcc-8.2.0-void-0016-invalid_tls_model.diff
21+
patch -Np0 -i ../gcc-8.2.0-void-fix-cxxflags-passing.patch
22+
patch -Np0 -i ../gcc-8.2.0-void-fix-musl-execinfo.patch
23+
patch -Np0 -i ../gcc-8.2.0-void-no-stack_chk_fail_local.patch
24+
25+
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
26+
`dirname $($MLFS_TARGET-gcc -print-libgcc-file-name)`/include-fixed/limits.h
27+
for file in gcc/config/{linux,i386/linux{,64}}.h
28+
do
29+
cp -uv $file{,.orig}
30+
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
31+
-e 's@/usr@/tools@g' $file.orig > $file
32+
echo '
33+
#undef STANDARD_STARTFILE_PREFIX_1
34+
#undef STANDARD_STARTFILE_PREFIX_2
35+
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
36+
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
37+
touch $file.orig
38+
done
39+
40+
case $(uname -m) in
41+
x86_64)
42+
sed -e '/m64=/s/lib64/lib/' \
43+
-i.orig gcc/config/i386/t-linux64
44+
;;
45+
esac
46+
47+
mkdir -v build && cd build
48+
../configure \
49+
--target=${MLFS_TARGET} \
50+
--build=${MLFS_HOST} \
51+
--host=${MLFS_TARGET} \
52+
--prefix=/tools \
53+
--with-local-prefix=/tools \
54+
--with-native-system-header-dir=/tools/include \
55+
--enable-languages=c,c++ \
56+
--disable-libstdcxx-pch \
57+
--disable-multilib \
58+
--disable-bootstrap \
59+
--disable-libgomp \
60+
--disable-libmpx \
61+
--disable-libquadmath \
62+
--disable-libssp \
63+
--disable-libvtv \
64+
--disable-symvers \
65+
--disable-libitm \
66+
--disable-gnu-indirect-function \
67+
--disable-libmudflap \
68+
--disable-libsanitizer \
69+
--disable-libcilkrts
70+
71+
PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make
72+
73+
make install
74+
ln -sv gcc /tools/bin/cc
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Tool Chain: TCL
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
cd unix
13+
ac_cv_func_strtod=yes \
14+
tcl_cv_strtod_buggy=1 \
15+
./configure --build=${MLFS_HOST} \
16+
--host=${MLFS_TARGET} \
17+
--prefix=/tools
18+
19+
make && make install
20+
21+
chmod -v u+w /tools/lib/libtcl8.6.so
22+
make install-private-headers
23+
ln -sv tclsh8.6 /tools/bin/tcls
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Build and install as mlfs
2+
3+
export CC="${MLFS_TARGET}-gcc"
4+
export CXX="${MLFS_TARGET}-g++"
5+
export AR="${MLFS_TARGET}-ar"
6+
export AS="${MLFS_TARGET}-as"
7+
export RANLIB="${MLFS_TARGET}-ranlib"
8+
export LD="${MLFS_TARGET}-ld"
9+
export STRIP="${MLFS_TARGET}-strip"
10+
11+
patch -Np1 -i ../expect-5.45.3-dont-put-toolchain-in-libpath.patch
12+
patch -Np1 -i ../expect-5.45.3-dont-configure-testsuites.patch
13+
patch -Np1 -i ../expect-5.45.3-allow-cross-compile.patch
14+
15+
cp -v ../config.guess-musl tclconfig/config.guess
16+
cp -v ../config.sub-musl tclconfig/config.sub
17+
cp -v configure{,.orig}
18+
sed 's:/usr/local/bin:/bin:' configure.orig > configure
19+
20+
./configure --build=${MLFS_HOST} \
21+
--host=${MLFS_TARGET} \
22+
--prefix=/tools \
23+
--with-tcl=/tools/lib \
24+
--with-tclinclude=/tools/include
25+
26+
make && make SCRIPTS="" install
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Toolchain: DejaGNU
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
./configure --build=${MLFS_HOST} \
13+
--host=${MLFS_TARGET} \
14+
--prefix=/tools
15+
16+
make && make install
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Toolchain: M4
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
./configure --prefix=/tools \
13+
--build=${MLFS_HOST} \
14+
--host=${MLFS_TARGET}
15+
16+
make && make install
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Toolchain: Ncurses
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in
13+
./configure --prefix=/tools \
14+
--build=${MLFS_HOST} \
15+
--host=${MLFS_TARGET} \
16+
--with-shared \
17+
--without-debug \
18+
--without-ada \
19+
--enable-widec \
20+
--enable-overwrite \
21+
--with-build-cc="gcc -D_GNU_SOURCE"
22+
23+
make && make install
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Toolchain: Bash
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
cat > config.cache << "EOF"
13+
ac_cv_func_mmap_fixed_mapped=yes
14+
ac_cv_func_strcoll_works=yes
15+
ac_cv_func_working_mktime=yes
16+
bash_cv_func_sigsetjmp=present
17+
bash_cv_getcwd_malloc=yes
18+
bash_cv_job_control_missing=present
19+
bash_cv_printf_a_format=yes
20+
bash_cv_sys_named_pipes=present
21+
bash_cv_ulimit_maxfds=yes
22+
bash_cv_under_sys_siglist=yes
23+
bash_cv_unusable_rtsigs=no
24+
gt_cv_int_divbyzero_sigfpe=yes
25+
EOF
26+
27+
./configure --prefix=/tools \
28+
--without-bash-malloc \
29+
--build=${MLFS_HOST} \
30+
--host=${MLFS_TARGET} \
31+
--cache-file=config.cache
32+
33+
make && make install
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Toolchain: Bison
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
./configure --build=${MLFS_HOST} \
13+
--host=${MLFS_TARGET} \
14+
--prefix=/tools
15+
16+
make && make install
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ToolChain: Bzip2
2+
# Build and install as mlfs
3+
4+
export CC="${MLFS_TARGET}-gcc"
5+
export CXX="${MLFS_TARGET}-g++"
6+
export AR="${MLFS_TARGET}-ar"
7+
export AS="${MLFS_TARGET}-as"
8+
export RANLIB="${MLFS_TARGET}-ranlib"
9+
export LD="${MLFS_TARGET}-ld"
10+
export STRIP="${MLFS_TARGET}-strip"
11+
12+
cp Makefile{,.orig}
13+
sed -e "/^all:/s/ test//" Makefile.orig > Makefile
14+
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
15+
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
16+
17+
make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"
18+
make clean
19+
make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}"
20+
21+
make PREFIX=/tools install

0 commit comments

Comments
 (0)