config-patches
[Top][All Lists]
Advanced

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

guess x86_64-(unknown->pc)-linux-gnu, to match config.sub?


From: Alexandre Oliva
Subject: guess x86_64-(unknown->pc)-linux-gnu, to match config.sub?
Date: Tue, 23 Jun 2015 16:04:00 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi, Ben, long time no see!

config.sub canonicalizes x86_64-linux-gnu to x86_64-pc-linux-gnu:

        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
        i*86 | x86_64)
          basic_machine=$basic_machine-pc

but config.guess still guesses x86_64-unknown-linux-gnu:

    x86_64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;

This causes a minor issue when say gcc is configured with
--target=x86_64-linux-gnu: build and host will be guessed with -unknown,
but the target will be canonicalized to -pc-, a different string, which
in turn has the effect of disabling bootstrap.

Maybe that's what it should do whenever --target is explicitly
specified, following autoconf 2.5x guidelines, but so far it doesn't,
and then this accidental difference ends up making
--target=x86_64-linux-gnu natives different from any other
--target=*-linux-gnu native.

Anyway, how about changing config.guess to match config.sub, like this?

diff --git a/config.guess b/config.guess
index f7eb141..2300e28 100755
--- a/config.guess
+++ b/config.guess
@@ -1038,7 +1038,7 @@ EOF
        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}

Thanks,

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]