Skip to content

Commit

Permalink
Test if linker supports nodelete
Browse files Browse the repository at this point in the history
  • Loading branch information
david0 committed Dec 14, 2015
1 parent f786281 commit d2f1740
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ AC_ARG_ENABLE(sse,
[set_enable_sse="no"])
AC_MSG_RESULT($set_enable_sse)


AC_MSG_CHECKING([whether the linker supports -z,nodelete])
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,-z,nodelete"
AC_RUN_IFELSE([AC_LANG_PROGRAM([[]],
[[]])],
[linker_supports_nodelete="yes"],
[linker_supports_nodelete="no"],
[linker_supports_nodelete="no"])
AC_MSG_RESULT([$linker_supports_nodelete])
LDFLAGS="$save_LDFLAGS"

AM_CONDITIONAL(HAVE_LD_NODELETE, test "$linker_supports_nodelete" = "yes")

############################################################################################
# Compute status shell variables

Expand Down
8 changes: 6 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ noinst_LTLIBRARIES += calflv2gui.la
calflv2gui_la_SOURCES = gui.cpp gui_config.cpp gui_controls.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_knob.cpp ctl_led.cpp ctl_tube.cpp ctl_vumeter.cpp ctl_frame.cpp ctl_fader.cpp ctl_buttons.cpp ctl_notebook.cpp ctl_meterscale.cpp ctl_combobox.cpp ctl_tuner.cpp ctl_phasegraph.cpp ctl_pattern.cpp metadata.cpp giface.cpp plugin_gui_window.cpp preset.cpp preset_gui.cpp lv2gui.cpp osctl.cpp utils.cpp ctl_linegraph.cpp drawingutils.cpp

if USE_DEBUG
calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat $(GUI_DEPS_LIBS) -disable-static -Wl,-z,nodelete
calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat $(GUI_DEPS_LIBS) -disable-static
else
calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-symbols-regex "lv2ui_descriptor" $(GUI_DEPS_LIBS) -disable-static -Wl,-z,nodelete
calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-symbols-regex "lv2ui_descriptor" $(GUI_DEPS_LIBS) -disable-static
endif

if HAVE_LD_NODELETE
calflv2gui_la_LDFLAGS = -Wl,-z,nodelete
endif

endif
Expand Down

0 comments on commit d2f1740

Please sign in to comment.