Bug 190534 - sci-physics/cernlib-2006 completely ignores CFLAGS & FFLAGS on sparc and chooses very bad defaults.
Bug#: 190534 Product:  Gentoo Linux Version: 2006.1 Platform: Sparc
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: sci-physics@gentoo.org Reported By: fmccor@gentoo.org
Component: Applications
URL: 
Summary: sci-physics/cernlib-2006 completely ignores CFLAGS & FFLAGS on sparc and chooses very bad defaults.
Keywords:  
Status Whiteboard: 
Opened: 2007-08-28 14:28 0000
Description:   Opened: 2007-08-28 14:28 0000
sci-physics/cernlib-2006 does build on sparc.  However, it ignores CFLAGS (and
FFLAGS) from make.conf, substituting its own defaults.  For CFLAGS, it forces
-O3 (in general, not a good idea) ignores -mcpu= from make.conf CFLAGS, and
even sometimes FORCES -mcpu=v7.  This results in building the C portion for
essentially an SS2 and quite suboptimal performance on any sparc system anyone
is likely to have.

Fortran build is similar, although I did not notice any forced -mcpu=v7 flags.

Since it builds, I'm giving it ~sparc for testing, but it really should use my
CFLAGS/FFLAGS, not what it thinks I need unless there is some compelling reason
to do otherwise.  Please see Bug 59506 for an explanation.

------- Comment #1 From Ferris McCormick 2007-08-28 15:18:55 0000 -------
Add CC sparc. 

------- Comment #2 From Sébastien Fabbro 2007-08-28 18:52:51 0000 -------
I will take a deeper look how to enforce users CFLAGS/FFLAGS as well as a
decent src_test procedure. Useful for other arches anyway.

------- Comment #3 From Sébastien Fabbro 2007-09-03 15:58:12 0000 -------
just commited some cernlib fixes allowing user's flags and a src_test. Give it
a try when you can. I will also propagate these changes in other cernlib
packages (paw, geant, cernlib-montecarlo).

------- Comment #4 From Ferris McCormick 2007-09-17 13:57:37 0000 -------
(In reply to comment #3)
> just commited some cernlib fixes allowing user's flags and a src_test. Give it
> a try when you can. I will also propagate these changes in other cernlib
> packages (paw, geant, cernlib-montecarlo).
> 

That fixes the CFLAGS, thanks.  Also, it does run many tests now.  Apparently,
it runs them successfully (at least, src_test does not take the "die" branch,
and as far as I could tell from watching it run, everything reported success).

So far as I am concerned, this bug is fixed and you can close it.

Thanks for your help.