Skip to content
Snippets Groups Projects
Commit 11d3dfb3 authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

Allow to customize build flags to pass for each platform

Because some platforms may required to disable some flags, this
allow to control which flags are passed for each platform.
parent fbc0aabe
No related branches found
No related tags found
4 merge requests!16Merge changes from apertis/v2024-updates into apertis/v2024,!13Backport v2024 <- v2025dev2: Add build profiles for QEMU with and without virtualization,!12Allow to customize build flags to pass for each platform,!11Add build profile for QEMU with and without virtualization
Pipeline #686610 passed
......@@ -3,17 +3,24 @@
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildtools.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-relro,-stackprotector,-format
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export CFG_USER_TA_TARGETS = ta_arm64
platforms := k3-am62x vexpress-qemu_armv8a
# k3 platform
k3-am62x_DEB_BUILD_MAINT_OPTIONS = hardening=+all,-relro
k3-am62x_CFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro dpkg-buildflags --get CFLAGS)
k3-am62x_CPPFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro dpkg-buildflags --get CPPFLAGS)
k3-am62x_CXXFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro dpkg-buildflags --get CXXFLAGS)
k3-am62x_LDFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro dpkg-buildflags --get LDFLAGS)
k3-am62x_assigns := O=out/arm-plat-k3 CFG_ARM64_core=y
# qemu platform as non debug
vexpress-qemu_armv8a_DEB_BUILD_MAINT_OPTIONS = hardening=+all,-relro,-stackprotector,-format
vexpress-qemu_armv8a_CFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro,-stackprotector,-format dpkg-buildflags --get CFLAGS)
vexpress-qemu_armv8a_CPPFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro,-stackprotector,-format dpkg-buildflags --get CPPFLAGS)
vexpress-qemu_armv8a_CXXFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro,-stackprotector,-format dpkg-buildflags --get CXXFLAGS)
vexpress-qemu_armv8a_LDFLAGS = $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all,-relro,-stackprotector,-format dpkg-buildflags --get LDFLAGS)
vexpress-qemu_armv8a_subplatforms := vexpress-qemu_armv8a_non-virt vexpress-qemu_armv8a_virt
vexpress-qemu_armv8a_non-virt_assigns := O=out/arm-plat-vexpress CFG_TEE_CORE_LOG_LEVEL=3 CFG_TEE_BENCHMARK=n CFG_ARM_GICV3=y CFG_ARM64_core=y CFG_VIRTUALIZATION=n
vexpress-qemu_armv8a_virt_assigns := O=out/arm-plat-vexpress-virtualized CFG_TEE_CORE_LOG_LEVEL=3 CFG_TEE_BENCHMARK=n CFG_ARM_GICV3=y CFG_ARM64_core=y CFG_VIRTUALIZATION=y
......@@ -24,6 +31,8 @@ define build_platform
$(eval subplatforms := $(if $($(platform)_subplatforms), $($(platform)_subplatforms), $(platform)))
$(foreach subplatform, $(subplatforms), \
CROSS_COMPILE=aarch64-linux-gnu- \
CFLAGS='$($(platform)_CFLAGS)' CPPFLAGS='$($(platform)_CPPFLAGS)' \
CXXFLAGS='$($(platform)_CXXFLAGS)' LDFLAGS='$($(platform)_LDFLAGS)' \
make PLATFORM=$(platform) $($(subplatform)_assigns) DEBUG=$(debug) V=1; \
)
endef
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment