Opened 10 years ago

Closed 10 years ago

#492 closed defect (fixed)

-mtune=generic is not valid with g++ 3.4.3

Reported by: paulp Owned by: Olly Betts
Priority: normal Milestone: 1.0.22
Component: Build system Version: 1.2.2
Severity: trivial Keywords:
Cc: Blocked By:
Blocking: Operating System: All


With #487

AM_CXXFLAGS="$AM_CXXFLAGS -mfpmath=sse -msse2 -mtune=generic"

is set for i386 with SSE in the configure script. But at least for

g++ (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

on my

SunOS sun 5.10 Generic_142901-13 i86pc i386 i86pc

this is not valid:

error: bad value (generic) for -mtune= switch

The man page provided with the OS supplied g++ lists many specific cpus but no "generic".

Everything seems to work when I edit the Makefile to use a specific cpu-type or without the -mtune option.

Change History (2)

comment:1 by Olly Betts, 10 years ago

Milestone: 1.2.3
Status: newassigned

Ah yes, added in GCC 4.2 it seems:

Unfortunately when it was added was not mentioned in the GCC manual. I should have checked though - I've noticed before that it only sometimes says when a feature was added.

So a pre-configure workaround would be:

perl -pi -e 's/-mtune=generic//' configure

And a post-configure workaround (pretty much what you did by hand):

perl -pi -e 's/-mtune=generic//' Makefile tests/Makefile

I'll document that in the ReleaseNotes, and fix configure not to pass this for older GCC.

comment:2 by Olly Betts, 10 years ago

Operating System: SolarisAll
Resolution: fixed
Status: assignedclosed

Fixed in trunk r14787, backported to 1.0 r14788.

Note: See TracTickets for help on using tickets.