Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252800 - genkernel-3.4.10-r2: CFLAGS=" -march=i586" or CFLAGS="-march=C3" should not require support for cmov
Summary: genkernel-3.4.10-r2: CFLAGS=" -march=i586" or CFLAGS="-march=C3" should not ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-28 11:17 UTC by Christian
Modified: 2008-12-29 00:06 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian 2008-12-28 11:17:49 UTC
there is a bug in the Kernel compilation when defining 
CFLAGS=" -march=i586" or CFLAGS="-march=C3" in make.conf

The compiled kernel requires support for CMOV from the CPU which is a pure i686 feature. (=should be only enabled if march=i686 has been defined)
As a result no kernal code can run on i586 or C3 CPUs.

Can you please provide a quick workaround for genkernel-3.4.10-r2 and file a bug for the vanilla kernel since this seems to be also wrong in the vanilla kernel.

Reproducible: Always

Steps to Reproduce:
1. Compile a Kernel with CFLAGS=" -march=i586" or CFLAGS="-march=C3"
2. Run the Kernel on a i586 or Via C3 CPU


Actual Results:  
Kernel does not run since it requires support of cmov from the CPU

Expected Results:  
Expected result: Kernel DOES run on a i586 or C3 CPU
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-28 19:10:15 UTC
What makes you think this has anything to do with the kernel sources or genkernel? If -march=i586 generates CMOV instructions, it's because gcc is doing something stupid.

Does the kernel build system even accept externally defined CFLAGS?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-12-28 21:47:12 UTC
Genkernel does not pass the cflags to the kernel - you must select the correct cpu target in the kernel configuration: CONFIG_MVIAC7 or CONFIG_MVIAC3_2 depending on your system. If you have a non-CMOV C3, that's actually the VIA C7 in the kernel.

agaffney: mark invalid I think
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2008-12-29 00:06:13 UTC
That's what I figured.