* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
93 lines
2.9 KiB
Makefile
93 lines
2.9 KiB
Makefile
################################################################################
|
|
#
|
|
# definition of the toolchain wrapper build commands
|
|
#
|
|
################################################################################
|
|
|
|
# We use --hash-style=both to increase the compatibility of the generated
|
|
# binary with older platforms, except for MIPS, where the only acceptable
|
|
# hash style is 'sysv'
|
|
ifeq ($(findstring mips,$(HOSTARCH)),mips)
|
|
TOOLCHAIN_WRAPPER_HASH_STYLE = sysv
|
|
else
|
|
TOOLCHAIN_WRAPPER_HASH_STYLE = both
|
|
endif
|
|
|
|
TOOLCHAIN_WRAPPER_ARGS = $($(PKG)_TOOLCHAIN_WRAPPER_ARGS)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"'
|
|
|
|
TOOLCHAIN_WRAPPER_OPTS = \
|
|
$(ARCH_TOOLCHAIN_WRAPPER_OPTS) \
|
|
$(call qstrip,$(BR2_SSP_OPTION)) \
|
|
$(call qstrip,$(BR2_TARGET_OPTIMIZATION))
|
|
|
|
ifeq ($(BR2_REPRODUCIBLE),y)
|
|
TOOLCHAIN_WRAPPER_OPTS += -Wl,--build-id=none
|
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
|
|
TOOLCHAIN_WRAPPER_OPTS += -ffile-prefix-map=$(BASE_DIR)=buildroot
|
|
else
|
|
TOOLCHAIN_WRAPPER_OPTS += -D__FILE__=\"\" -D__BASE_FILE__=\"\" -Wno-builtin-macro-redefined
|
|
endif
|
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_7),)
|
|
TOOLCHAIN_WRAPPER_OPTS += -DBR_NEED_SOURCE_DATE_EPOCH
|
|
endif
|
|
endif
|
|
|
|
# Disable -ftree-loop-distribute-patterns on microblaze to
|
|
# workaround a compiler bug with gcc 10 and -O2, -Os or -O3.
|
|
# https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=5879ab5fafedc8f6f9bfe95a4cf8501b0df90edd
|
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97208
|
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_10)$(BR2_microblaze),yy)
|
|
TOOLCHAIN_WRAPPER_OPTS += -fno-tree-loop-distribute-patterns
|
|
endif
|
|
|
|
# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each flag is a
|
|
# separate argument when used in execv() by the toolchain wrapper.
|
|
TOOLCHAIN_WRAPPER_ARGS += \
|
|
-DBR_ADDITIONAL_CFLAGS='$(foreach f,$(TOOLCHAIN_WRAPPER_OPTS),"$(f)"$(comma))'
|
|
|
|
ifeq ($(BR2_CCACHE),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE
|
|
endif
|
|
|
|
ifeq ($(BR2_x86_x1000),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR_OMIT_LOCK_PREFIX
|
|
endif
|
|
|
|
# Avoid FPU bug on XBurst CPUs
|
|
ifeq ($(BR2_mips_xburst),y)
|
|
# Before gcc 4.6, -mno-fused-madd was needed, after -ffp-contract is
|
|
# needed
|
|
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_6),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR_FP_CONTRACT_OFF
|
|
else
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR_NO_FUSED_MADD
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
|
|
endif
|
|
|
|
ifeq ($(BR2_PIC_PIE),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR2_PIC_PIE
|
|
endif
|
|
|
|
ifeq ($(BR2_RELRO_PARTIAL),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR2_RELRO_PARTIAL
|
|
else ifeq ($(BR2_RELRO_FULL),y)
|
|
TOOLCHAIN_WRAPPER_ARGS += -DBR2_RELRO_FULL
|
|
endif
|
|
|
|
define TOOLCHAIN_WRAPPER_BUILD
|
|
$(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_WRAPPER_ARGS) \
|
|
-s -Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE) \
|
|
toolchain/toolchain-wrapper.c \
|
|
-o $(@D)/toolchain-wrapper
|
|
endef
|
|
|
|
define TOOLCHAIN_WRAPPER_INSTALL
|
|
$(INSTALL) -D -m 0755 $(@D)/toolchain-wrapper \
|
|
$(HOST_DIR)/bin/toolchain-wrapper
|
|
endef
|