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

See the CrossGCC FAQ for lots more information.

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

Re: Problem with cross-ng-1.3.0

Hello Jussi!

On Wednesday 26 November 2008 13:56:17 Eronen, Jussi (GE Healthcare) wrote:
> Hi Yannic,

That is Yann, if you please... Thank you.

Also, such requests should be CC:ed to the crossgcc mailing list. Keep
it copied on replies, please.

> I have been using versions 1.2.x to build a toolchain for PowerPC on x86
> PC running Fedora8. I also managed to buidl toolchain in x86_64 running
> RHEL4.7 and even WinXP with Cygwin (which succeeded after some fixes to
> Cygwin scripts).

crosstool-NG was never prepared to work under Cygwin. If it does, it's only
by chance (call it luck if you wish). Furthermore, there is no Cygwin script
bundled with crosstool-NG (in whatever version you're speaking of).

Or are you confusing crosstool-NG with crosstool (the original by Dan KEGEL)?
IIRC, crosstool had support for building under Cygwin.

> Only serious problem I had was with 920-soft-load.patch, which caused
> linking to fail for gcc (or was it glibc?, can't recall for sure anymore).
> Removing the patch solved the problem.

There is no file named "920-soft-load.patch" in crosstool-NG, be it in the
1.2 or in the 1.3 branch. Not even a file matching '*soft-load*'. Not even
in the original crosstool...

Or do you have local patches I'm not aware of? In which case I can not help.

> Now I am testing v1.3.0 to do the same and build tuple seems to be somehow
> broken. Default value used to work in v1.2, but now I had to define it
> manually. With default setting build failed, since the tuple was set to
> "i386-build_unknown-redhat-linux" when proper value (by config.guess)
> is "i686-pc-linux-gnu".

Hmmm... Could you check the result of "gcc -dumpmachine" and confirm it
is "i386-redhat-linux". If not, please post the result.

crosstool-NG is using $(gcc -dumpmachine) instead of $(config.guess)
because the prefix of the build system compiler is really the output of
$(gcc -dumpmachine), and not from $(config.guess). In fact, there is latent
bug there, as it should use "${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" instead
of plain "gcc". Will fix ASAP... In the meantime, can you test the attached

A second bug you unveiled is the tuple mangling for /weird/ systems where the
tuple is not /compliant/ with what the autotools await. Your system seems to
exhibit this problem, as "i386-redhat-linux" is not really valid because it
lacks the "system" part of the tuple, "-gnu" in this case.

As a reminder, a /valid/ tuple should match "arch-vendor-os", where:
- "arch" is the architecture name, eg.: arm, mips, i386, powerpc...
- "vendor" is whatever you see fit (no dash, no space), eg. unknown, pc...
- "os" is either one of:
  - the target Operating System, eg. cygwin, osf...
  - "kernel-system", where:
    - "kernel" is the running kernel
    - "system" is the variant (C library)

This is why, traditionaly, glibc-based Linux system have tuples like:
arm-unknown-linux-gnu (or more recently, arm-unknown-linux-gnueabi for EABI)
i386-pc-linux-gnu, mips-foo-linux-gnu and so on... while uClibc-based Linux
system have tuples like arm-unknown-linux-uclibc (or for the ARM EABI:
arm-unknown-linux-uclibcgnueabi), i386-pc-linux-uclibc, mips-foo-linux-uclibc
and so on...

But yours seems to be "i386-redhat-linux", which once canonicalised with
"tools/config.sub", gives "i386-redhat-linux-gnu".

All in all, that will need fixing as well. But later, I don't have time right
now (it's 23:30 here in France, and I'm tired). Unless you care enough to
come up with a patch (will be in scripts/, around lines 309-322).

> Build is now running happily on my Fedora8 linux pc, no problems so far.

What was the final outcome of the build?

Yann E. MORIN.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
Index: ct-ng.trunk/scripts/
--- ct-ng.trunk/scripts/	(revision 1247)
+++ ct-ng.trunk/scripts/	(working copy)
@@ -281,7 +281,7 @@
     # Determine build system if not set by the user
     CT_Test "You did not specify the build system. That's OK, I can guess..." -z "${CT_BUILD}"
     case "${CT_BUILD}" in
-        "") CT_BUILD=$(gcc -dumpmachine);;
+        "") CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine);;
         *)  CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}");;

For unsubscribe information see

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