Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upgcc 6 link-time optimization (LTO) breaks Configure symbol detection (again) #15322
Comments
This comment has been minimized.
This comment has been minimized.
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
|
This comment has been minimized.
This comment has been minimized.
From @maukeOn Wed May 11 13:08:44 2016, mauke- wrote:
Patch attached. |
This comment has been minimized.
This comment has been minimized.
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
|
This comment has been minimized.
This comment has been minimized.
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
-- |
This comment has been minimized.
This comment has been minimized.
The RT System itself - Status changed from 'new' to 'open' |
This comment has been minimized.
This comment has been minimized.
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, -- |
This comment has been minimized.
This comment has been minimized.
@arc - Status changed from 'open' to 'pending release' |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#128131 (status was 'resolved')
Searchable as RT128131$