This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Looking for the standard way to build a standalone gcc+glibc+binutils toolchain at Linux

Hi there,

I'm looking for the standard way to build a standalone
gcc+glibc+binutils toolchain at Linux. I want to use that standalone
toolchain to build a temporary system (a second toolchain of more
build tools like make, autoconf, bison, etc.) and use it to finally
build a new x86_64 Linux system from scratch under another x86_64
Linux system. I know about LFS but I don't like the way how it's done
there. I don't like patching the official source code and making
symbolic link at the root of the host Linux filesystem.

I tried to do it similar to LFS and without the things I don't like
but it doesn't work properly. For example running of
the attached tarball ends with strange errors like following when it
tries to make a first compilation test of a trivial C code:

cannot find /home/rosti/toolchain/build/lib/ inside

Why it tries to find an absolute path withing another absolute path?

I tried to change the --with-sysroot path and other build
configurations but it only changed the error I get. For example
instead of this error I had something like
x86_64-unknown-linux-gnu/bin/ld: cannot find crt1.o, i.e. it tried to
find that crt1.o in the current directory.

So I'm stuck and I'm looking for the standard way to make a standalone
gcc+glibc+binutils toolchain that will be independent from the host
system. Does it exist?

I've found a few other articles besides LFS about how people made such
a toolchain. But they also patched the official source code and made a
few other tricks.

P.S. to reduce the attachment size I've removed all files from the
artifacts directory in my tarball, so you need to put following files
into that directory before you try running


Attachment: toolchain.tar.xz
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]