From baabfad325f6d2de4cfd33be49ca5511cfa548ea Mon Sep 17 00:00:00 2001 From: Karol Ostrovsky Date: Thu, 16 Mar 2017 17:14:13 +0100 Subject: Improve no-pie solution from bug report ERL-294 Some linkers, for example on Gentoo Hardened, do not accept the -no-pie flag but require the -fno-PIE flag instead. --- erts/configure.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'erts') diff --git a/erts/configure.in b/erts/configure.in index 1c4a3e90ef..7c6f4b163c 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -2836,9 +2836,10 @@ if test X${enable_hipe} = Xyes && test X$ARCH = Xamd64; then saved_LDFLAGS=$LDFLAGS LDFLAGS="-no-pie $LDFLAGS" AC_TRY_LINK(,, [], - [AC_MSG_WARN([Linked does not accept option -no-pie]) - LDFLAGS=$saved_LDFLAGS])]) - + [LDFLAGS="-fno-PIE $saved_LDFLAGS" + AC_TRY_LINK(,, [], + [AC_MSG_WARN([Linked does not accept option -no-pie nor -fno-PIE]) + LDFLAGS=$saved_LDFLAGS])])]) fi -- cgit v1.2.3