Skip to content

Commit

Permalink
Refactor and comment downloaded and compiled toolchains
Browse files Browse the repository at this point in the history
Move the common parts of br-ext/configs/toolchain-aarch32-sdk and
br-ext/configs/toolchain-aarch64-sdk into
br-ext/configs/toolchain-common-sdk.
br-ext/configs/toolchain-aarch32-sdk was previously using
BR2_TOOLCHAIN_EXTERNAL_GCC_11=y and is now by using
br-ext/configs/toolchain-common-sdk updated to use the correct
BR2_TOOLCHAIN_EXTERNAL_GCC_14=y.

Add comments where to update if compiled or downloaded toolchain is
updated.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
  • Loading branch information
jenswi-linaro authored and jforissier committed Jul 4, 2024
1 parent 9edc5be commit 5f64ee7
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 21 deletions.
2 changes: 2 additions & 0 deletions br-ext/configs/sdk-common
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Please keep GCC version and headers in sync with
# br-ext/configs/toolchain-common-sdk
BR2_CCACHE=y
BR2_CCACHE_USE_BASEDIR=y
BR2_GCC_VERSION_14_X=y
Expand Down
1 change: 1 addition & 0 deletions br-ext/configs/toolchain-aarch32
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Please keep in sync with the downloaded AArch32 toolchain in toolchain.mk
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="%TOP_DIR%/toolchains/aarch32"
Expand Down
9 changes: 0 additions & 9 deletions br-ext/configs/toolchain-aarch32-sdk
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="%TOP_DIR%/toolchains/aarch32"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux"
BR2_TOOLCHAIN_EXTERNAL_GCC_11=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_1=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_FORTRAN=n
BR2_TOOLCHAIN_EXTERNAL_OPENMP=n
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=n
1 change: 1 addition & 0 deletions br-ext/configs/toolchain-aarch64
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Please keep in sync with the downloaded AArch64 toolchain in toolchain.mk
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="%TOP_DIR%/toolchains/aarch64"
Expand Down
9 changes: 0 additions & 9 deletions br-ext/configs/toolchain-aarch64-sdk
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="%TOP_DIR%/toolchains/aarch64"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="aarch64-linux"
BR2_TOOLCHAIN_EXTERNAL_GCC_14=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_1=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_FORTRAN=n
BR2_TOOLCHAIN_EXTERNAL_OPENMP=n
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=n
10 changes: 10 additions & 0 deletions br-ext/configs/toolchain-common-sdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Please keep GCC version and headers in sync with br-ext/configs/sdk-common
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_GCC_14=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_1=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_FORTRAN=n
BR2_TOOLCHAIN_EXTERNAL_OPENMP=n
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=n
1 change: 1 addition & 0 deletions br-ext/configs/toolchain-riscv64
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Please keep in sync with the downloaded riscv64 toolchain in toolchain.mk
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="%TOP_DIR%/toolchains/riscv64"
Expand Down
7 changes: 4 additions & 3 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ BUILDROOT_TOOLCHAIN=toolchain-riscv$(COMPILE_NS_USER)
endif
else ifeq ($(UNAME_M),aarch64)
ifeq ($(COMPILE_NS_USER),64)
BUILDROOT_TOOLCHAIN=toolchain-aarch64-sdk
BUILDROOT_TOOLCHAIN=toolchain-aarch64-sdk toolchain-common-sdk
else
BUILDROOT_TOOLCHAIN=toolchain-aarch32
endif
else
BUILDROOT_TOOLCHAIN=toolchain-aarch$(COMPILE_NS_USER)-sdk
BUILDROOT_TOOLCHAIN=toolchain-aarch$(COMPILE_NS_USER)-sdk toolchain-common-sdk
endif
endif

Expand Down Expand Up @@ -344,7 +344,8 @@ buildroot: optee-os
--top-dir "$(ROOT)" \
--br-defconfig build/br-ext/configs/optee_$(BUILDROOT_ARCH) \
--br-defconfig build/br-ext/configs/optee_generic \
--br-defconfig build/br-ext/configs/$(BUILDROOT_TOOLCHAIN) \
$(addprefix --br-defconfig build/br-ext/configs/, \
$(BUILDROOT_TOOLCHAIN)) \
$(DEFCONFIG_GDBSERVER) \
$(DEFCONFIG_XEN) \
$(DEFCONFIG_TSS) \
Expand Down
5 changes: 5 additions & 0 deletions toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ endef

ifeq ($(UNAME_M),x86_64)
ifeq ($(ARCH),arm)
# Please keep in sync with br-ext/configs/toolchain-aarch32
# and below for aarch64 host
AARCH32_PATH ?= $(TOOLCHAIN_ROOT)/aarch32
AARCH32_CROSS_COMPILE ?= $(AARCH32_PATH)/bin/arm-linux-gnueabihf-
AARCH32_GCC_VERSION ?= arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf
SRC_AARCH32_GCC ?= https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/$(AARCH32_GCC_VERSION).tar.xz

# Please keep in sync with br-ext/configs/toolchain-aarch64
AARCH64_PATH ?= $(TOOLCHAIN_ROOT)/aarch64
AARCH64_CROSS_COMPILE ?= $(AARCH64_PATH)/bin/aarch64-linux-gnu-
AARCH64_GCC_VERSION ?= arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu
Expand Down Expand Up @@ -116,6 +119,8 @@ endif

else ifeq ($(UNAME_M),aarch64)

# Please keep in sync with br-ext/configs/toolchain-aarch32
# and above for x86_64 host
AARCH32_PATH ?= $(TOOLCHAIN_ROOT)/aarch32
AARCH32_CROSS_COMPILE ?= $(AARCH32_PATH)/bin/arm-linux-gnueabihf-
AARCH32_GCC_VERSION ?= arm-gnu-toolchain-11.3.rel1-aarch64-arm-none-linux-gnueabihf
Expand Down

0 comments on commit 5f64ee7

Please sign in to comment.