Skip to content

Commit 6a2084e

Browse files
Andrew BoieAnas Nashif
authored andcommitted
Makefile.toolchain.zephyr: fix C++ on Xtensa
Need to set CXXFLAGS just like we did CFLAGS. Signed-off-by: Andrew Boie <[email protected]>
1 parent a4a9890 commit 6a2084e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/Makefile.toolchain.zephyr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ SYSROOT_TARGET_xtensa = xtensa-$(TOOLCHAIN_VENDOR)-elf
101101
CROSS_COMPILE_xtensa=$(TOOLCHAIN_HOME)/usr/bin/$(CROSS_COMPILE_TARGET_xtensa)/$(CROSS_COMPILE_TARGET_xtensa)-
102102
ifeq ($(ARCH),xtensa)
103103
SYSROOT := ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${SYSROOT_TARGET_${ARCH}}
104-
CFLAGS += --sysroot=$(SYSROOT) -I=/usr/include -I=/usr/include/arch/include
104+
common_xtensa_flags := --sysroot=$(SYSROOT) -I=/usr/include -I=/usr/include/arch/include
105+
CFLAGS += $(common_xtensa_flags)
106+
CXXFLAGS += $(common_xtensa_flags)
105107
endif
106108
TOOLCHAIN_LIBS_xtensa = hal
107109

0 commit comments

Comments
 (0)