Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit e8a3024

Browse files
adrpoOpenModelica-Hudson
authored andcommitted
- handle -Wl,--no-as-needed via configure
Belonging to [master]: - #2489
1 parent cc5bf4b commit e8a3024

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ sundials: umfpack
467467
$(MAKE) -f $(defaultMakefileTarget) $(builddir_lib_omc)/libsundials_ida.a
468468
$(builddir_lib_omc)/libsundials_ida.a: 3rdParty/sundials/CMakeLists.txt
469469
mkdir -p 3rdParty/sundials/build
470-
cd 3rdParty/sundials/build && $(CMAKE) .. -G $(CMAKE_TARGET) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_INSTALL_PREFIX=`pwd` -DKLU_ENABLE:Bool=ON -DKLU_LIBRARY_DIR="$(builddir_lib_omc)" -DKLU_INCLUDE_DIR="$(OMBUILDDIR)/include/omc/c/suitesparse/Include/" -DCMAKE_C_FLAGS="$(CFLAGS) -Wl,--no-as-needed -lm -L $(builddir_lib_omc)" $(SUITESPARSE_LIBS) $(IS_MINGW32) $(IS_MINGW64) -DSUITESPARSECONFIG_LIBRARY="" -DLAPACK_ENABLE:Bool=ON
470+
cd 3rdParty/sundials/build && $(CMAKE) .. -G $(CMAKE_TARGET) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_INSTALL_PREFIX=`pwd` -DKLU_ENABLE:Bool=ON -DKLU_LIBRARY_DIR="$(builddir_lib_omc)" -DKLU_INCLUDE_DIR="$(OMBUILDDIR)/include/omc/c/suitesparse/Include/" -DCMAKE_C_FLAGS="$(CFLAGS) -lm -L $(builddir_lib_omc)" $(SUITESPARSE_LIBS) $(IS_MINGW32) $(IS_MINGW64) -DSUITESPARSECONFIG_LIBRARY="" -DLAPACK_ENABLE:Bool=ON
471471
$(MAKE) -C 3rdParty/sundials/build install
472472
# adrpo: do not copy the headers as they are not needed!
473473
mkdir -p $(OMBUILDDIR)/include/omc/c/sundials

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ if $CC --version | grep -q gcc && $CC -dumpversion | grep -q "^5"; then
203203
TRY_FLAGS="$TRY_FLAGS -fno-ipa-pure-const"
204204
fi
205205

206-
# GCC 7.x generates RUNPATH instead of RPATH
206+
# GCC 7.x issues:
207+
# - RUNPATH instead of RPATH, disable that via -Wl,--disable-new-dtags
208+
# - sqrt from libcolamd is not found in -lm if -Wl,--no-as-needed is not specified
207209
if $CC --version | grep -q gcc && $CC -dumpversion | grep -q "^7"; then
208-
TRY_FLAGS="$TRY_FLAGS -Wl,--disable-new-dtags"
210+
TRY_FLAGS="$TRY_FLAGS -Wl,--disable-new-dtags -Wl,--no-as-needed"
209211
fi
210212

211213
for flag in $TRY_FLAGS; do

0 commit comments

Comments
 (0)