diff -Nru libopaque-0.99.7/debian/changelog libopaque-0.99.7/debian/changelog
--- libopaque-0.99.7/debian/changelog	2024-09-08 14:36:45.000000000 +0800
+++ libopaque-0.99.7/debian/changelog	2024-09-19 10:33:11.000000000 +0800
@@ -1,3 +1,9 @@
+libopaque (0.99.7-1.1) UNRELEASED; urgency=medium
+
+  * Avoid using -fcf-protection=full on architectures that do not support it.
+
+ -- Gui-Yue <yuemeng.gui@gmail.com>  Thu, 19 Sep 2024 10:33:11 +0800
+
 libopaque (0.99.7-1) unstable; urgency=low
 
   * New upstream, released Sept 8, 2024.
diff -Nru libopaque-0.99.7/debian/patches/fix-fcf-protection=full_error.patch libopaque-0.99.7/debian/patches/fix-fcf-protection=full_error.patch
--- libopaque-0.99.7/debian/patches/fix-fcf-protection=full_error.patch	1970-01-01 08:00:00.000000000 +0800
+++ libopaque-0.99.7/debian/patches/fix-fcf-protection=full_error.patch	2024-09-19 10:33:05.000000000 +0800
@@ -0,0 +1,37 @@
+--- a/src/makefile
++++ b/src/makefile
+@@ -13,16 +13,20 @@
+ AR?=ar
+ 
+ UNAME := $(shell uname -s)
++ARCH := $(shell uname -m)
+ ifeq ($(UNAME),Darwin)
+ 	SOEXT=dylib
+ 	SOFLAGS=-Wl,-install_name,$(DESTDIR)$(PREFIX)/lib/libopaque.$(SOEXT)
+ else
+ 	CFLAGS+=-Wl,-z,defs -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,now \
+ 			  -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error \
+-			  -fcf-protection=full 
+ 	#		  -mbranch-protection=standard -fstrict-flex-arrays=3 
+ 	SOEXT=so
+ 	SOFLAGS=-Wl,-soname,libopaque.$(SOEXT).$(SOVER)
++
++	ifeq ($(ARCH),x86_64)
++		CFLAGS += -fcf-protection=full
++	endif
+ endif
+ 
+ SODIUM_NEWER_THAN_1_0_18 := $(shell pkgconf --atleast-version=1.0.19 libsodium; echo $$?)
+@@ -54,7 +58,11 @@
+ debug: all
+ 
+ asan: DEFINES=-DTRACE -DNORANDOM
+-asan: CFLAGS=-fsanitize=address -static-libasan -g -march=native -Wall -O2 -g -fstack-protector-strong -fpic -fstack-clash-protection -fcf-protection=full -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,noexecstack $(DEFINES)
++asan:
++	CFLAGS=-fsanitize=address -static-libasan -g -march=native -Wall -O2 -g -fstack-protector-strong -fpic -fstack-clash-protection -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,noexecstack $(DEFINES)
++	ifeq ($(ARCH),x86_64)
++		CFLAGS += -fcf-protection=full
++	endif
+ asan: LDFLAGS+= -fsanitize=address -static-libasan
+ asan: all
+ 
diff -Nru libopaque-0.99.7/debian/patches/series libopaque-0.99.7/debian/patches/series
--- libopaque-0.99.7/debian/patches/series	2024-09-08 14:36:45.000000000 +0800
+++ libopaque-0.99.7/debian/patches/series	2024-09-19 10:28:22.000000000 +0800
@@ -1 +1,2 @@
 #0001-makefile-installation.patch
+fix-fcf-protection=full_error.patch
