config.guess manufacturer string?
Panu Matilainen
pmatilai at laiskiainen.org
Thu Feb 19 08:39:42 UTC 2009
On Thu, 19 Feb 2009, Ralf Corsepius wrote:
> Panu Matilainen wrote:
>> 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.
>
>>> 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.
> Please elaborate.
>
> Unlike you're saying, it's actually not obvious.
>
> /usr/bin/x86_64-redhat-linux-gcc only exists as legacy being installed in
> parallel to /usr/bin/gcc for cases where people are violently passing
> --build/--host/--target (such as current rpm).
Legacy? Okay, but due to the current messup with redhat/pc/unknown, not
even rpm causes that name to be searched for. Look, I'm asking here
because I don't know how this stuff is supposed to be set up, my "looks
obviously wrong" is just layman observation of a mismatch of "stuff".
Hmm, so gcc gets the name for passing %{_target_platform} as --target to
configure. Which in turn is something else than %{_target} (which is
something rpm uses this for it's internal purposes), which is still
different from %{_build}, nice little mess...
[pmatilai at localhost ~]$ rpm --eval "%{_target}"
x86_64-linux
[pmatilai at localhost ~]$ rpm --eval "%{_build}"
x86_64-unknown-linux-gnu
[pmatilai at localhost ~]$ rpm --eval "%{_target_platform}"
x86_64-redhat-linux-gnu
I'm getting somewhat mixed signals in this thread as to what %configure
should do. Is it
a) set *none* of --build, --target and --host (how do you set up a
cross-build environment if that's the case?)
b) set only --build and add some conditional extra macros for passing in
cross-build options
c) something else, what exactly?
And then related to above the manufacturer string, which is currently a
complete mixup between rpm's notion of "vendor" and config.guess notion of
"manufacturer", largely due to this:
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
[pmatilai at localhost ~]$ rpm --eval "%{_target_vendor}"
unknown
[pmatilai at localhost ~]$ rpm --eval "%{_vendor}"
redhat
If the answer to the above %configure question is a), this doesn't make
much of a difference I guess, except perhaps to gcc which is passing
explicit --target %{_target_platform} (whether that can be dropped then or
not I dunno). In case it's b) this is much more visible: do we want the
"redhat" there or not?
- Panu -
More information about the fedora-devel-list
mailing list