-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload last of the instructions for the 64-bit toolchain
- Loading branch information
Showing
27 changed files
with
604 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Tool Chain: Binutils PASS 2 of 2 | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
mkdir -v build && cd build | ||
../configure \ | ||
--target=${MLFS_TARGET} \ | ||
--build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools \ | ||
--disable-nls \ | ||
--disable-werror \ | ||
--with-lib-path=/tools/lib \ | ||
--with-sysroot | ||
|
||
PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make | ||
make install | ||
make -C ld clean | ||
make -C ld LIB_PATH=/usr/lib:/lib | ||
cp -v ld/ld-new /tools/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Tool Chain: GCC-8.2.0 PASS 2 of 2 | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
tar -xf ../mpfr-4.0.1.tar.xz | ||
mv -v mpfr-4.0.1 mpfr | ||
tar -xf ../gmp-6.1.2.tar.xz | ||
mv -v gmp-6.1.2 gmp | ||
tar -xf ../mpc-1.1.0.tar.gz | ||
mv -v mpc-1.1.0 mpc | ||
|
||
# Apply patches from Void-Linux | ||
patch -Np0 -i ../gcc-8.2.0-void-0016-invalid_tls_model.diff | ||
patch -Np0 -i ../gcc-8.2.0-void-fix-cxxflags-passing.patch | ||
patch -Np0 -i ../gcc-8.2.0-void-fix-musl-execinfo.patch | ||
patch -Np0 -i ../gcc-8.2.0-void-no-stack_chk_fail_local.patch | ||
|
||
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ | ||
`dirname $($MLFS_TARGET-gcc -print-libgcc-file-name)`/include-fixed/limits.h | ||
for file in gcc/config/{linux,i386/linux{,64}}.h | ||
do | ||
cp -uv $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 | ||
|
||
case $(uname -m) in | ||
x86_64) | ||
sed -e '/m64=/s/lib64/lib/' \ | ||
-i.orig gcc/config/i386/t-linux64 | ||
;; | ||
esac | ||
|
||
mkdir -v build && cd build | ||
../configure \ | ||
--target=${MLFS_TARGET} \ | ||
--build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--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 \ | ||
--disable-libmpx \ | ||
--disable-libquadmath \ | ||
--disable-libssp \ | ||
--disable-libvtv \ | ||
--disable-symvers \ | ||
--disable-libitm \ | ||
--disable-gnu-indirect-function \ | ||
--disable-libmudflap \ | ||
--disable-libsanitizer \ | ||
--disable-libcilkrts | ||
|
||
PATH=/bin:/usr/bin:/cross-tools/bin:/tools/bin make | ||
|
||
make install | ||
ln -sv gcc /tools/bin/cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Tool Chain: TCL | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
cd unix | ||
ac_cv_func_strtod=yes \ | ||
tcl_cv_strtod_buggy=1 \ | ||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install | ||
|
||
chmod -v u+w /tools/lib/libtcl8.6.so | ||
make install-private-headers | ||
ln -sv tclsh8.6 /tools/bin/tcls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
patch -Np1 -i ../expect-5.45.3-dont-put-toolchain-in-libpath.patch | ||
patch -Np1 -i ../expect-5.45.3-dont-configure-testsuites.patch | ||
patch -Np1 -i ../expect-5.45.3-allow-cross-compile.patch | ||
|
||
cp -v ../config.guess-musl tclconfig/config.guess | ||
cp -v ../config.sub-musl tclconfig/config.sub | ||
cp -v configure{,.orig} | ||
sed 's:/usr/local/bin:/bin:' configure.orig > configure | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools \ | ||
--with-tcl=/tools/lib \ | ||
--with-tclinclude=/tools/include | ||
|
||
make && make SCRIPTS="" install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Toolchain: DejaGNU | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Toolchain: M4 | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --prefix=/tools \ | ||
--build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Toolchain: Ncurses | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in | ||
./configure --prefix=/tools \ | ||
--build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--with-shared \ | ||
--without-debug \ | ||
--without-ada \ | ||
--enable-widec \ | ||
--enable-overwrite \ | ||
--with-build-cc="gcc -D_GNU_SOURCE" | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Toolchain: Bash | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
cat > config.cache << "EOF" | ||
ac_cv_func_mmap_fixed_mapped=yes | ||
ac_cv_func_strcoll_works=yes | ||
ac_cv_func_working_mktime=yes | ||
bash_cv_func_sigsetjmp=present | ||
bash_cv_getcwd_malloc=yes | ||
bash_cv_job_control_missing=present | ||
bash_cv_printf_a_format=yes | ||
bash_cv_sys_named_pipes=present | ||
bash_cv_ulimit_maxfds=yes | ||
bash_cv_under_sys_siglist=yes | ||
bash_cv_unusable_rtsigs=no | ||
gt_cv_int_divbyzero_sigfpe=yes | ||
EOF | ||
|
||
./configure --prefix=/tools \ | ||
--without-bash-malloc \ | ||
--build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--cache-file=config.cache | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Toolchain: Bison | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ToolChain: Bzip2 | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
cp Makefile{,.orig} | ||
sed -e "/^all:/s/ test//" Makefile.orig > Makefile | ||
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile | ||
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile | ||
|
||
make -f Makefile-libbz2_so CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" | ||
make clean | ||
make CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" | ||
|
||
make PREFIX=/tools install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Toolchain: Coreutils | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
autoreconf -vif | ||
|
||
cat > config.cache << EOF | ||
fu_cv_sys_stat_statfs2_bsize=yes | ||
gl_cv_func_rename_trailing_slash_bug=no | ||
gl_cv_func_mbrtowc_incomplete_state=yes | ||
gl_cv_func_mbrtowc_nul_retval=yes | ||
gl_cv_func_mbrtowc_null_arg=yes | ||
gl_cv_func_mbrtowc_retval=yes | ||
gl_cv_func_btowc_eof=yes | ||
gl_cv_func_wcrtomb_retval=yes | ||
gl_cv_func_wctob_works=yes | ||
EOF | ||
|
||
sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools \ | ||
--cache-file=config.cache | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Toolchain Diffutils | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Toolchain: File | ||
# Build and install as mlfs | ||
# Must use same version for cross-tools, tools, | ||
# and final system. | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Toolchain: Findutils | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Toolchain: Gawk | ||
# Build and install as mlfs | ||
|
||
export CC="${MLFS_TARGET}-gcc" | ||
export CXX="${MLFS_TARGET}-g++" | ||
export AR="${MLFS_TARGET}-ar" | ||
export AS="${MLFS_TARGET}-as" | ||
export RANLIB="${MLFS_TARGET}-ranlib" | ||
export LD="${MLFS_TARGET}-ld" | ||
export STRIP="${MLFS_TARGET}-strip" | ||
|
||
./configure --build=${MLFS_HOST} \ | ||
--host=${MLFS_TARGET} \ | ||
--prefix=/tools | ||
|
||
make && make install |
Oops, something went wrong.