Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 175264

Summary: Default -mcpu breaks compile for Generic system type
Product: Gentoo Linux Reporter: Bryan Østergaard (RETIRED) <kloeri>
Component: New packagesAssignee: Daniel Drake (RETIRED) <dsd>
Status: RESOLVED FIXED    
Severity: normal CC: alpha, grknight2k, kernel
Priority: High    
Version: unspecified   
Hardware: Alpha   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Suggested patch changing mcpu for generic system type
Alpha linux-headers diff to fix asm
Alpha kernel sources asm patch

Description Bryan Østergaard (RETIRED) gentoo-dev 2007-04-19 19:55:34 UTC
gcc-4.1 emits .arch ev5 directives when using -mcpu less than ev56 which in turn breaks compiling of generic system type alpha kernels.

See http://lists.debian.org/debian-alpha/2006/11/msg00014.html and http://gcc.gnu.org/ml/gcc/2005-07/msg00371.html threads for lots of details on this problem.

I suggest simply changing mcpu=ev5 to mcpu=ev56 in arch/alpha/Makefile for generic system type to solve this.
Comment 1 Bryan Østergaard (RETIRED) gentoo-dev 2007-04-19 19:56:44 UTC
Created attachment 116756 [details, diff]
Suggested patch changing mcpu for generic system type
Comment 2 Brian Evans 2007-04-20 12:42:46 UTC
Hi, I've been working with kloeri on this as I'm soon to be an AT for alpha.

I read through the posts mentioned in kloeri's comments.

It seems that gcc4+ ignores the compile as (-Wa,m(arch)) when -mcpu=(arch) is used.  Many times this would not be an issue due to greater than or equal arches.

Alpha Kernel is done differently and compiles for a lesser arch than the assembler is looking for.  As such, propose 2 diffs to fix this issue.

One for linux-headers and another for sources.
Comment 3 Brian Evans 2007-04-20 12:45:32 UTC
Created attachment 116790 [details, diff]
Alpha linux-headers diff to fix asm
Comment 4 Brian Evans 2007-04-20 12:46:16 UTC
Created attachment 116791 [details, diff]
Alpha kernel sources asm patch
Comment 5 Bryan Østergaard (RETIRED) gentoo-dev 2007-04-23 13:19:14 UTC
Comment on attachment 116756 [details, diff]
Suggested patch changing mcpu for generic system type

First patch obsoleted by new patches from Brian Evans.
Comment 6 Brian Evans 2007-04-30 13:20:10 UTC
vanilla-sources 2.6.21 fixes this issue
Comment 7 Ricardo Salveti 2007-05-04 02:07:43 UTC
I searched at the Linus' tree and found the commit that probably fix this problem:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=88ed39b064575b4f42ecb737ec2daa66717de173;hp=7fc1a1abc1eca1278d6d37ec54b72005d15b5c1e

I download it and the patch was successfully applied on 2.6.20.
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2007-06-12 13:24:19 UTC
alpha marked 2.6.21 stable so I assume we can close this now