OSDN Git Service

Fix Linux build.
authorNicolas Capens <capn@google.com>
Wed, 25 Apr 2018 20:26:17 +0000 (16:26 -0400)
committerNicolas Capens <nicolascapens@google.com>
Wed, 25 Apr 2018 21:00:18 +0000 (21:00 +0000)
We don't need protected visibility because we now have a version script
which hides all symbols except the ones we want to export.

Fixes ld linker errors:
 relocation R_X86_64_PC32 against protected symbol `libEGL_swiftshader' can not be used when making a shared object
 relocation R_X86_64_PC32 against protected symbol `libGLESv2_swiftshader' can not be used when making a shared object

Change-Id: I059c4b03f2523bf8caf08180b02a349d3cf7b2f2
Reviewed-on: https://swiftshader-review.googlesource.com/18708
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
CMakeLists.txt
src/OpenGL/libEGL/main.cpp
src/OpenGL/libGLESv2/entry_points.cpp

index af68576..15c0c1f 100644 (file)
@@ -154,10 +154,6 @@ else()
     set_cpp_flag("-Werror=sign-compare")
     set_cpp_flag("-fno-exceptions")
 
-    # Don't allow symbols to be overridden by another module.
-    # This enables libGLES_CM and libGLESv2 to statically link LLVM.
-    set_cpp_flag("-fvisibility=protected")
-
     # Remove xor, and, or and friends from the list of keywords, they are used
     # by Reactor
     set_cpp_flag("-fno-operator-names")
index c850610..386c3ea 100644 (file)
@@ -643,7 +643,7 @@ LibEGLexports::LibEGLexports()
        this->clientGetCurrentContext = egl::getCurrentContext;
 }
 
-extern "C" EGLAPI LibEGLexports *libEGL_swiftshader()
+extern "C" LibEGLexports *libEGL_swiftshader()
 {
        static LibEGLexports libEGL;
        return &libEGL;
index 378f9fe..05afd49 100644 (file)
@@ -1420,7 +1420,7 @@ LibGLESv2exports::LibGLESv2exports()
        this->createFrameBuffer = ::createFrameBuffer;
 }
 
-extern "C" GL_APICALL LibGLESv2exports *libGLESv2_swiftshader()
+extern "C" LibGLESv2exports *libGLESv2_swiftshader()
 {
        static LibGLESv2exports libGLESv2;
        return &libGLESv2;