diff -Nru gcc-13-13.2.0/debian/changelog gcc-13-13.2.0/debian/changelog --- gcc-13-13.2.0/debian/changelog 2023-12-14 19:55:12.000000000 +0100 +++ gcc-13-13.2.0/debian/changelog 2024-01-04 16:03:12.000000000 +0100 @@ -1,3 +1,10 @@ +gcc-13 (13.2.0-9.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Enable PAC/BTI on arm64. + + -- Emanuele Rocca Thu, 04 Jan 2024 16:03:12 +0100 + gcc-13 (13.2.0-9) unstable; urgency=medium * Update to git 20231214 from the gcc-13 branch. diff -Nru gcc-13-13.2.0/debian/rules2 gcc-13-13.2.0/debian/rules2 --- gcc-13-13.2.0/debian/rules2 2023-12-09 20:15:56.000000000 +0100 +++ gcc-13-13.2.0/debian/rules2 2024-01-04 16:03:12.000000000 +0100 @@ -199,6 +199,16 @@ STAGE1_LDFLAGS = endif +ifeq ($(DEB_TARGET_ARCH),arm64) + ifeq ($(DEB_CROSS),yes) + CFLAGS_FOR_TARGET += -mbranch-protection=standard + CXXFLAGS_FOR_TARGET += -mbranch-protection=standard + else + CFLAGS += -mbranch-protection=standard + CXXFLAGS += -mbranch-protection=standard + endif +endif + # set CFLAGS/LDFLAGS for the configure step only, maybe be modifed for some target # all other flags are passed to the make step. pass_vars = $(foreach v,$(1),$(if $($(v)),$(v)="$($(v))"))