@@ -25633,7 +25633,7 @@ fi
25633
25633
25634
25634
# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
25635
25635
# This is much easier than trying to filter LIBS to the minimum for each
25636
- # executable. (Note that shared libraries won't use this switch, though.)
25636
+ # executable. (Note that shared library links won't use this switch, though.)
25637
25637
# On (at least) some Red-Hat-derived systems, this switch breaks linking to
25638
25638
# libreadline; therefore we postpone testing it until we know what library
25639
25639
# dependencies readline has. The test code will try to link with $LIBS.
@@ -25647,119 +25647,125 @@ if test "$PORTNAME" != "darwin"; then
25647
25647
echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
25648
25648
pgac_save_LDFLAGS=$LDFLAGS
25649
25649
LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
25650
- cat >conftest.$ac_ext <<_ACEOF
25650
+ if test "$cross_compiling" = yes; then
25651
+ LDFLAGS="$pgac_save_LDFLAGS"
25652
+ { echo "$as_me:$LINENO: result: assuming no" >&5
25653
+ echo "${ECHO_T}assuming no" >&6; }
25654
+ else
25655
+ cat >conftest.$ac_ext <<_ACEOF
25651
25656
/* confdefs.h. */
25652
25657
_ACEOF
25653
25658
cat confdefs.h >>conftest.$ac_ext
25654
25659
cat >>conftest.$ac_ext <<_ACEOF
25655
25660
/* end confdefs.h. */
25656
-
25657
- /* Override any GCC internal prototype to avoid an error.
25658
- Use char because int might match the return type of a GCC
25659
- builtin and then its argument prototype would still apply. */
25660
- #ifdef __cplusplus
25661
- extern "C"
25662
- #endif
25663
- char $link_test_func ();
25661
+ extern void $link_test_func (); void (*fptr) () = $link_test_func;
25664
25662
int
25665
25663
main ()
25666
25664
{
25667
- return $link_test_func ();
25665
+
25668
25666
;
25669
25667
return 0;
25670
25668
}
25671
25669
_ACEOF
25672
- rm -f conftest.$ac_objext conftest $ac_exeext
25670
+ rm -f conftest$ac_exeext
25673
25671
if { (ac_try="$ac_link"
25674
25672
case "(($ac_try" in
25675
25673
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25676
25674
*) ac_try_echo=$ac_try;;
25677
25675
esac
25678
25676
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25679
- (eval "$ac_link") 2>conftest.er1
25677
+ (eval "$ac_link") 2>&5
25680
25678
ac_status=$?
25681
- grep -v '^ *+' conftest.er1 >conftest.err
25682
- rm -f conftest.er1
25683
- cat conftest.err >&5
25684
25679
echo "$as_me:$LINENO: \$? = $ac_status" >&5
25685
- (exit $ac_status); } && {
25686
- test -z "$ac_c_werror_flag" ||
25687
- test ! -s conftest.err
25688
- } && test -s conftest$ac_exeext &&
25689
- $as_test_x conftest$ac_exeext; then
25680
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25681
+ { (case "(($ac_try" in
25682
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25683
+ *) ac_try_echo=$ac_try;;
25684
+ esac
25685
+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25686
+ (eval "$ac_try") 2>&5
25687
+ ac_status=$?
25688
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
25689
+ (exit $ac_status); }; }; then
25690
25690
{ echo "$as_me:$LINENO: result: yes" >&5
25691
25691
echo "${ECHO_T}yes" >&6; }
25692
25692
else
25693
- echo "$as_me: failed program was:" >&5
25693
+ echo "$as_me: program exited with status $ac_status" >&5
25694
+ echo "$as_me: failed program was:" >&5
25694
25695
sed 's/^/| /' conftest.$ac_ext >&5
25695
25696
25696
- LDFLAGS="$pgac_save_LDFLAGS"
25697
- { echo "$as_me:$LINENO: result: no" >&5
25697
+ ( exit $ac_status )
25698
+ LDFLAGS="$pgac_save_LDFLAGS"
25699
+ { echo "$as_me:$LINENO: result: no" >&5
25698
25700
echo "${ECHO_T}no" >&6; }
25699
25701
fi
25702
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25703
+ fi
25704
+
25700
25705
25701
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25702
- conftest$ac_exeext conftest.$ac_ext
25703
25706
25704
25707
else
25705
25708
# On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
25706
25709
{ echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
25707
25710
echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
25708
25711
pgac_save_LDFLAGS=$LDFLAGS
25709
25712
LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
25710
- cat >conftest.$ac_ext <<_ACEOF
25713
+ if test "$cross_compiling" = yes; then
25714
+ LDFLAGS="$pgac_save_LDFLAGS"
25715
+ { echo "$as_me:$LINENO: result: assuming no" >&5
25716
+ echo "${ECHO_T}assuming no" >&6; }
25717
+ else
25718
+ cat >conftest.$ac_ext <<_ACEOF
25711
25719
/* confdefs.h. */
25712
25720
_ACEOF
25713
25721
cat confdefs.h >>conftest.$ac_ext
25714
25722
cat >>conftest.$ac_ext <<_ACEOF
25715
25723
/* end confdefs.h. */
25716
-
25717
- /* Override any GCC internal prototype to avoid an error.
25718
- Use char because int might match the return type of a GCC
25719
- builtin and then its argument prototype would still apply. */
25720
- #ifdef __cplusplus
25721
- extern "C"
25722
- #endif
25723
- char $link_test_func ();
25724
+ extern void $link_test_func (); void (*fptr) () = $link_test_func;
25724
25725
int
25725
25726
main ()
25726
25727
{
25727
- return $link_test_func ();
25728
+
25728
25729
;
25729
25730
return 0;
25730
25731
}
25731
25732
_ACEOF
25732
- rm -f conftest.$ac_objext conftest $ac_exeext
25733
+ rm -f conftest$ac_exeext
25733
25734
if { (ac_try="$ac_link"
25734
25735
case "(($ac_try" in
25735
25736
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25736
25737
*) ac_try_echo=$ac_try;;
25737
25738
esac
25738
25739
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25739
- (eval "$ac_link") 2>conftest.er1
25740
+ (eval "$ac_link") 2>&5
25740
25741
ac_status=$?
25741
- grep -v '^ *+' conftest.er1 >conftest.err
25742
- rm -f conftest.er1
25743
- cat conftest.err >&5
25744
25742
echo "$as_me:$LINENO: \$? = $ac_status" >&5
25745
- (exit $ac_status); } && {
25746
- test -z "$ac_c_werror_flag" ||
25747
- test ! -s conftest.err
25748
- } && test -s conftest$ac_exeext &&
25749
- $as_test_x conftest$ac_exeext; then
25743
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25744
+ { (case "(($ac_try" in
25745
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25746
+ *) ac_try_echo=$ac_try;;
25747
+ esac
25748
+ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25749
+ (eval "$ac_try") 2>&5
25750
+ ac_status=$?
25751
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
25752
+ (exit $ac_status); }; }; then
25750
25753
{ echo "$as_me:$LINENO: result: yes" >&5
25751
25754
echo "${ECHO_T}yes" >&6; }
25752
25755
else
25753
- echo "$as_me: failed program was:" >&5
25756
+ echo "$as_me: program exited with status $ac_status" >&5
25757
+ echo "$as_me: failed program was:" >&5
25754
25758
sed 's/^/| /' conftest.$ac_ext >&5
25755
25759
25756
- LDFLAGS="$pgac_save_LDFLAGS"
25757
- { echo "$as_me:$LINENO: result: no" >&5
25760
+ ( exit $ac_status )
25761
+ LDFLAGS="$pgac_save_LDFLAGS"
25762
+ { echo "$as_me:$LINENO: result: no" >&5
25758
25763
echo "${ECHO_T}no" >&6; }
25759
25764
fi
25765
+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25766
+ fi
25767
+
25760
25768
25761
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25762
- conftest$ac_exeext conftest.$ac_ext
25763
25769
25764
25770
fi
25765
25771
0 commit comments