diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2012-03-31 16:31:29 +0200 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2012-03-31 16:31:54 +0200 |
commit | 9ec4dadfbbcf94d284b7e489694f1fa9fd6647c0 (patch) | |
tree | 6288f26601a51812aa7a6bdd5157b2b42d363695 | |
parent | 258f564231885d20cd3b29a014dda4c79b44b1b0 (diff) | |
download | perl-9ec4dadfbbcf94d284b7e489694f1fa9fd6647c0.tar.gz |
Add ld_can_script probe to Configure
With this new probe, requested by rafl, we could start building perl as
it would be built on OSs like AIX and Windows and actually test visibility
of the API and thus early detect if tests would fail on these restrictive
OSs
-rwxr-xr-x | Configure | 32 | ||||
-rw-r--r-- | Porting/Glossary | 5 | ||||
-rw-r--r-- | uconfig.h | 2 | ||||
-rw-r--r-- | uconfig.sh | 1 |
4 files changed, 38 insertions, 2 deletions
@@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Thu Feb 16 16:57:30 CET 2012 [metaconfig 3.5 PL0] +# Generated on Sat Mar 31 16:09:53 CEST 2012 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <<EOF @@ -843,6 +843,7 @@ cccdlflags='' ccdlflags='' dlsrc='' ld='' +ld_can_script='' lddlflags='' usedl='' doublesize='' @@ -8085,6 +8086,34 @@ EOM ;; esac +ld_can_script="$undef" +case "$bin_ELF$usedl" in +$define$define) + # Abuse try.h and a.out names for neat cleanup + $cat >try.c <<EOM +void foo() {} +void bar() {} +EOM + $cat >try.h <<EOM +LIBTEST_42 { + global: + foo; + local: *; + }; +EOM + if $cc $cccdlflags $ccdlflags $ccflags \ + $ldflags $lddlflags -o a.out try.c \ + -Wl,--version-script=try.h >/dev/null 2>&1 \ + && $test -s a.out ; then + echo "ld supports scripting" >&4 + ld_can_script="$define" + else + echo "ld does not support scripting" >&4 + fi + $rm_try + ;; +esac + : Do we want a shared libperl? also='' case "$usedl" in @@ -23471,6 +23500,7 @@ ivtype='$ivtype' known_extensions='$known_extensions' ksh='$ksh' ld='$ld' +ld_can_script='$ld_can_script' lddlflags='$lddlflags' ldflags='$ldflags' ldflags_uselargefiles='$ldflags_uselargefiles' diff --git a/Porting/Glossary b/Porting/Glossary index e42d7509b4..23ffbfe235 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -3619,6 +3619,11 @@ ld (dlsrc.U): On ELF systems, it should be $cc. Mostly, we'll try to respect the hint file setting. +ld_can_script (dlsrc.U): + This variable shows if the loader accepts scripts in the form of + -Wl,--version-script=ld.script. This is currently only supported + for GNU ld on ELF in dynamic loading builds. + lddlflags (dlsrc.U): This variable contains any special flags that might need to be passed to $ld to create a shared library suitable for dynamic @@ -4735,5 +4735,5 @@ /* Generated from: * d9b6a68b192c72c0695b560fae6e4916b381f55df5fdf7911b0ef434840f092e config_h.SH - * 3dad514f97a86deca0eebb6544f7785077651da24e7c6231ef7a22963ff4fd5d uconfig.sh + * 57694ed3f0d8607c648dcda8db17e8301e376b16cd7b7bed04772c713c1d5818 uconfig.sh * ex: set ro: */ diff --git a/uconfig.sh b/uconfig.sh index 076fde4325..11ad8947a5 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -638,6 +638,7 @@ intsize='4' ivdformat='"ld"' ivsize='4' ivtype='long' +ld_can_script='define' lib_ext='.a' localtime_r_proto='0' longdblsize=8 |