summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Pandey <manish.pandey2@arm.com>2023-05-09 11:04:23 +0200
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2023-05-09 11:04:23 +0200
commitfbce34912ffb4852fc658f8b004a6d252be76a62 (patch)
tree742ee96e74ffcc2d6df1611e815b47df81ac7871
parent865aff3066f270d0890e85a69f6690f775b5bacc (diff)
parent9e2e777a2be7ac66a10110f2c389f3153f1fa5d6 (diff)
downloadarm-trusted-firmware-fbce34912ffb4852fc658f8b004a6d252be76a62.tar.gz
Merge changes from topics "gr/gcc12", "jc/toolchain_update_2.9" into integration
* changes: docs(build): update GCC to 12.2.Rel1 version fix(build): allow lower address access with gcc-12
-rw-r--r--Makefile4
-rw-r--r--docs/getting_started/prerequisites.rst2
-rw-r--r--make_helpers/build_macros.mk6
3 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7368ca59b..8caa5239a 100644
--- a/Makefile
+++ b/Makefile
@@ -414,6 +414,10 @@ ifeq ($(findstring clang,$(notdir $(CC))),)
WARNINGS += -Wunused-but-set-variable -Wmaybe-uninitialized \
-Wpacked-bitfield-compat -Wshift-overflow=2 \
-Wlogical-op
+
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
+TF_CFLAGS += $(call cc_option, --param=min-pagesize=0)
+
else
# using clang
WARNINGS += -Wshift-overflow -Wshift-sign-overflow \
diff --git a/docs/getting_started/prerequisites.rst b/docs/getting_started/prerequisites.rst
index bf10ecffb..a3f8cc850 100644
--- a/docs/getting_started/prerequisites.rst
+++ b/docs/getting_started/prerequisites.rst
@@ -26,7 +26,7 @@ Toolchain
|TF-A| can be built with any of the following *cross-compiler* toolchains that
target the Armv7-A or Armv8-A architectures:
-- GCC >= 11.3.Rel1 (from the `Arm Developer website`_)
+- GCC >= 12.2.Rel1 (from the `Arm Developer website`_)
You will need the targets ``arm-none-eabi`` and ``aarch64-none-elf`` for
AArch32 and AArch64 builds respectively.
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 0c82a715a..9bf26f083 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -104,6 +104,12 @@ define ld_option
$(shell if $(LD) $(1) -v >/dev/null 2>&1; then echo $(1); fi )
endef
+# Convenience function to check for a given compiler option. A call to
+# $(call cc_option, --no-XYZ) will return --no-XYZ if supported by the compiler
+define cc_option
+ $(shell if $(CC) $(1) -c -x c /dev/null -o /dev/null >/dev/null 2>&1; then echo $(1); fi )
+endef
+
# CREATE_SEQ is a recursive function to create sequence of numbers from 1 to
# $(2) and assign the sequence to $(1)
define CREATE_SEQ