Bläddra i källkod

Fixing issue with STB image and GCC5

Josh Engebretson 8 år sedan
förälder
incheckning
1bb4c89768
2 ändrade filer med 5 tillägg och 6 borttagningar
  1. 0 5
      Source/AtomicNET/NETNative/CMakeLists.txt
  2. 5 1
      Source/ThirdParty/STB/stb_image.c

+ 0 - 5
Source/AtomicNET/NETNative/CMakeLists.txt

@@ -30,11 +30,6 @@ endif ()
 target_link_libraries(AtomicNETNative AtomicApp AtomicNETScriptBindings AtomicNETScript AtomicJS AtomicPlayerLib AtomicPlayerJS Atomic)
 target_include_directories(AtomicNETNative PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 
-if (LINUX)
-    #https://github.com/nothings/stb/issues/280
-    target_link_libraries(AtomicNETNative gcc_s gcc)
-endif()
-
 if (APPLE)
     if (NOT IOS)
         target_link_libraries( AtomicNETNative "-stdlib=libc++ -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreVideo -framework ForceFeedback -framework IOKit -framework OpenGL -framework CoreServices -framework Security")

+ 5 - 1
Source/ThirdParty/STB/stb_image.c

@@ -195,7 +195,11 @@ static int stbi__sse2_available()
 {
 #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 // GCC 4.8 or later
    // GCC 4.8+ has a nice way to do this
-   return __builtin_cpu_supports("sse2");
+   // ATOMIC BEGIN
+   // We only do 64 bit Linux, and all x64 have sse2
+   // this was causing a problem: https://github.com/nothings/stb/issues/280
+   return 1;//__builtin_cpu_supports("sse2");
+   // ATOMIC END
 #else
    // portable way to do this, preferably without using GCC inline ASM?
    // just bail for now.