Skip to content

Commit

Permalink
Include OSSF flags when building erl_interface programs
Browse files Browse the repository at this point in the history
  • Loading branch information
garazdawi committed Feb 18, 2025
1 parent 30c2a23 commit 1054a8b
Show file tree
Hide file tree
Showing 10 changed files with 904 additions and 228 deletions.
40 changes: 0 additions & 40 deletions erts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -8246,46 +8246,6 @@ fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)" >&5
printf %s "checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)... " >&6; }
saved_CFLAGS=$CFLAGS;
CFLAGS="-Werror -fno-strict-aliasing $CFLAGS";
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

int
main (void)
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
can_enable_flag=true
else case e in #(
e) can_enable_flag=false ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$saved_CFLAGS;
if test "X$can_enable_flag" = "Xtrue"
then :

CFLAGS="-fno-strict-aliasing $CFLAGS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
;;
esac
fi


else case e in #(
e)
WFLAGS=""
Expand Down
1 change: 0 additions & 1 deletion erts/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ AS_IF([test "x$GCC" = xyes],
# such dubious duplicates.
LM_TRY_ENABLE_CFLAG([-fno-common], [CFLAGS])
LM_TRY_ENABLE_CFLAG([-fno-strict-aliasing], [CFLAGS])
],
[
WFLAGS=""
Expand Down
41 changes: 0 additions & 41 deletions lib/crypto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -5538,47 +5538,6 @@ esac
fi



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to DED_CFLAGS (via CFLAGS)" >&5
printf %s "checking if we can add -fno-strict-aliasing to DED_CFLAGS (via CFLAGS)... " >&6; }
saved_CFLAGS=$CFLAGS;
CFLAGS="-Werror -fno-strict-aliasing $DED_CFLAGS";
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main (void)
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
can_enable_flag=true
else case e in #(
e) can_enable_flag=false ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$saved_CFLAGS;
if test "X$can_enable_flag" = "Xtrue"
then :

DED_CFLAGS="-fno-strict-aliasing $DED_CFLAGS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }

else case e in #(
e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
;;
esac
fi


DED_STATIC_CFLAGS="$DED_CFLAGS"
DED_CFLAGS="$DED_CFLAGS -fPIC"
# Remove -fPIE and -fno-PIE
Expand Down
Loading

0 comments on commit 1054a8b

Please sign in to comment.