-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable -fPIE for HiPE on x86_64 #1239
Conversation
@@ -2771,6 +2771,21 @@ if test "$cross_compiling" != "yes" && test X${enable_hipe} != Xno; then | |||
fi | |||
fi | |||
|
|||
dnl Check to disable -fPIE and friends for HiPE on amd64 | |||
if test X${enable_hipe} = Xyes && test X$ARCH = Xamd64; then | |||
AC_TRY_COMPILE(, [#ifdef defined(__pie__) || defined(__PIE__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work, #ifdef
should be changed to #if
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Believe it or not but I actually tested both branches of AC_TRY_COMPILE.
#ifdef define(..) succeeded with just a warning "extra tokens at end of #ifdef directive" (that I never saw).
Then I changed it to !defined(..) and that did not compile as expected.
This does not work for me with the Debian gcc-6 compiler:
The minimal set of flags which seems to work for me is
|
Seems this is the correct and best combination:
The reason that it failed for you is that CFLAGS was used instead of LDFLAGS at one place (hipe_mkliterals). |
If you do get build errors again, please rerun with |
Thanks, now it works perfectly, with |
and no need for $(INCLUDED).
f51bd86
to
edfa3b8
Compare
Rebased to two commits and merged to maint and master. |
Thanks! |
This is an attempt to fix https://bugs.erlang.org/browse/ERL-294
by letting configure disable position independent executable (PIE) if
I encourage stake holders to test this before we merge into maint for OTP-19.2.