Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18435 - php floating point conversions (sprintf) fails on march=pentium4 mcpu=pentium4 works
Summary: php floating point conversions (sprintf) fails on march=pentium4 mcpu=pentium...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Docs Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-29 13:15 UTC by Joshua Moore-Oliva
Modified: 2003-06-24 06:02 UTC (History)
1 user (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 Joshua Moore-Oliva 2003-03-29 13:15:41 UTC
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" FAILS 
 
CFLAGS="-mcpu=pentium4 -O2 -pipe -fomit-frame-pointer" SUCCEEDS 
 
I'm not sure if it was recompilation of php or recompilation of glibc that fixed this (I 
compiled my entire system from scratch) but possibly march=pentium4 should be 
labelled as not-working for php and glibc? 
 
Josh. 

Reproducible: Always
Steps to Reproduce:
1.	Compile system on pentium4 with -march=pentium4 
2.	printf( "%.2f", 10.75 ); will output 0.00 
Actual Results:  
printf( "%.2f", 10.75 ); will output 0.00 

Expected Results:  
printf( "%.2f", 10.75 ); will output 10.75 

CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" FAILS 
 
CFLAGS="-mcpu=pentium4 -O2 -pipe -fomit-frame-pointer" SUCCEEDS
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-03-29 19:54:41 UTC
See /etc/make.conf:
# ATHLON-4 will generate invalid SSE instructions; use 'athlon' instead.
# PENTIUM4 will generate invalid instructions; use 'pentium3' instead.

I'm tempted to want
Status: CLOSED
Resolution: INVALID

But I wonder if some checks in emerge to catch users doing this would be worthwhile? I think maybe spew an error and tell them to go and fix it.
Comment 2 Joshua Moore-Oliva 2003-03-29 22:15:46 UTC
Yes, i think that would be a good idea...  exactly what I was suggesting. 
 
I only saw the pentium4 thing AFTER I had the problem :) 
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2003-03-30 14:44:55 UTC
docs-team: please add this into FAQ !

See /etc/make.conf:
# ATHLON-4 will generate invalid SSE instructions; use 'athlon' instead.
# PENTIUM4 will generate invalid instructions; use 'pentium3' instead.

Comment 4 Jorge Paulo (RETIRED) gentoo-dev 2003-06-08 10:31:36 UTC
This seems redundant to me.  CFLAGS is set in /etc/make.conf and there is a clear warning in the file regarding this issue.  None-the-less, if there still is a need to add this into the FAQ, how to proceed?

Do we want this added under: "How can I set a global configuration for compiling packages?" -- perhaps as a note?

Or, do we want to add a new entry (question) with this info?

I'll wait to hear some feedback.  Personally, I'm tempted to close it with a resolution of INVALID.
Comment 5 Joshua Moore-Oliva 2003-06-08 10:36:02 UTC
Yes, you can set it as invalid if you wish, there doesn't seem to be a lot more you can do about 
it. 
 
As for the warnings in /etc/make.conf, I believe that I didn't notice when the warnings were 
added during a configuration merge. 
 
The only suggestion I could make is for the ebuild to check if march=pentium4 was set and 
refuse to build or possibly issue some warnings during emerge. 
 
Josh. 
Comment 6 John Davis (zhen) (RETIRED) gentoo-dev 2003-06-24 06:02:57 UTC
setting to invalid then