Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627890 - sys-kernel/gentoo-sources-4.12.5: Error: instruction `andn' isn't supported in 16-bit mode.
Summary: sys-kernel/gentoo-sources-4.12.5: Error: instruction `andn' isn't supported i...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL: https://bugzilla.kernel.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-14 21:35 UTC by Alex
Modified: 2017-12-29 18:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel config (kernel-config.txt,90.84 KB, text/plain)
2017-08-14 22:06 UTC, Alex
Details
/proc/cpuinfo (cpuinfo.txt,4.43 KB, text/plain)
2017-08-14 22:07 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2017-08-14 21:35:05 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....
------------------------------------------------------------

There's neither boot image in /boot, nor modules in /lib/modules installed.

I've never seen errors like that before, and have no idea how to fix or debug this issue...

Regards,
Alex
Comment 1 Alex 2017-08-14 22:06:54 UTC
Created attachment 489092 [details]
Kernel config
Comment 2 Alex 2017-08-14 22:07:22 UTC
Created attachment 489094 [details]
/proc/cpuinfo
Comment 3 Alex 2017-08-15 22:14:59 UTC
My compiling options:

KCFLAGS="-O2 -march=native -fno-stack-protector -fomit-frame-pointer" KCPPFLAGS=$KCFLAGS KCXXFLAGS=$KCFLAGS make -j4 && make modules_install && make install 2>&1

Also tried with "-O3" and without any "-O" -- same error.
Comment 5 Alex 2017-08-18 20:44:36 UTC
The bug finally landed here https://sourceware.org/bugzilla/show_bug.cgi?id=21965

4.12.5 builds on i3-7300 with gcc-5.4.0 and '--march=broadwell'

Looks like sys-devel/gcc needs some update for Kaby Lakes...

Regards,
Alex
Comment 6 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-09-14 02:09:07 UTC
is this still a problem ? have you tried with recent gcc version ?
Comment 7 Alex 2017-09-14 06:33:11 UTC
(In reply to Alice Ferrazzi from comment #6)
> is this still a problem ? have you tried with recent gcc version ?

It's not a problem in the way that I found a workaround for it, see above.
I will try again with the recent kernel update, with sys-devel/gcc-5.4.0-r3 
But as I understand from gcc patches, building with "-march=native" on Kaby Lakes requires gcc-7 which is masked in portage.
Comment 8 Alex 2017-12-29 14:12:22 UTC
GCC-6.4 works with "-march=skylake"
"-mach=native" seems resulting into "-march=broadwell -mtune=generic"
Comment 9 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-12-29 18:32:48 UTC
you need to open a bug to gcc for this