Ticket #2329: cpu-flags.diff

File cpu-flags.diff, 1.2 KB (added by fabio, 10 years ago)

actual patch

  • build/premake/premake4.lua

    What: see http://trac.wildfiregames.com/ticket/2329
    When: 2013-12-29
    Who: Fabio Pedretti
    
     
    268268                    }
    269269                end
    270270
    271                 if arch == "x86" or arch == "amd64" then
    272                     buildoptions {
    273                         -- enable SSE intrinsics
    274                         "-msse"
    275                     }
    276                 end
    277 
    278271                if os.is("linux") or os.is("bsd") then
    279272                    linkoptions { "-Wl,--no-undefined", "-Wl,--as-needed" }
    280273                end
     
    282275                if arch == "x86" then
    283276                    buildoptions {
    284277                        -- To support intrinsics like __sync_bool_compare_and_swap on x86
    285                         -- we need to set -march to something that supports them
    286                         "-march=i686"
     278                        -- we need to set -march to something that supports them (i686).
     279                        -- We use pentium3 to also enable other features like mmx and sse,
     280                        -- while tuning for generic to have good performance on every
     281                        -- supported CPU.
     282                        -- Note that all these features are already supported on amd64.
     283                        "-march=pentium3 -mtune=generic"
    287284                    }
    288285                end
    289286            end