Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175264 - Default -mcpu breaks compile for Generic system type
Summary: Default -mcpu breaks compile for Generic system type
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: Alpha Linux
: High normal (vote)
Assignee: Daniel Drake (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-19 19:55 UTC by Bryan Østergaard (RETIRED)
Modified: 2007-06-12 13:24 UTC (History)
3 users (show)

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


Attachments
Suggested patch changing mcpu for generic system type (alpha-mcpu.patch,424 bytes, patch)
2007-04-19 19:56 UTC, Bryan Østergaard (RETIRED)
Details | Diff
Alpha linux-headers diff to fix asm (linux-headers-asm.diff,681 bytes, patch)
2007-04-20 12:45 UTC, Brian Evans
Details | Diff
Alpha kernel sources asm patch (gentoo-sources-asm-patch.diff,502 bytes, patch)
2007-04-20 12:46 UTC, Brian Evans
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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