Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove static compilation from ncbi-fcs-gx #45141

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipes/ncbi-fcs-gx/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ requirements:
- grep >=3.4

build:
number: 2
number: 3
skip: True # [not linux or not x86_64]
run_exports:
- {{ pin_compatible('ncbi-fcs-gx', max_pin="0.5") }}
Expand Down
19 changes: 8 additions & 11 deletions recipes/ncbi-fcs-gx/no_static.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b2d24ff..007a3ac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -32,7 +32,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include/)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,6 @@
set(gx_VERSION_MINOR 0)

set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS "-DGIT_REVISION=`../../build-support/git_describe.sh`")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -ggdb3 -DDEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -static -O2 -DNDEBUG") # TODO: investigate whether can/should enable -march=x86-64-v4
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2 -DNDEBUG") # TODO: investigate whether can/should enable -march=x86-64-v4

-link_libraries("-flto -pthread -Wl,--format=binary -Wl,../../LICENSE -Wl,--format=default") # see show-license command in main.cpp
+link_libraries("-flto -Wl,--whole-archive -lrt -lpthread -Wl,--no-whole-archive -Wl,--format=binary -Wl,../../LICENSE -Wl,--format=default") # see show-license command in main.cpp

#add_compile_options(-fsanitize=address)
#add_link_options(-fsanitize=address)
add_subdirectory(src)