Skip to content

Commit

Permalink
cmake: add MODULE linker flags
Browse files Browse the repository at this point in the history
Otherwise cmake appears to fall back to using the EXE linker flags,
which results in non-working shared-objects as they are treated
as binaries and are linked at the usual entry-point address.

Issue #52.
  • Loading branch information
cnuke authored and jschlatow committed Oct 18, 2023
1 parent a780823 commit d02ce07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions share/goa/lib/build/cmake.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ proc create_or_update_build_dir { } {
lappend cmd "-DCMAKE_CXX_FLAGS='$cxxflags $cppflags'"
lappend cmd "-DCMAKE_EXE_LINKER_FLAGS='$ldflags $ldlibs_common $ldlibs_exe'"
lappend cmd "-DCMAKE_SHARED_LINKER_FLAGS='$ldflags_so $ldlibs_common $ldlibs_so'"
lappend cmd "-DCMAKE_MODULE_LINKER_FLAGS='$ldflags_so $ldlibs_common $ldlibs_so'"
lappend cmd "-DCMAKE_INSTALL_PREFIX:PATH=[file join $build_dir install]"

if {[info exists cmake_quirk_args]} {
Expand Down

0 comments on commit d02ce07

Please sign in to comment.