gmp{6.1.2, 6.2.0} config.guess detects wrong cpu type/instruction sets

Bernd Recktor bernd at recktor.de
Sun Sep 27 12:23:36 UTC 2020


Hello Torbjörn Granlund,

may You are right an i am wrong. It was the native build of gcc it self 
that failed after build gmp with used config.guess. the gcc build log says:

line 4719 ../../../libgcc/libgcc2.c:1956:26: internal compiler error: 
Illegal instruction

Look at the atatched gmp build log to see the configuration of gmp 
before gcc was build on a Pentium-Gold-G5400.

_here is the build environment for the working (generic) solution:_

running this in the gmp-6.2.1 source dir before doing anything else

cp -v configfsf.guess config.guess
cp -v configfsf.sub   config.sub

this should tell the pakage to generate generic (x86-64) libraries

CFLAGS=""

This way works fine but is poor


_Now the Buildenvironment with a native compilation and the use of 
config.guess in the gmp build:_

CFLAGS="-pipe -march=native -mtune=intel"
CXXFLAGS=${CFLAGS}

the result reports the error You see below 'illegal instruction'. thats 
what i named non executable.

any idea how to solve this ?

greetings Bernd

Am 26.09.20 um 16:30 schrieb Torbjörn Granlund:
> Bernd Recktor<software-entwicklung at recktor.de>  writes:
>
>    coffeelake processes from intel are affected. Specifically in my case
>    i9-9900KF and Pentium-Gold-G5400. The ./config.guess script recognizes
>    kabylake-pc-linux-gnu or kabylakenoavx-pc-linux-gnu. Both compilers
>    GCC-10.2 and GCC-8.3 recognize skylake using 'gcc -march = native -Q
>    --help = target | grep march'. If a Linux system is to be built
>    natively, then non-executable binaries are generated.
>
> Is it a hypotheses of yours that "non-executable binaries" are
> generated, or have you actually tried it.  In the latter case, please
> send us a complete bug report as per the instructions in the GMP manual.
>
> Skylake is older than Kaby lake which is older than Coffee lake.  So
> recognising Coffee Lake as Kaby lake coule be considered as less wrong
> than recognising is as Skylake.
>
> Now, as far as I know, Skylake and Kaby lake have the exact same
> instructions.  Coffeelake does not lack any instructions implemented in
> either.  That's why I am surprised by your claim of generation of
> "non-executable binaries".
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10-base-sys-gmp-6.1.2-build.log
Type: text/x-log
Size: 297691 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20200927/a4859aab/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14-base-sys-gcc-8.3.0-build.log
Type: text/x-log
Size: 764945 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20200927/a4859aab/attachment-0003.bin>


More information about the gmp-bugs mailing list