-
Notifications
You must be signed in to change notification settings - Fork 560
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
gcc 6 link-time optimization (LTO) breaks Configure symbol detection (again) #15322
Comments
From @maukeCreated by @maukeI have gcc 6.1.1. Enabling link-time optimization makes the build fail because % ./Configure -Doptimize='-O2 -flto' -Dusedevel -d Perl Info
|
From @maukeOn Wed May 11 13:08:44 2016, mauke- wrote:
Patch attached. |
From @mauke0001-fix-symbol-detection-with-gcc-6-link-time-optimizati.patchFrom 0e77e7b8233f908cb5a343397c7453e9c21ac0db Mon Sep 17 00:00:00 2001
From: Lukas Mai <l.mai@web.de>
Date: Wed, 11 May 2016 22:15:34 +0200
Subject: [PATCH] fix symbol detection with gcc 6 link-time optimization (RT
#128131)
---
Configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Configure b/Configure
index 33a6cac..1cd411a 100755
--- a/Configure
+++ b/Configure
@@ -6798,13 +6798,13 @@ yes)
if $contains $tlook $tf >/dev/null 2>&1; then
tval=true;
elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
- echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) return(0); else return(1); }"> try.c;
+ echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main(int argc, char **argv) { if(p() && p() != (void *)argv[0]) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
$test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
$rm_try;
fi;
else
- echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) return(0); else return(1); }"> try.c;
+ echo "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main(int argc, char **argv) { if(p() && p() != (void *)argv[0]) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
$rm_try;
fi;
--
2.8.2
|
From @doughera88On Wed, May 11, 2016 at 01:08:44PM -0700, l.mai@web.de (via RT) wrote:
Thank you for reporting this. One long-term fix in the next version of
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @arcl.mai@web.de via RT <perlbug-followup@perl.org> wrote:
Thanks, applied as adec5bb, and For the benefit of anyone reading this in the future: on a current /usr/bin/ar rc libperl.a op.o perl.o gv.o toke.o perly.o pad.o So it's possible that further changes will be needed to support LTO, -- |
@arc - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.26.0, this and 210 other issues have been Perl 5.26.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#128131 (status was 'resolved')
Searchable as RT128131$
The text was updated successfully, but these errors were encountered: