Blame SOURCES/esc-1.1.2-fix12.patch

f477a5
diff -up ./esc/configure.ac.fix12 ./esc/configure.ac
f477a5
--- ./esc/configure.ac.fix12	2021-09-27 14:53:49.932567105 -0700
f477a5
+++ ./esc/configure.ac	2021-09-27 15:31:30.949185258 -0700
f477a5
@@ -47,6 +47,30 @@ PKG_CHECK_MODULES([DBUS],[dbus-1])
f477a5
 AC_PROG_CC_STDC
f477a5
 
f477a5
 # Compiler flags
f477a5
+
f477a5
+AC_CANONICAL_HOST
f477a5
+ARCH_CPPFLAGS=""
f477a5
+ARCH_CFLAGS=""
f477a5
+
f477a5
+AS_CASE([$host_os],
f477a5
+        [linux*],
f477a5
+        [
f477a5
+           AS_CASE([$host_cpu],
f477a5
+                   [x86_64],
f477a5
+                   [
f477a5
+                       ARCH_CPPFLAGS="-fcf-protection=full"
f477a5
+                       ARCH_CFLAGS="-fcf-protection=full"
f477a5
+                   ],
f477a5
+                   [i?86],
f477a5
+                   [
f477a5
+                       ARCH_CPPFLAGS="-fcf-protection=full"
f477a5
+                       ARCH_CFLAGS="-fcf-protection=full"
f477a5
+                   ])
f477a5
+        ])
f477a5
+AC_SUBST(ARCH_CPPFLAGS)
f477a5
+AC_SUBST(ARCH_CFLAGS)
f477a5
+
f477a5
+
f477a5
 ESC_CFLAGS="$GOBJECT_CFLAGS"
f477a5
 ESC_LIBS="$GOBJECT_LIBS $NSS_LIBS" 
f477a5
 
f477a5
diff -up ./esc/src/lib/coolkey/Makefile.am.fix12 ./esc/src/lib/coolkey/Makefile.am
f477a5
--- ./esc/src/lib/coolkey/Makefile.am.fix12	2021-09-27 15:26:24.130634037 -0700
f477a5
+++ ./esc/src/lib/coolkey/Makefile.am	2021-09-27 15:27:24.332545740 -0700
f477a5
@@ -24,7 +24,7 @@ EXTRA_DIST =
f477a5
 DISTCLEANFILES =
f477a5
 lib_LTLIBRARIES =
f477a5
 bin_PROGRAMS =
f477a5
-COOLKEY_CFLAGS=-D_FORTIFY_SOURCE=2 -fcf-protection=full
f477a5
+COOLKEY_CFLAGS=-D_FORTIFY_SOURCE=2 $(ARCH_CFLAGS)
f477a5
 
f477a5
 AM_CPPFLAGS += \
f477a5
 	$(COOLKEY_CFLAGS) \
f477a5
diff -up ./esc/src/lib/coolkey-mgr/Makefile.am.fix12 ./esc/src/lib/coolkey-mgr/Makefile.am
f477a5
--- ./esc/src/lib/coolkey-mgr/Makefile.am.fix12	2021-09-27 15:34:18.400943562 -0700
f477a5
+++ ./esc/src/lib/coolkey-mgr/Makefile.am	2021-09-27 15:34:51.020896480 -0700
f477a5
@@ -24,7 +24,7 @@ EXTRA_DIST =
f477a5
 DISTCLEANFILES =
f477a5
 lib_LTLIBRARIES =
f477a5
 bin_PROGRAMS =
f477a5
-COOLKEY_MGR_CFLAGS=-fcf-protection=full
f477a5
+COOLKEY_MGR_CFLAGS=$(ARCH_CFLAGS)
f477a5
 
f477a5
 OTHER_CPPFLAGS = -I ../coolkey $(PCSC_CFLAGS) $(COOLKEY_MGR_CFLAGS)
f477a5
 OTHER_LIBS = -L../coolkey/.libs -lCoolkey-1.0 -L../nss-http-client/.libs -lNssHttpClient-1.0 $(DBUS_LIBS)
f477a5
diff -up ./esc/src/lib/nss-http-client/Makefile.am.fix12 ./esc/src/lib/nss-http-client/Makefile.am
f477a5
--- ./esc/src/lib/nss-http-client/Makefile.am.fix12	2021-09-27 15:33:16.482032935 -0700
f477a5
+++ ./esc/src/lib/nss-http-client/Makefile.am	2021-09-27 15:34:04.524963592 -0700
f477a5
@@ -24,7 +24,7 @@ EXTRA_DIST =
f477a5
 DISTCLEANFILES =
f477a5
 lib_LTLIBRARIES =
f477a5
 bin_PROGRAMS =
f477a5
-NSS_HTTP_CLIENT_CFLAGS=-D_FORTIFY_SOURCE=2 -fcf-protection=full
f477a5
+NSS_HTTP_CLIENT_CFLAGS=-D_FORTIFY_SOURCE=2 $(ARCH_CFLAGS)
f477a5
 AM_CPPFLAGS += \
f477a5
 	$(NSS_HTTP_CLIENT_CFLAGS) \
f477a5
 	$(NULL)