X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/871414daa45a66933057dd318494c425c88dbbdc..59dac0a80aa33c5635ede2d8156fdaaa5b8d179f:/Configure diff --git a/Configure b/Configure index e4e5570..a8e4a48 100755 --- a/Configure +++ b/Configure @@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Wed Jan 22 12:03:46 CET 2014 [metaconfig 3.5 PL0] +# Generated on Wed Apr 9 12:24:24 CEST 2014 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&1 >/dev/null ; then +if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' 2>&1 ) 2>&1 >/dev/null ; then if test -n "$OS2_SHELL"; then p_=\; PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` @@ -206,18 +206,18 @@ ccsymbols='' cppccsymbols='' cppsymbols='' from='' +hostgenerate='' +hostosname='' +hostperl='' run='' targetarch='' targetdir='' +targetenv='' targethost='' targetmkdir='' targetport='' to='' usecrosscompile='' -hostperl='' -hostgenerate='' -hostosname='' -targetsh='' extern_C='' mistrustnm='' usedevel='' @@ -1167,6 +1167,7 @@ scriptdirexp='' selectminbits='' selecttype='' sh='' +targetsh='' sig_count='' sig_name='' sig_name_init='' @@ -2840,6 +2841,9 @@ esac if $test "X$targethost" = "X"; then targethost="" fi +if $test "X$targetenv" = "X"; then + targetenv="" +fi case "$usecrosscompile" in $define|true|[yY]*) $echo "Cross-compiling..." @@ -2886,13 +2890,14 @@ $define|true|[yY]*) cd .. cd $src src=`pwd` - test -d $src/host || mkdir $src/host - cd $src/host && rm -rf ./* + rm -rf $src/host + mkdir $src/host + cd $src/host $src/Configure -des -Dusedevel -Dmksymlinks $make miniperl case "$hostgenerate" in '') $make generate_uudmap - hostgenerate=$src/host/generate_uudmap + hostgenerate=$src/host/generate_uudmap ;; "$undef") hostgenerate='' ;; @@ -2903,7 +2908,7 @@ $define|true|[yY]*) hostosname=`$hostperl -le 'print $^O'` ;; *) - usecrosscompile='undef' + usecrosscompile="$undef" ;; esac @@ -3000,6 +3005,9 @@ $to \$exe $targetrun -p $targetport -l $targetuser $targethost "cd \$cwd && \$env \$exe \$@" EOF ;; + adb) + $touch $run + ;; *) echo "Unknown targetrun '$targetrun'" >&4 exit 1 ;; @@ -3025,11 +3033,11 @@ do case "\$f" in /*) $targetmkdir \`dirname \$f\` - $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f || exit 1 + $targetto -P $targetport -r $q \$f $targetuser@$targethost:\$f 2>/dev/null || exit 1 ;; *) $targetmkdir $targetdir/\`dirname \$f\` - $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1 + $targetto -P $targetport -r $q \$f $targetuser@$targethost:$targetdir/\$f 2>/dev/null || exit 1 ;; esac done @@ -3111,7 +3119,7 @@ EOF *) run='' to=: from=: - usecrosscompile='undef' + usecrosscompile="$undef" targetarch='' ;; esac @@ -3388,6 +3396,7 @@ EOM case "$3" in *) osvers="$3" ;; esac + $test -f /system/lib/libandroid.so && osname=linux-android ;; MiNT) osname=mint ;; @@ -3537,8 +3546,42 @@ EOM case "$targetarch" in '') ;; *) hostarch=$osname - osname=`echo $targetarch|sed 's,^[^-]*-,,'` - osvers='' + case "$targetarch" in + nto*|*-nto-*) + # Will load qnx.sh, which should change osname to nto + osname=qnx + osvers='' + ;; + *linux-android*) + # Catch arm-linux-androideabi, mipsel-linux-android, + # and i686-linux-android + osname=linux-android + osvers='' + ;; + *linux*) + # Something like arm-linux-gnueabihf is really just + # plain linux. + osname=linux + osvers='' + ;; + *solaris*|*sunos*) + osname=solaris + # XXX perhaps we should just assume + # osvers to be 2, or maybe take the value + # from targetarch. Using $run before the + # hints are run is somewhat icky. + set X `$run $uname -a 2>/dev/null` + shift + case "$3" in + 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; + *) osvers="$3" ;; + esac + ;; + *) + osname=`echo $targetarch|sed 's,^[^-]*-,,'` + osvers='' + ;; + esac ;; esac @@ -4600,6 +4643,22 @@ case "$gccversion" in $rm -f try try.* esac +# gcc 4.9 by default does some optimizations that break perl. +# see ticket 121505. +# +# The -fwrapv disables those optimizations (and probably others,) so +# for gcc 4.9 (and later, since the optimizations probably won't go +# away), add -fwrapv unless the user requests -fno-wrapv, which +# disables -fwrapv, or if the user requests -fsanitize=undefined, +# which turns the overflows -fwrapv ignores into runtime errors. +case "$gccversion" in +4.[3-9].*|4.[1-9][0-9]*|[5-9].*|[1-9][0-9]*) + case "$ccflags" in + *-fno-wrapv*|*-fsanitize=undefined*|*-fwrapv*) ;; + *) ccflags="$ccflags -fwrapv" ;; + esac +esac + : What should the include directory be ? : Use sysroot if set, so findhdr looks in the right place. echo " " @@ -7934,13 +7993,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 "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) 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 "$extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p() && p() != (void *)main) 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; @@ -19691,9 +19750,10 @@ EOCP # Copy the .c file to the remote host ($to is an ssh-alike if targethost is set) if $test "X$targethost" != X; then $to tryp.c - $run ./tryp \< tryp.c 2>/dev/null > tryp.out + $to tryp + $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out else - $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out + $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out fi if cmp tryp.c tryp.out >/dev/null 2>&1; then $cat >&4 </dev/null > tryp.out + $to tryp + $run "cat tryp.c | ./tryp " 2>/dev/null > tryp.out else - $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out + $cat tryp.c | $run ./tryp 2>/dev/null > tryp.out fi if cmp tryp.c tryp.out >/dev/null 2>&1; then $cat >&4 <