[Bug bootstrap/104057] cross compiler multilibs libs path too chaos
unlvsur at live dot com
gcc-bugzilla@gcc.gnu.org
Mon Jan 17 01:34:38 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104057
--- Comment #13 from cqwrteur <unlvsur at live dot com> ---
(In reply to Andrew Pinski from comment #12)
> I don't care about your youtube videos (they are not accessable due to not
> having
> the steps written down). I need the steps written here in the bug report.
export TARGET=x86_64-ubuntu-linux-gnu
export PREFIX=$HOME/cross/$TARGET
export PATH=$PREFIX:$PATH
../../binutils-gdb/configure --disable-werror --disable-nls --target=$TARGET
--enable-gold --with-python3 --prefix=$PREFIX
../../gcc/configure --disable-nls --disable-werror --target=$TARGET
--prefix=$PREFIX --without-headers --with-newlib --disable-hosted-libstdcxx
--disable-shared --disable-threads --enable-languages=c,c++
Use this to build a x86_64-ubuntu-linux-gnu-gcc to build glibc
glibc 32,64,x32
copy glibc32/lib to $PREFIX/$TARGET/lib/32 and $PREFIX/$TARGET/lib32
copy glibc64/lib to $PREFIX/$TARGET/lib $PREFIX/$TARGET/lib64
copy glibcx32/lib to $PREFIX/$TARGET/lib/x32 $PREFIX/$TARGET/libx32
Then build gcc2.
../../gcc/configure --disable-nls --disable-werror --target=$TARGET
--prefix=$PREFIX --disable-libstdcxx-verbose --enable-languages=c,c++
then copy all files from lib32 to lib (since GCC cannot find 32bit libs in
lib32 for x86_64-linux-gnu)
Done
More information about the Gcc-bugs
mailing list