]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
These are technically linker flags
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Apr 2022 13:41:53 +0000 (08:41 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Apr 2022 13:42:06 +0000 (08:42 -0500)
configure
m4/ax_cc.m4

index 67f61b611ef847033861a8ffbfe82656323e46b1..7927e01c4d055421c87e78c504d3b069d5b10b64 100755 (executable)
--- a/configure
+++ b/configure
@@ -1805,49 +1805,6 @@ fi
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
-# executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-then :
-  ac_retval=0
-else $as_nop
-  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
-       printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1895,6 +1852,49 @@ fi
 
 } # ac_fn_c_try_link
 
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  ac_retval=0
+else $as_nop
+  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+       printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -5868,8 +5868,8 @@ then :
   printf %s "(cached) " >&6
 else $as_nop
 
-    CFLAGS_SAVED=$CFLAGS
-    CFLAGS="$CFLAGS -Werror --rtlib=compiler-rt --unwindlib=libunwind"
+    LDFLAGS_SAVED=$LDFLAGS
+    LDFLAGS="$LDFLAGS -Werror --rtlib=compiler-rt --unwindlib=libunwind"
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -5881,16 +5881,17 @@ else $as_nop
 
 
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
   ax_cv_cc_unwindlib_arg=yes
 else $as_nop
   ax_cv_cc_unwindlib_arg=no
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
-    CFLAGS="$CFLAGS_SAVED"
+    LDFLAGS="$LDFLAGS_SAVED"
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cc_unwindlib_arg" >&5
index f46da7d0f1757667919c36bbbc8b13c1bf5032ca..02743c2141d3496b011048927174004d256e0829 100644 (file)
@@ -63,10 +63,10 @@ dnl # clang and gcc originally used different flags to specify c11 support
 dnl #
 AC_DEFUN([AX_CC_UNWINDLIB_ARG],[
   AC_CACHE_CHECK([if the compiler accepts --unwindlib], [ax_cv_cc_unwindlib_arg],[
-    CFLAGS_SAVED=$CFLAGS
-    CFLAGS="$CFLAGS -Werror --rtlib=compiler-rt --unwindlib=libunwind"
+    LDFLAGS_SAVED=$LDFLAGS
+    LDFLAGS="$LDFLAGS -Werror --rtlib=compiler-rt --unwindlib=libunwind"
 
-    AC_COMPILE_IFELSE(
+    AC_LINK_IFELSE(
     [
       AC_LANG_SOURCE(
       [
@@ -79,7 +79,7 @@ AC_DEFUN([AX_CC_UNWINDLIB_ARG],[
       [ax_cv_cc_unwindlib_arg=no]
     )
 
-    CFLAGS="$CFLAGS_SAVED"
+    LDFLAGS="$LDFLAGS_SAVED"
   ])
 ])