Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21667 - Replacing -march=pentium4 in mozilla ebuilds outdated.
Summary: Replacing -march=pentium4 in mozilla ebuilds outdated.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-25 09:57 UTC by Sindre Aamås
Modified: 2004-04-26 15:39 UTC (History)
2 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 Sindre Aamås 2003-05-25 09:57:04 UTC
The -march=pentium4 problem seems to be generally solved in gcc-3.2.3 and
gcc-3.3, so -march=pentium4 shouldn't be replaced with -march=pentium3 for
>=gcc-3.2.3. This applies for the mozilla/firebird/phoenix ebuilds, and probably
for any other ebuilds where -march=pentium4 is replaced.

I have successfully compiled mozilla with -march=pentium4 using gcc-3.2.3-r1.

This is the part of the mozilla ebuild that needs to be changed:
if [ "$(gcc-major-version)" -eq "3" ]
	then
		# Currently gcc-3.2 or older do not work well if we specify "-march"
		# and other optimizations for pentium4.
		export CFLAGS="${CFLAGS/-march=pentium4/-march=pentium3}"
		export CXXFLAGS="${CXXFLAGS/-march=pentium4/-march=pentium3}"

This should be adjusted to only apply for gcc-versions older than gcc-3.2.3.

Reproducible: Always
Steps to Reproduce:
1. Install gcc-3.2.3 or newer on a pc with an Intel Pentium4 processor.
2. Edit your CFLAGS to include -march=pentium4.
3. Edit the mozilla ebuild to not replace -march=pentium4 with -march=pentium3.
Then emerge mozilla. It should work without a problem.

Actual Results:  
Emerged and ran successfully.

Expected Results:  
Should have given me an error when compiling, or other errors after, if the
-march=pentium4 replacement was needed.
Comment 1 Nick Fish 2003-06-11 18:31:25 UTC
I've had -march=pentium4 ever since I installed Gentoo on my new workstation.  I bootstrapped with gcc-3.2.3.  I haven't had any stability or otherwise atypical problems.

#cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 15
model		: 2
model name	: Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping	: 7
cpu MHz		: 3066.576
cache size	: 512 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips	: 6094.84
Comment 2 Martin Mokrejš 2004-02-08 14:48:01 UTC
Are you sure you compiled mozilla with those CFLAGS? Mozilla overrides CFLAGS as it has hardcoded some options. Follow http://bugzilla.mozilla.org/show_bug.cgi?id=232748 .
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2004-04-25 17:15:19 UTC
I work on the mozilla ebuilds but don't have pentium4 expertise.  I'll ask somebody in Gentoo who does to comment on this bug
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-04-25 17:20:03 UTC
Sounds like we need a has_version test for the broken versions of gcc for pentium4
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2004-04-26 15:39:01 UTC
Fixed in mozilla-1.7_rc1 and mozilla-firefox-0.8-r3 ... I don't think this is worth bothering to change in mozilla-1.6.  Thanks!