Skip to content

Commit f3e2ece

Browse files
committedMar 4, 2017
CMake: don't pass -fPIC or -shared-libgcc.
-fPIC interferes with cmake's own PIC mechanism. -shared-libgcc is just unnecessary.
1 parent bea91ac commit f3e2ece

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
1818
set(EXTRA_WARNINGS "-Wcast-align -Winit-self -Wmissing-declarations")
1919
set(EXTRA_WARNINGS "${EXTRA_WARNINGS} -Wswitch -Wwrite-strings")
2020
endif()
21-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ${EXTRA_WARNINGS} -std=c++11 -fPIC")
21+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ${EXTRA_WARNINGS} -std=c++11")
2222
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
23-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -shared-libgcc -ggdb")
23+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
2424
set(CMAKE_LINK_FLAGS "-ggdb")
2525
endif()
2626
if(MSYS)

0 commit comments

Comments
 (0)