Skip to content

Commit

Permalink
Trac #29454: don't use PPL's LDFLAGS to compile its test program.
Browse files Browse the repository at this point in the history
When (for example) PPL was build with a hardened toolchain, its
PPL_LDFLAGS as determined by the AM_PATH_PPL macro can contain
things like,

  -Wl,-z,relro ... -specs=/usr/lib/rpm/redhat/redhat-hardened-ld

which we don't actually want to use while compiling the test program.
This commit modifies m4/ppl.m4 to compile and link the test program
without PPL_LDFLAGS in LDFLAGS. The PPL_LDFLAGS symbol is however
still defined.
  • Loading branch information
orlitzky committed Apr 5, 2020
1 parent ec3a771 commit fa6e0d9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions m4/ppl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ else
if test "x$enable_ppltest" = xyes
then
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
ac_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $PPL_CPPFLAGS"
LDFLAGS="$PPL_LDFLAGS $LDFLAGS"
LIBS="$LIBS $PPL_LIBS"
dnl Now check if the installed PPL is sufficiently new.
Expand Down Expand Up @@ -239,7 +237,6 @@ main() {
AC_LANG_POP
CPPFLAGS="$ac_save_CPPFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
Expand All @@ -263,7 +260,6 @@ else
else
echo "*** Could not run PPL test program, checking why..."
CPPFLAGS="$CPPFLAGS $PPL_CPPFLAGS"
LDFLAGS="$LDFLAGS $PPL_LDFLAGS"
LIBS="$LIBS $PPL_LIBS"
AC_TRY_LINK([
#include <ppl.hh>
Expand Down Expand Up @@ -293,7 +289,6 @@ using namespace Parma_Polyhedra_Library;
echo "*** the library."
])
CPPFLAGS="$ac_save_CPPFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
Expand Down

0 comments on commit fa6e0d9

Please sign in to comment.