config.guess manufacturer string?

Panu Matilainen pmatilai at laiskiainen.org
Wed Feb 18 19:55:59 UTC 2009


On Wed, 18 Feb 2009, Dan Nicholson wrote:

> On Wed, Feb 18, 2009 at 9:13 AM, Stepan Kasal <skasal at redhat.com> wrote:
>>
>> Actually, if you care about the host triplet used for rpm builds,
>> that's something where config.guess is not directly involved.
>>
>> Most spec files call %configure.  That macro calls configure with
>> option --build.  With that option given, configure does not call
>> config.guess.
>>
>> So it is possible that you would be satisfied if the %configure macro
>> used
>>  ./configure  --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu
>>
>> To achive that, it is sufficient to modify the macro %{_host}.
>> (Macro %{_host_vendor} should probably be modified as well.)
>>
>> No, I do not see the reason for doing this.  Should all Linux
>> distributions do the same?
>
> I think most distributions do set the --build correctly for how
> they've configured their systems. Regardless of whether the redhat is
> there or not, %configure should be setting --build and --host at least
> the same as --target. Instead, rpm passes the values that _it_ was
> built with as --build and --host.

Indeed, which pretty much comes to the bottom of why I'm asking.
Older rpm tarballs were generated on a system where config.guess was 
patched to give "redhat" as the manufacturer. And from that, through 
several twists and turns it ended up in %configure --target and the like, 
until recently.

That's by no means the only thing that rpm "leaks" to the overall 
configuration either, but that's another story...

> $ rpm -E%configure | grep -e --build -e --host -e --target
>  ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu \
>        --target=x86_64-redhat-linux-gnu \
>
> The advantage of setting --build correctly is that autoconf macros
> will use test against the triplet will work as expected. For instance
> AC_PROG_CC will search for gcc with the host triplet prefixed. Right
> now, it searches for x86_64-unknown-linux-gnu-gcc. That's not how gcc
> is installed on fedora (nor with the -gnu, but that's a separate
> matter).

Right, there's /usr/bin/x86_64-redhat-linux-gcc instead, and quite 
obviously the build tools should be configured to match within the distro. 
But where does the redhat in the gcc name come from? If it's an rpm macro 
like %{_vendor} it pretty much comes back a full circle to some extra 
heuristics in rpm configure.ac which triggers on certain results of 
config.guess... :)

 	- Panu -




More information about the fedora-devel-list mailing list