Skip to content

Commit 7c942a2

Browse files
committed
configs/artik055s: Fix CI error
artik055s/audio supports LIBCXX_EXCEPTION. so fix the mismatching Make.defs and Exception handling requires newer toolchain version. so update defconfig to use 2.0.0 docker image.
1 parent 9397917 commit 7c942a2

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

build/configs/artik055s/Make.defs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ include ${TOPDIR}/arch/$(CONFIG_ARCH)/src/$(ARCH_FAMILY)/Toolchain.defs
5757

5858
LDSCRIPT = flash.ld
5959

60+
ifeq ($(CONFIG_LIBCXX_HAVE_LIBSUPCXX),y)
61+
ifeq ($(CONFIG_LIBCXX_EXCEPTION),y)
62+
LIBSUPXX = ${shell $(CC) $(CXXFLAGS) --print-file-name=libsupc++.a}
63+
EXTRA_LIBPATHS += -L "${shell dirname "$(LIBSUPXX)"}"
64+
EXTRA_LIBS += -lsupc++
65+
else
66+
LIBSUPXX = ${shell $(CC) $(CXXFLAGS) --print-file-name=libsupc++_nano.a}
67+
EXTRA_LIBPATHS += -L "${shell dirname "$(LIBSUPXX)"}"
68+
EXTRA_LIBS += -lsupc++_nano
69+
endif
70+
endif
71+
6072
ifeq ($(WINTOOL),y)
6173
# Windows-native toolchains
6274
DIRLINK = $(TOPDIR)/tools/copydir.sh
@@ -131,8 +143,14 @@ else ifeq ($(CONFIG_CXX_VERSION_14),y)
131143
else
132144
CXXFLAGS += -std=c++11
133145
endif
134-
CXXFLAGS += -fno-exceptions -fcheck-new -fno-rtti
135-
CXXFLAGS += -pedantic -D_DEBUG -D_LIBCPP_BUILD_STATIC -D_LIBCPP_NO_EXCEPTIONS -ffunction-sections -fdata-sections
146+
CXXFLAGS += -fcheck-new -fno-rtti
147+
CXXFLAGS += -pedantic -D_DEBUG -D_LIBCPP_BUILD_STATIC -ffunction-sections -fdata-sections -D__GLIBCXX__
148+
endif
149+
150+
ifeq ($(CONFIG_LIBCXX_EXCEPTION),y)
151+
CXXFLAGS += -fexceptions
152+
else
153+
CXXFLAGS += -fno-exceptions -D_LIBCPP_NO_EXCEPTIONS
136154
endif
137155
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
138156
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
@@ -148,7 +166,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
148166
LDFLAGS += -g
149167
endif
150168

151-
LDFLAGS += -nostartfiles -nodefaultlibs --gc-sections
169+
LDFLAGS += --gc-sections
152170
LDFLAGS += --defsym=CONFIG_IDLETHREAD_STACKSIZE=$(CONFIG_IDLETHREAD_STACKSIZE)
153171

154172
HOSTCC = gcc

build/configs/artik055s/audio/defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CONFIG_HOST_LINUX=y
1313
# CONFIG_HOST_WINDOWS is not set
1414
# CONFIG_HOST_OTHER is not set
1515
# CONFIG_WINDOWS_NATIVE is not set
16-
16+
CONFIG_DOCKER_VERSION="2.0.0"
1717
#
1818
# Build Configuration
1919
#

0 commit comments

Comments
 (0)