@@ -5894,6 +5894,74 @@ printf "%s\n" "no" >&6; }
58945894esac
58955895fi
58965896
5897+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5898+ /* end confdefs.h. */
5899+
5900+ int
5901+ main (void)
5902+ {
5903+
5904+ #if defined(__clang_major__) && __clang_major__ >= 17
5905+ /* clang 17.x or later is fine, clang 16 has a bug win this feature */
5906+ #elif defined(__llvm__)
5907+ #error "this version of llvm does not have or has a bug in the fzero-call-used-regs implementation"
5908+ #endif
5909+
5910+ ;
5911+ return 0;
5912+ }
5913+ _ACEOF
5914+ if ac_fn_c_try_compile " $LINENO "
5915+ then :
5916+
5917+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking if we can add -fzero-call-used-regs=used to DED_CFLAGS (via CFLAGS)" >&5
5918+ printf %s " checking if we can add -fzero-call-used-regs=used to DED_CFLAGS (via CFLAGS)... " >&6 ; }
5919+ saved_CFLAGS=$CFLAGS ;
5920+ CFLAGS=" -Werror -fzero-call-used-regs=used $DED_CFLAGS " ;
5921+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5922+ /* end confdefs.h. */
5923+
5924+ int
5925+ main (void)
5926+ {
5927+ return 0;
5928+ ;
5929+ return 0;
5930+ }
5931+ _ACEOF
5932+ if ac_fn_c_try_compile " $LINENO "
5933+ then :
5934+ can_enable_flag=true
5935+ else case e in # (
5936+ e) can_enable_flag=false ;;
5937+ esac
5938+ fi
5939+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5940+ CFLAGS=$saved_CFLAGS ;
5941+ if test " X$can_enable_flag " = " Xtrue"
5942+ then :
5943+
5944+ DED_CFLAGS=" -fzero-call-used-regs=used $DED_CFLAGS "
5945+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: yes" >&5
5946+ printf " %s\n" " yes" >&6 ; }
5947+
5948+ else case e in # (
5949+ e)
5950+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no" >&5
5951+ printf " %s\n" " no" >&6 ; }
5952+ ;;
5953+ esac
5954+ fi
5955+
5956+ else case e in # (
5957+ e) { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking if we can add -fzero-call-used-regs=used to DED_CFLAGS" >&5
5958+ printf %s " checking if we can add -fzero-call-used-regs=used to DED_CFLAGS... " >&6 ; }
5959+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no, too old clang" >&5
5960+ printf " %s\n" " no, too old clang" >&6 ; }
5961+ ;;
5962+ esac
5963+ fi
5964+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58975965
58985966 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking if we can add -mbranch-protection=standard to DED_CFLAGS (via CFLAGS)" >&5
58995967printf %s " checking if we can add -mbranch-protection=standard to DED_CFLAGS (via CFLAGS)... " >&6 ; }
@@ -11125,6 +11193,74 @@ printf "%s\n" "no" >&6; }
1112511193esac
1112611194fi
1112711195
11196+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
11197+ /* end confdefs.h. */
11198+
11199+ int
11200+ main (void)
11201+ {
11202+
11203+ #if defined(__clang_major__) && __clang_major__ >= 17
11204+ /* clang 17.x or later is fine, clang 16 has a bug win this feature */
11205+ #elif defined(__llvm__)
11206+ #error "this version of llvm does not have or has a bug in the fzero-call-used-regs implementation"
11207+ #endif
11208+
11209+ ;
11210+ return 0;
11211+ }
11212+ _ACEOF
11213+ if ac_fn_c_try_compile " $LINENO "
11214+ then :
11215+
11216+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking if we can add -fzero-call-used-regs=used to CFLAGS (via CFLAGS)" >&5
11217+ printf %s " checking if we can add -fzero-call-used-regs=used to CFLAGS (via CFLAGS)... " >&6 ; }
11218+ saved_CFLAGS=$CFLAGS ;
11219+ CFLAGS=" -Werror -fzero-call-used-regs=used $CFLAGS " ;
11220+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
11221+ /* end confdefs.h. */
11222+
11223+ int
11224+ main (void)
11225+ {
11226+ return 0;
11227+ ;
11228+ return 0;
11229+ }
11230+ _ACEOF
11231+ if ac_fn_c_try_compile " $LINENO "
11232+ then :
11233+ can_enable_flag=true
11234+ else case e in # (
11235+ e) can_enable_flag=false ;;
11236+ esac
11237+ fi
11238+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11239+ CFLAGS=$saved_CFLAGS ;
11240+ if test " X$can_enable_flag " = " Xtrue"
11241+ then :
11242+
11243+ CFLAGS=" -fzero-call-used-regs=used $CFLAGS "
11244+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: yes" >&5
11245+ printf " %s\n" " yes" >&6 ; }
11246+
11247+ else case e in # (
11248+ e)
11249+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no" >&5
11250+ printf " %s\n" " no" >&6 ; }
11251+ ;;
11252+ esac
11253+ fi
11254+
11255+ else case e in # (
11256+ e) { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking if we can add -fzero-call-used-regs=used to CFLAGS" >&5
11257+ printf %s " checking if we can add -fzero-call-used-regs=used to CFLAGS... " >&6 ; }
11258+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: no, too old clang" >&5
11259+ printf " %s\n" " no, too old clang" >&6 ; }
11260+ ;;
11261+ esac
11262+ fi
11263+ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1112811264
1112911265 { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)" >&5
1113011266printf %s " checking if we can add -mbranch-protection=standard to CFLAGS (via CFLAGS)... " >&6 ; }
0 commit comments