@@ -25633,7 +25633,7 @@ fi
2563325633
2563425634# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
2563525635# This is much easier than trying to filter LIBS to the minimum for each
25636- # executable. (Note that sharedlibraries won't use this switch, though.)
25636+ # executable. (Note that sharedlibrary links won't use this switch, though.)
2563725637# On (at least) some Red-Hat-derived systems, this switch breaks linking to
2563825638# libreadline; therefore we postpone testing it until we know what library
2563925639# dependencies readline has. The test code will try to link with $LIBS.
@@ -25647,119 +25647,125 @@ if test "$PORTNAME" != "darwin"; then
2564725647echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
2564825648pgac_save_LDFLAGS=$LDFLAGS
2564925649LDFLAGS="$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
2565125656/* confdefs.h. */
2565225657_ACEOF
2565325658cat confdefs.h >>conftest.$ac_ext
2565425659cat >>conftest.$ac_ext <<_ACEOF
2565525660/* 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;
2566425662int
2566525663main ()
2566625664{
25667- return $link_test_func ();
25665+
2566825666 ;
2566925667 return 0;
2567025668}
2567125669_ACEOF
25672- rm -f conftest.$ac_objext conftest $ac_exeext
25670+ rm -f conftest$ac_exeext
2567325671if { (ac_try="$ac_link"
2567425672case "(($ac_try" in
2567525673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2567625674 *) ac_try_echo=$ac_try;;
2567725675esac
2567825676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25679- (eval "$ac_link") 2>conftest.er1
25677+ (eval "$ac_link") 2>&5
2568025678 ac_status=$?
25681- grep -v '^ *+' conftest.er1 >conftest.err
25682- rm -f conftest.er1
25683- cat conftest.err >&5
2568425679 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
2569025690 { echo "$as_me:$LINENO: result: yes" >&5
2569125691echo "${ECHO_T}yes" >&6; }
2569225692else
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
2569425695sed 's/^/| /' conftest.$ac_ext >&5
2569525696
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
2569825700echo "${ECHO_T}no" >&6; }
2569925701fi
25702+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25703+ fi
25704+
2570025705
25701- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25702- conftest$ac_exeext conftest.$ac_ext
2570325706
2570425707else
2570525708 # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
2570625709 { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
2570725710echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
2570825711pgac_save_LDFLAGS=$LDFLAGS
2570925712LDFLAGS="$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
2571125719/* confdefs.h. */
2571225720_ACEOF
2571325721cat confdefs.h >>conftest.$ac_ext
2571425722cat >>conftest.$ac_ext <<_ACEOF
2571525723/* 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;
2572425725int
2572525726main ()
2572625727{
25727- return $link_test_func ();
25728+
2572825729 ;
2572925730 return 0;
2573025731}
2573125732_ACEOF
25732- rm -f conftest.$ac_objext conftest $ac_exeext
25733+ rm -f conftest$ac_exeext
2573325734if { (ac_try="$ac_link"
2573425735case "(($ac_try" in
2573525736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2573625737 *) ac_try_echo=$ac_try;;
2573725738esac
2573825739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25739- (eval "$ac_link") 2>conftest.er1
25740+ (eval "$ac_link") 2>&5
2574025741 ac_status=$?
25741- grep -v '^ *+' conftest.er1 >conftest.err
25742- rm -f conftest.er1
25743- cat conftest.err >&5
2574425742 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
2575025753 { echo "$as_me:$LINENO: result: yes" >&5
2575125754echo "${ECHO_T}yes" >&6; }
2575225755else
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
2575425758sed 's/^/| /' conftest.$ac_ext >&5
2575525759
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
2575825763echo "${ECHO_T}no" >&6; }
2575925764fi
25765+ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25766+ fi
25767+
2576025768
25761- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25762- conftest$ac_exeext conftest.$ac_ext
2576325769
2576425770fi
2576525771