Fix Linux build.

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>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af68576..15c0c1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,10 +154,6 @@
     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")
diff --git a/src/OpenGL/libEGL/main.cpp b/src/OpenGL/libEGL/main.cpp
index c850610..386c3ea 100644
--- a/src/OpenGL/libEGL/main.cpp
+++ b/src/OpenGL/libEGL/main.cpp
@@ -643,7 +643,7 @@
 	this->clientGetCurrentContext = egl::getCurrentContext;
 }
 
-extern "C" EGLAPI LibEGLexports *libEGL_swiftshader()
+extern "C" LibEGLexports *libEGL_swiftshader()
 {
 	static LibEGLexports libEGL;
 	return &libEGL;
diff --git a/src/OpenGL/libGLESv2/entry_points.cpp b/src/OpenGL/libGLESv2/entry_points.cpp
index 378f9fe..05afd49 100644
--- a/src/OpenGL/libGLESv2/entry_points.cpp
+++ b/src/OpenGL/libGLESv2/entry_points.cpp
@@ -1420,7 +1420,7 @@
 	this->createFrameBuffer = ::createFrameBuffer;
 }
 
-extern "C" GL_APICALL LibGLESv2exports *libGLESv2_swiftshader()
+extern "C" LibGLESv2exports *libGLESv2_swiftshader()
 {
 	static LibGLESv2exports libGLESv2;
 	return &libGLESv2;