Skip to content

Commit

Permalink
handle -Wl,--disable-new-dtags via configure
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2488
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Jun 3, 2018
1 parent cf3746a commit cc5bf4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/boot/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

CC=@CC@
CXX=@CXX@
CFLAGS=@CFLAGS@ @CHECK_C_ERRORS@ -Wl,--disable-new-dtags
CFLAGS=@CFLAGS@ @CHECK_C_ERRORS@
TOP_DIR=@abs_top_builddir@
OMHOME=@OMBUILDDIR@
OMBUILDDIR=@OMBUILDDIR@
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ if $CC --version | grep -q gcc && $CC -dumpversion | grep -q "^5"; then
TRY_FLAGS="$TRY_FLAGS -fno-ipa-pure-const"
fi

# GCC 7.x generates RUNPATH instead of RPATH
if $CC --version | grep -q gcc && $CC -dumpversion | grep -q "^7"; then
TRY_FLAGS="$TRY_FLAGS -Wl,--disable-new-dtags"
fi

for flag in $TRY_FLAGS; do
OLD_CFLAGS="$CFLAGS"
CFLAGS="$RUNTIMECFLAGS $flag -Werror"
Expand Down

0 comments on commit cc5bf4b

Please sign in to comment.