This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Building gcc with gnu binutils automatically
NightStrike <nightstrike@gmail.com> writes:
> If you use gnu ld or as to build GCC, you get extra features in gcc
> itself. There's a few bugzilla PRs on this, and a lot of emails on
> the mailing list. What I don't see, however, is how I can have
> configure detect the usage of GNU binutils automatically. In other
> words, without explicitly passing in --with-gnu-ld/as, I don't get the
> features in question.
>
> Is there a way to do this? Or, is there a way to fix configure so
> that it does some test without requiring the option? Also, is there a
> way to do this for a cross compiler?
Historically, the concern was that if person A builds the compiler and
hands it to person B, person B may have a different assembler or linker
than person A. So we force person A to explicitly indicate whether they
are using the GNU assembler.
However, this general rule is not followed very much. E.g., when using
the GNU tools, the configure scripts check for various features of them,
which could fail if person B has a different version of the GNU tools
installed.
So I think it would be reasonable to have the configure script set the
defualt for -with-gnu-ld/as based on the tools found at configure time.
Ian