All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mmc-utils: fix build failure with _FORTIFY_SOURCE=3
@ 2023-08-09 21:03 Giulio Benetti
  2023-08-22 20:20 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Giulio Benetti @ 2023-08-09 21:03 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti

At the moment mmc-utils doesn't support _FORTIFY_SOURCE=3 so let's set it
to 2 at maximum by undefining _FORTIFY_SOURCE and redefining it to 2.

Fixes:
http://autobuild.buildroot.net/results/32d2f9894efc1e743ca6ae7d2fe3108ccf41c188

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/mmc-utils/mmc-utils.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/mmc-utils/mmc-utils.mk b/package/mmc-utils/mmc-utils.mk
index 9da9c30293..19013bcc1c 100644
--- a/package/mmc-utils/mmc-utils.mk
+++ b/package/mmc-utils/mmc-utils.mk
@@ -16,6 +16,11 @@ ifeq ($(BR2_PACKAGE_MMC_UTILS_ENABLE_DANGEROUS_COMMANDS),y)
 MMC_UTILS_CFLAGS += -DDANGEROUS_COMMANDS_ENABLED
 endif
 
+# disable _FORTIFY_SOURCE=3 and set it to 2
+ifeq ($(BR2_FORTIFY_SOURCE_3),y)
+MMC_UTILS_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+endif
+
 # override AM_CFLAGS as the project Makefile uses it to pass
 # -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2, and the latter conflicts
 # with the _FORTIFY_SOURCE that we pass when hardening options are
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-22 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 21:03 [Buildroot] [PATCH] package/mmc-utils: fix build failure with _FORTIFY_SOURCE=3 Giulio Benetti
2023-08-22 20:20 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.