Opened 11 years ago

Closed 11 years ago

#1894 closed defect (fixed)

NVTT OptimalOptions.cmake assumes x86_64 implies athlon64

Reported by: Francis Herne Owned by: leper
Priority: Should Have Milestone: Alpha 15
Component: Build & Packages Keywords:
Cc: Patch:

Description (last modified by historic_bruno)

As in summary; libraries/source/nvtt/src/cmake/OptimalOptions.cmake contains the section copied below. This prevents pyrogenesis from starting after compilation on my Pentium D processor, as -march=athlon64 is not valid. Removing the '-march=athlon64', or the entire section, resoves the problem.

Thanks to those on IRC! :-)

IF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
                SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=athlon64")
                #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=athlon64 -msse3")
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")

Change History (8)

comment:1 by historic_bruno, 11 years ago

Description: modified (diff)

This should be reported upstream as well: http://code.google.com/p/nvidia-texture-tools/issues/list

in reply to:  1 ; comment:2 by historic_bruno, 11 years ago

Replying to historic_bruno:

This should be reported upstream as well: http://code.google.com/p/nvidia-texture-tools/issues/list

And it has been: Issue 188

in reply to:  2 comment:3 by Francis Herne, 11 years ago

Replying to historic_bruno:

Replying to historic_bruno:

This should be reported upstream as well: http://code.google.com/p/nvidia-texture-tools/issues/list

And it has been: Issue 188

By me (some time ago), in response to your first comment ;-)

comment:4 by fabio, 11 years ago

Milestone: BacklogAlpha 14

comment:5 by historic_bruno, 11 years ago

Milestone: Alpha 14Alpha 15

Unsure whether it's best to remove the -march option or set it to native (which may still break cross compiling), but it only affects a few people so I'm bumping it to A15.

comment:6 by fabio, 11 years ago

Using -march=native may help here but the risulting binaries won't work on any other CPU, leading for sure to other bug reports difficult to identify (all Linux distribution will break, also it won't fix #1994). Also there is no point in using native only on nvtt (which it's not a critical component for end user performance), while 0ad itself and other libs are not using it. Who want to use native and other system specific features can enable them theirself (see Gentoo users), anyway this usually leads to very small performance gain, especially on 64 bit platforms where the base CPU is not so old as the 386 on 32 bit.

So I'd really won't use native and suggest to remove the -march as soon as possible.

comment:7 by historic_bruno, 11 years ago

Sounds reasonable and Philip agrees :)

comment:8 by leper, 11 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 13806:

Fix nvtt build on Pentium D processors. Fixes #1894.

Note: See TracTickets for help on using tickets.