0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

configure: Fix emitting option for CET on aarch64. (gcc)

This commit is contained in:
Jason Volk 2023-04-05 21:01:08 -07:00
parent 02dd645748
commit 922db35dd5

View file

@ -769,16 +769,20 @@ AM_COND_IF([GCC],
[
RB_VAR_PREPEND([CXXFLAGS], ["-fstack-protector-explicit"])
dnl These flags should not be used on Intel-CET capable platforms
dnl TODO: XXX
AS_IF([test "$CXX_EPOCH" -ge "9"],
AS_CASE([$host_cpu],
[x86_64],
[
AM_COND_IF([GENERIC],
dnl These flags should not be used on Intel-CET capable platforms
dnl TODO: XXX
AS_IF([test "$CXX_EPOCH" -ge "9"],
[
RB_VAR_PREPEND([CXXFLAGS], ["-fcf-protection=full"])
], [
RB_VAR_PREPEND([CXXFLAGS], ["-fcf-protection=none"])
RB_VAR_PREPEND([CXXFLAGS], ["-mmanual-endbr"])
AM_COND_IF([GENERIC],
[
RB_VAR_PREPEND([CXXFLAGS], ["-fcf-protection=return"])
], [
RB_VAR_PREPEND([CXXFLAGS], ["-fcf-protection=none"])
RB_VAR_PREPEND([CXXFLAGS], ["-mmanual-endbr"])
])
])
])
])