Skip to content

Commit

Permalink
Remove unneeded librt causing issues during static compilation (stanf…
Browse files Browse the repository at this point in the history
…ord-centaur#333)

Linking with `librt` has not been needed since glibc 2.17, released in 2012. Adding this flag also causes CMake to mess up the linking command line when compiling the pono binary statically.
  • Loading branch information
CyanoKobalamyne authored Jul 10, 2024
1 parent b82d87e commit 6dead57
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ if (BISON_FOUND)
link_directories("${BISON_PARENT_DIR}/../lib/")
endif()

find_library(LIBRT rt)

message("-- FOUND FLEX EXECUTABLE: ${FLEX_EXECUTABLE}")
message("-- FOUND FLEX INCLUDE DIRS: ${FLEX_INCLUDE_DIRS}")

Expand Down Expand Up @@ -265,10 +263,6 @@ target_link_libraries(pono-lib PUBLIC "${GMP_LIBRARIES}")
target_link_libraries(pono-lib PUBLIC pthread)
target_link_libraries(pono-lib PUBLIC y)

if (LIBRT)
target_link_libraries(pono-lib PUBLIC ${LIBRT})
endif()

if (GOOGLE_PERF)
target_link_libraries(pono-lib PUBLIC ${GOOGLE_PERF})
endif()
Expand Down

0 comments on commit 6dead57

Please sign in to comment.