Re: config.guess returns bogus triple on Linux/x86_64 bi-arch system

2022-05-08 Thread Dmitry V. Levin
On Sun, May 08, 2022 at 10:59:13PM +0200, Bruno Haible wrote: > Dmitry V. Levin wrote: > > I'd prefer to be on the safe side and have ABI=64 assigned by default > > somewhere before the eval. > > You're right, that is safer. > > > > + #endif > > > + #endif > > > +EOF > > > + cc_set_ab

Re: config.guess returns bogus triple on Linux/x86_64 bi-arch system

2022-05-08 Thread Bruno Haible
Dmitry V. Levin wrote: > I'd prefer to be on the safe side and have ABI=64 assigned by default > somewhere before the eval. You're right, that is safer. > > + #endif > > + #endif > > +EOF > > + cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | > > sed 's, ,,g'

Re: config.guess returns bogus triple on Linux/x86_64 bi-arch system

2022-05-08 Thread Dmitry V. Levin
On Sun, May 08, 2022 at 09:55:09PM +0200, Bruno Haible wrote: > Dmitry V. Levin wrote: > > Thanks, I agree with this approach in general, but could you rewrite the > > test to invoke the compiler just once, please? You can use cc_set_libc > > and cc_set_vars cases as examples. > > Sure. Find it a

Re: config.guess returns bogus triple on Linux/x86_64 bi-arch system

2022-05-08 Thread Bruno Haible
Dmitry V. Levin wrote: > Thanks, I agree with this approach in general, but could you rewrite the > test to invoke the compiler just once, please? You can use cc_set_libc > and cc_set_vars cases as examples. Sure. Find it attached. Tested with various GCC versions, clang, and tcc: $ ./config.gue

Re: testsuite: Add one more testcase

2022-05-08 Thread Dmitry V. Levin
On Sun, May 08, 2022 at 07:23:18PM +0200, Bruno Haible wrote: > I was surprised to see that there is no test case for i686-pc-linux-gnu. > Here's a proposed patch to add one. Applied, thanks. -- ldv

Re: config.guess returns bogus triple on Linux/x86_64 bi-arch system

2022-05-08 Thread Dmitry V. Levin
On Sun, May 08, 2022 at 07:25:34PM +0200, Bruno Haible wrote: > On Linux/x86_64, there are three ABIs that the kernel understands directly > (without qemu user): > - 64-bit, as produced by "gcc -m64", > - 32-bit (i686 code), as produced by "gcc -m32", > - 64-bit instructions with 32-bit point

config.guess returns bogus triple on Linux/x86_64 bi-arch system

2022-05-08 Thread Bruno Haible
On Linux/x86_64, there are three ABIs that the kernel understands directly (without qemu user): - 64-bit, as produced by "gcc -m64", - 32-bit (i686 code), as produced by "gcc -m32", - 64-bit instructions with 32-bit pointers, as produced by "gcc -mx32". The patch from 2020-06-15 "* config.gu

testsuite: Add one more testcase

2022-05-08 Thread Bruno Haible
I was surprised to see that there is no test case for i686-pc-linux-gnu. Here's a proposed patch to add one. >From 656717e268359595dda188ad6c18ca0ccadffc50 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 8 May 2022 19:18:13 +0200 Subject: [PATCH] testsuite: Add one more testcase. * testsu