[Buildroot] [PATCH] package/mmc-utils: fix build failure with _FORTIFY_SOURCE=3
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Tue Aug 22 20:20:33 UTC 2023
On Wed, 9 Aug 2023 23:03:38 +0200
Giulio Benetti <giulio.benetti at benettiengineering.com> wrote:
> +# 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
This is a work-around, not a proper fix, and actually the following
defconfig builds just fine today:
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_FORTIFY_SOURCE_3=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_MMC_UTILS=y
# BR2_TARGET_ROOTFS_TAR is not set
So there is really no reason to globally override _FORTIFY_SOURCE=3 for
mmc-utils, it builds fine at least in some situations. So it needs to
be narrowed down a little bit further, up to the point where we can see
if it's a glibc bug, or a gcc bug, possibly architecture specific.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
More information about the buildroot
mailing list