From: YunQiang Su <y...@wavecomp.com> MIPS r6 triples use different CPU as the previous version, mipsisa64r6, mipsisa64r6el, mipsisa32r6, mipsisa32r6el.
Our port also use gnuabi64/gnuabin32 for GNU LIBC. This change is only for GLIBC, as some other libc use the current CPU name, such as openwrt etc. --- config.guess | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/config.guess b/config.guess index 8ef92de..659566e 100755 --- a/config.guess +++ b/config.guess @@ -985,22 +985,52 @@ EOF exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef MIPS_ENDIAN + #undef MIPS_ISA + #undef MIPS_BITS_REV + #undef ABI64 + #undef LIBC + #undef mips + #define LIBC ${LIBC} #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + #define MIPS_ENDIAN el #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + #define MIPS_ENDIAN + #endif + #if defined(__mips_isa_rev) && (__mips_isa_rev>=6) && ${IS_GLIBC} + #define MIPS_ISA isa + #if defined(__mips64) + #define MIPS_BITS_REV 64r6 + #else + #define MIPS_BITS_REV 32r6 + #endif + #else + #define MIPS_ISA + #if defined(__mips64) + #define MIPS_BITS_REV 64 + #else + #define MIPS_BITS_REV + #endif + #endif + #if defined(__mips) + CPU=mips MIPS_ISA MIPS_BITS_REV MIPS_ENDIAN #else CPU= #endif + #if defined(_ABI64) + ABI64=abi64 + #elif defined(_ABIN32) + ABI64=abin32 #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU' | sed 's/ //g'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^ABI64'` + test x"${CPU}" != x && test x"${LIBC}" != xgnu && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}${ABI64}"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" -- 2.20.1 _______________________________________________ config-patches mailing list config-patches@gnu.org https://lists.gnu.org/mailman/listinfo/config-patches