Building a cross compiler fails due to hardcoding host=target in gcc/Makefile.in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

Please keep me CC'd as I'm not subscribed.

I've been trying to build a cross compilation toolchain (for a new OS)
and ran into a confusing error while building gcc 10.2.0.  While
building libgcc, it fails running libgcc/config.host as it gets passed
my target instead of the actual host.  I traced this back to the root
Makefile.in, for which the `configure-target-libgcc` rule ends with:

    CONFIG_SITE=no-such-file $(SHELL) \
      $$s/$$module_srcdir/configure \
      --srcdir=$${topdir}/$$module_srcdir \
      $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
      --target=${target_alias}  \
      || exit 1

This is probably someone trying to be helpful when building a Canadian
Cross (host == target), however there is already a host_alias variable
defined at the very top of `Makefile.in`.  When using a traditional
cross compiler, the host is equal to the build machine; but the
makefile ignores this case.

Have I missed something, or should I send a patch for this?

Snippet of make output where I hit this:

Checking multilib configuration for libgcc...
mkdir -p -- i386-unknown-capros/libgcc
Configuring in i386-unknown-capros/libgcc
...
checking for target glibc version... 0.0
*** Configuration i386-unknown-capros not supported
Makefile:12629: recipe for target 'configure-target-libgcc' failed
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory '/extra/wleslie/xenv2/build/gcc-10.2.0/build-capros'
Makefile:954: recipe for target 'all' failed
make: *** [all] Error 2

-- 
William Leslie

Q: What is your boss's password?
A: "Authentication", clearly

Notice:
Likely much of this email is, by the nature of copyright, covered
under copyright law.  You absolutely MAY reproduce any part of it in
accordance with the copyright law of the nation you are reading this
in.  Any attempt to DENY YOU THOSE RIGHTS would be illegal without
prior contractual agreement.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux