Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8965 - error in stage1 make.conf example
Summary: error in stage1 make.conf example
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-10 02:13 UTC by Brad Cowan (RETIRED)
Modified: 2003-02-04 19:42 UTC (History)
3 users (show)

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 Brad Cowan (RETIRED) gentoo-dev 2002-10-10 02:13:49 UTC
The stage1 make.conf example uses -mcpu=athlon-xp, If I'm reading the docs
correctly
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options

states that just using -mcpu=athlon-xp implies that -march=i386 and will create
code that schedules things correctly for the athlon-xp but will not create code
that won't run on an i386. -march=athlon-xp should be the correct flag as it
also implies -mcpu=athlon-xp. I am hoping that the stage 2 and 3 didn't get
rolled with
the flags set this way. This has caused me a major headache as I didn't notice
it at first and gcc randomly segfaulted on almost every major package.changing
to -march and recompiling solved this problem 100%
THX
Brad
Comment 1 Ulf Bartelt (RETIRED) gentoo-dev 2002-10-10 07:57:08 UTC
my understanding of the gcc docs is

    -march=XXX ==> -mcpu=XXX

not the other way round.

so using -march=XXX alone should (to my understanding) be the same as giving
both options.

-mcpu=XXX without any -march option should only influence command scheduling but
use i386 code.

-mcpu=XXX with -march=YYY should generate code for cpu YYY scheduled for cpu XXX
so if we assume no -march option meaning -march=i386, basically the same as above.

in no way i interprete the docs as -mcpu changes the value of -march to some
lesser cpu...

so i really am screwed here...

do *I* misinterprete the gcc docs?
Comment 2 Ulf Bartelt (RETIRED) gentoo-dev 2002-10-10 08:29:58 UTC
from the gcc-docs:

"""While picking a specific cpu-type will schedule things appropriately for that
particular chip, the compiler will *not* generate any code that does *not* run
on the i386 without the -march=cpu-type option being used."""

I interprete the double negation (marked with "*") as -mcpu=XXX alone will
produce code for i386, scheduled for the cpu XXX.

(English is not my 1st language, i might need help here...)
Comment 3 Brad Cowan (RETIRED) gentoo-dev 2002-10-10 15:15:13 UTC
I think you've got it, just saying that it needs to be -march= for full
optimization."so i really am screwed here..." does that mean the stages were
rolled with -mcpu?


Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2002-10-10 15:32:13 UTC
-mcpu=athlon-xp
implies
-march=i386

-march=athlon-xp
implies
-march=athlon-xp


-mcpu provides ALIGNMENT and instruction ordering that is best
exploited by the CPU specified, but is still only i386 code

-march enables arch specific code, and things like SSE, MMX, 3dNow
Comment 5 Brad Cowan (RETIRED) gentoo-dev 2002-10-22 04:31:55 UTC
When we redid the make.conf for the latest portage we still left this
example...can we change it please :)
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2002-11-12 18:50:20 UTC
The comments describe what it's for now.
Comment 7 Brad Cowan (RETIRED) gentoo-dev 2002-12-17 12:04:41 UTC
was resolved afaik