Bug 21965 - Kernel 4.12.5 compile fails -- Error: instruction `andn' isn't supported in 16-bit mode.
Summary: Kernel 4.12.5 compile fails -- Error: instruction `andn' isn't supported in 1...
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.28
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-17 21:25 UTC by Alex
Modified: 2017-08-18 09:53 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2017-08-17 21:25:41 UTC
Hi,

While usual kernel update from 4.9.34 to 4.12.5 it fails with the error:

-------------------------------------------------------------
/tmp/cc3rZjPi.s: Assembler messages:
/tmp/cc3rZjPi.s:32: Error: instruction `andn' isn't supported in 16-bit mode.
/tmp/cc3rZjPi.s:40: Error: instruction `shlx' isn't supported in 16-bit mode.
make[1]: *** [scripts/Makefile.build:302: arch/x86/boot/cpucheck.o] Error 1
make: *** [arch/x86/Makefile:281: bzImage] Error 2
make: *** Waiting for unfinished jobs....
------------------------------------------------------------

GNU assembler version 2.28 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.28 p1.2) 2.28

This bug here https://sourceware.org/bugzilla/show_bug.cgi?id=17421 seems to be similar.

My report on Gentoo bugtracker https://bugs.gentoo.org/show_bug.cgi?id=627890

My report with more detailed debug on kernel.org bugtracker https://bugzilla.kernel.org/show_bug.cgi?id=196689

Really, I don't know whose bug it actually is...

Sorry.

Regards,
Alex
Comment 1 H.J. Lu 2017-08-18 09:53:04 UTC
Don't compile kernel with -march=native or get your GCC fixed for

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80569