Skip to content

Commit 96def63

Browse files
nashifAnas Nashif
authored andcommitted
xtools: get rid of warnings about wrong path
Eliminate following errors: make[2]: /home/nashif/Work/sdk/xtools/outdir/x-tools//bin/-gcc: Command not found make[2]: /home/nashif/Work/sdk/xtools/outdir/x-tools//bin/-gcc: Command not found make[2]: /home/nashif/Work/sdk/xtools/outdir/x-tools//bin/-gcc: Command not found Also, usage of CROSS_COMPILE with a predefined toolchain is not required and complicates things, just call CROSS_COMPILE with the full path if you want to build with a toolchain not supported with Zephyr. Change-Id: I93ec4ff2e04d22cee82c8e4b74b652927572b30a Signed-off-by: Anas Nashif <[email protected]>
1 parent 34ac008 commit 96def63

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

scripts/Makefile.toolchain.xtools

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
ifndef XTOOLS_TOOLCHAIN_PATH
2-
3-
ifeq ($(CROSS_COMPILE),)
42
$(error XTOOLS_TOOLCHAIN_PATH is not set)
5-
else
6-
CROSS_COMPILE_TARGET = $(patsubst %-,%,${CROSS_COMPILE})
7-
CROSS_COMPILE_ROOT = $(dir $(shell which ${CROSS_COMPILE}gcc))/..
83
endif
94

10-
else
5+
ifndef MAKEFILE_TOOLCHAIN_DO_PASS2
116

7+
# arm
128
CROSS_COMPILE_TARGET_arm = arm-none-eabi
13-
CROSS_COMPILE_TARGET_x86 = i586-pc-elf
9+
10+
# x86
11+
CROSS_COMPILE_TARGET_x86 = i586-unknown-elf
1412

1513
CROSS_COMPILE_TARGET = ${CROSS_COMPILE_TARGET_${ARCH}}
1614
CROSS_COMPILE_ROOT = ${XTOOLS_TOOLCHAIN_PATH}/${CROSS_COMPILE_TARGET}
17-
CROSS_COMPILE = ${CROSS_COMPILE_ROOT}/bin/${CROSS_COMPILE_TARGET}-
1815

19-
endif
16+
else
17+
18+
CROSS_COMPILE = ${CROSS_COMPILE_ROOT}/bin/${CROSS_COMPILE_TARGET}-
2019

2120
TOOLCHAIN_CFLAGS = -I${CROSS_COMPILE_ROOT}/${CROSS_COMPILE_TARGET}/sysroot/usr/include
2221
TOOLCHAIN_LIBS = gcc
2322

2423
CROSS_COMPILE_version = $(shell $(CROSS_COMPILE)gcc -dumpversion)
2524
LIB_INCLUDE_DIR += -L ${CROSS_COMPILE_ROOT}/lib/gcc/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_version}/
2625

26+
endif
27+
2728
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS
29+
30+
ifndef MAKEFILE_TOOLCHAIN_DO_PASS2
31+
MAKEFILE_TOOLCHAIN_DO_PASS2=true
32+
endif

0 commit comments

Comments
 (0)