diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2011-08-22 15:41:26 +0200 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2011-08-22 15:41:26 +0200 |
commit | e820c6d6a6d0a8828aa68a6895696b659c471f2f (patch) | |
tree | 84a447b0be2d3c7f862e5082e5d34334c4daf58f /Configure | |
parent | e18249a59ddbc899823227d1eaead27682016237 (diff) | |
download | perl-e820c6d6a6d0a8828aa68a6895696b659c471f2f.tar.gz |
Fix Configure's csym test for gcc's link time optimisation
This introduces a volatile into the test program so gcc cannot optimise
out the symbol itself as being unused.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Sun Jul 31 12:11:29 CEST 2011 [metaconfig 3.5 PL0] +# Generated on Mon Aug 22 15:14:53 CEST 2011 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF @@ -1310,6 +1310,9 @@ fi groupstype='' i_whoami='' +: Trailing extension. Override this in a hint file, if needed. +: Extra object files, if any, needed on this platform. +archobjs='' archname='' : Possible local include directories to search. : Set locincpth to "" in a hint file to defeat local include searches. @@ -1323,11 +1326,6 @@ inclwanted='' EBUGGING='' DEBUGGING='' -: set usethreads on the Configure command line to enable threads. -usereentrant='undef' -: Trailing extension. Override this in a hint file, if needed. -: Extra object files, if any, needed on this platform. -archobjs='' libnames='' : change the next line if compiling for Xenix/286 on Xenix/386 xlibpth='/usr/lib/386 /lib/386' @@ -1351,6 +1349,8 @@ plibpth='' libswanted='' : some systems want to use only the non-versioned libso:s ignore_versioned_solibs='' +: set usethreads on the Configure command line to enable threads. +usereentrant='undef' : full support for void wanted by default defvoidused=15 @@ -7774,13 +7774,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()) return(0); else return(1); }"> try.c; + echo "volatile int dummy = 0; $extern_C void *$1$tdc; void *(*(p()))$tdc { return dummy + &$1; } int main() { if(p()) 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()) return(0); else return(1); }"> try.c; + echo "volatile int dummy = 0; $extern_C void *$1$tdc; void *(*(p()))$tdc { return dummy + &$1; } int main() { if(p()) 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; |