]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix build on amazonlinux 2023 15361/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 27 Mar 2025 09:41:19 +0000 (10:41 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 27 Mar 2025 09:43:09 +0000 (10:43 +0100)
builder-support/specs/dnsdist.spec

index 056d3b733d2362c142df016094f362b7f94844e4..b50b7e1f9651912805035f5fe02a9df007596d10 100644 (file)
@@ -82,8 +82,13 @@ export LDFLAGS="-fuse-ld=lld -Wl,--build-id=sha1"
 %else
 %define cf_protection -fcf-protection
 %endif
-export CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection %{cf_protection} -gdwarf-4"
-export CXXFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection %{cf_protection} -gdwarf-4"
+%if "%{_arch}" == "aarch64" && 0%{?amzn2023}
+%define stack_clash_protection %{nil}
+%else
+%define stack_clash_protection -fstack-clash-protection
+%endif
+export CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables %{stack_clash_protection} %{cf_protection} -gdwarf-4"
+export CXXFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables %{stack_clash_protection} %{cf_protection} -gdwarf-4"
 %endif
 
 #export AR=gcc-ar
@@ -114,7 +119,7 @@ export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/lib64/pkgconfig
   -Dre2=enabled \
   -Ddns-over-quic=enabled \
   -Ddns-over-http3=enabled \
-%ifarch aarch64
+%if "%{_arch}" == "aarch64" || 0%{?amzn2023}
   -Dxsk=disabled \
 %endif
   -Dyaml=enabled