Cross-compilers.

Ralf Corsepius rc040203 at freenet.de
Mon Sep 18 16:16:23 UTC 2006


On Mon, 2006-09-18 at 10:50 -0500, Rex Dieter wrote:
> Ralf Corsepius wrote:
> 
> > On Mon, 2006-09-18 at 09:56 +0100, David Woodhouse wrote:
> 
> >>  I don't recall it screwing that up, but again I
> >> haven't tried this recently. If it broke, file a bug. I suspect it's a
> >> problem with redhat-rpm-config instead of rpm itself.
> 
> > %configure passes --target=noarch-redhat-linux to configure for noarch
> > packages - The issue is known to RH developers for quite a while, but 
> 
> Maybe you could enlighten me on why/how --target=noarch-redhat-linux is
> wrong or why this *is* an issue?.  I've used it (successfully, I might add)
> on a few occasions to generate .noarch rpms.
Because,

1) In autoconf terms, --target is the target-tuple of a cross tool.
It is very rarely useful at all (only by cross-tools), so passing it on
to configure call is very questionable and rare used, and even less
often required.

2) The tool to check for validity of an architecture being utilized by
the autotools is "config.sub". It contains a list of valid
architectures, and (correctly) rejects noarch-<*>, because the initial
part of a target tuple (CPU-MANUFACTURER-OS) is supposed to contain a
valid cpu. noarch isn't one.


I.e. there are at least different issues at once:

a) broken configure scripts which mix up target/host/build.
This is the typical case which triggers this break down in packages.
AFAICT, several mono packages suffer from this issue.

b) rpm passing an incorrect value to --target. 
"none" is the value config.sub has reserved for such purposes.

c) rpm passing --target at all. It is very rarely used at all nor
required at all. Not even building a native GNU toolchain needs it.
David would need to override it for his multi-target binutils, I need it
for my cross-compilers.

Ralf












More information about the fedora-devel-list mailing list