Use C++ standard lib from toolchain
Signed-off-by: trns1997 <trns1997@gmail.com>
This commit is contained in:
parent
113ab704c7
commit
54e9e582d5
@ -481,15 +481,17 @@ if(WIN32)
|
|||||||
else()
|
else()
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
# system wide warnings
|
# system wide warnings
|
||||||
-Wall
|
-Wall $<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes> -Wshadow -Wundef
|
||||||
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
|
|
||||||
-Wshadow
|
|
||||||
-Wundef
|
|
||||||
# system wide options
|
# system wide options
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>
|
|
||||||
$<$<COMPILE_LANGUAGE:ASM>:-D__ASSEMBLY__>)
|
$<$<COMPILE_LANGUAGE:ASM>:-D__ASSEMBLY__>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-nostdinc++>)
|
||||||
|
else()
|
||||||
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-D_STDLIB_H_>)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CONFIG_CXX_EXCEPTION)
|
if(NOT CONFIG_CXX_EXCEPTION)
|
||||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-fcheck-new>)
|
$<$<COMPILE_LANGUAGE:CXX>:-fcheck-new>)
|
||||||
|
@ -184,7 +184,12 @@ if(CONFIG_DEBUG_SYMBOLS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ARCHCFLAGS "-Wstrict-prototypes")
|
set(ARCHCFLAGS "-Wstrict-prototypes")
|
||||||
set(ARCHCXXFLAGS "-nostdinc++")
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -nostdinc++")
|
||||||
|
else()
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -D_STDLIB_H_")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CONFIG_CXX_EXCEPTION)
|
if(NOT CONFIG_CXX_EXCEPTION)
|
||||||
string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new")
|
string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new")
|
||||||
|
@ -289,12 +289,18 @@ endif
|
|||||||
# Architecture flags
|
# Architecture flags
|
||||||
|
|
||||||
ARCHCFLAGS += -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -nostdinc++ -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
# When all C++ code is built using GCC 7.1 or a higher version,
|
# When all C++ code is built using GCC 7.1 or a higher version,
|
||||||
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
||||||
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||||
ARCHCFLAGS += -Wno-psabi
|
ARCHCFLAGS += -Wno-psabi
|
||||||
ARCHCXXFLAGS += -Wno-psabi
|
ARCHCXXFLAGS += -Wno-psabi
|
||||||
@ -386,6 +392,10 @@ ifeq ($(CONFIG_ARCH_COVERAGE),y)
|
|||||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libgcov.a))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libstdc++.a))
|
||||||
|
endif
|
||||||
|
|
||||||
# Zig toolchain
|
# Zig toolchain
|
||||||
|
|
||||||
include $(TOPDIR)/tools/Zig.defs
|
include $(TOPDIR)/tools/Zig.defs
|
||||||
|
@ -96,7 +96,7 @@ ifeq ($(CONFIG_ARCH_FPU),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Werror -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Werror -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
@ -105,6 +105,12 @@ ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
|||||||
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
||||||
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||||
ARCHCFLAGS += -Wno-psabi
|
ARCHCFLAGS += -Wno-psabi
|
||||||
ARCHCXXFLAGS += -Wno-psabi
|
ARCHCXXFLAGS += -Wno-psabi
|
||||||
|
@ -123,8 +123,14 @@ set(ARCHCFLAGS
|
|||||||
"-Wstrict-prototypes -fno-common -Wall -Wshadow -Werror -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
"-Wstrict-prototypes -fno-common -Wall -Wshadow -Werror -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
||||||
)
|
)
|
||||||
set(ARCHCXXFLAGS
|
set(ARCHCXXFLAGS
|
||||||
"-nostdinc++ -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
"-fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas")
|
||||||
)
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -nostdinc++")
|
||||||
|
else()
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -D_STDLIB_H_")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT ${CONFIG_ARCH_TOOLCHAIN_CLANG})
|
if(NOT ${CONFIG_ARCH_TOOLCHAIN_CLANG})
|
||||||
string(APPEND ARCHCFLAGS " -Wno-psabi")
|
string(APPEND ARCHCFLAGS " -Wno-psabi")
|
||||||
string(APPEND ARCHCXXFLAGS " -Wno-psabi")
|
string(APPEND ARCHCXXFLAGS " -Wno-psabi")
|
||||||
|
@ -99,11 +99,17 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -46,11 +46,17 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -65,11 +65,17 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ARCHCPUFLAGS = -mrtl-version-$(RTL_VERSION) -Wa,-rtl$(RTL_VERSION)
|
ARCHCPUFLAGS = -mrtl-version-$(RTL_VERSION) -Wa,-rtl$(RTL_VERSION)
|
||||||
ARCHCPUFLAGS += -Wa,-p -mmsg-full-path -TARG:arch=cevaxc5 -Wa,-vdiv4 -Wno-unused
|
ARCHCPUFLAGS += -Wa,-p -mmsg-full-path -TARG:arch=cevaxc5 -Wa,-vdiv4 -Wno-unused
|
||||||
|
|
||||||
|
@ -65,11 +65,17 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ARCHCPUFLAGS = -mrtl-version-$(RTL_VERSION) -Wa,-rtl$(RTL_VERSION)
|
ARCHCPUFLAGS = -mrtl-version-$(RTL_VERSION) -Wa,-rtl$(RTL_VERSION)
|
||||||
ARCHCPUFLAGS += -Wa,-p
|
ARCHCPUFLAGS += -Wa,-p
|
||||||
|
|
||||||
|
@ -260,11 +260,17 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -72,11 +72,17 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -44,7 +44,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
@ -65,6 +65,12 @@ OBJDUMP = $(CROSSDEV)objdump
|
|||||||
|
|
||||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name))
|
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name))
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_LIBM_TOOLCHAIN),y)
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN),y)
|
||||||
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a))
|
EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a))
|
||||||
endif
|
endif
|
||||||
|
@ -55,11 +55,17 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -113,8 +113,13 @@ set(ARCHCFLAGS
|
|||||||
"-Wstrict-prototypes -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
"-Wstrict-prototypes -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
||||||
)
|
)
|
||||||
set(ARCHCXXFLAGS
|
set(ARCHCXXFLAGS
|
||||||
"-nostdinc++ -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
"-fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas")
|
||||||
)
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -nostdinc++")
|
||||||
|
else()
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -D_STDLIB_H_")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT ${CONFIG_ARCH_TOOLCHAIN_CLANG})
|
if(NOT ${CONFIG_ARCH_TOOLCHAIN_CLANG})
|
||||||
string(APPEND ARCHCFLAGS " -Wno-psabi")
|
string(APPEND ARCHCFLAGS " -Wno-psabi")
|
||||||
|
@ -78,7 +78,7 @@ ifeq ($(CONFIG_ARCH_COVERAGE_ALL),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
@ -87,6 +87,12 @@ ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
|||||||
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
||||||
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||||
ARCHCFLAGS += -Wno-psabi
|
ARCHCFLAGS += -Wno-psabi
|
||||||
ARCHCXXFLAGS += -Wno-psabi
|
ARCHCXXFLAGS += -Wno-psabi
|
||||||
|
@ -99,7 +99,12 @@ if(CONFIG_CXX_STANDARD)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ARCHCFLAGS "-Wstrict-prototypes")
|
set(ARCHCFLAGS "-Wstrict-prototypes")
|
||||||
set(ARCHCXXFLAGS "-nostdinc++")
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -nostdinc++")
|
||||||
|
else()
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -D_STDLIB_H_")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CONFIG_CXX_EXCEPTION)
|
if(NOT CONFIG_CXX_EXCEPTION)
|
||||||
string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new")
|
string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new")
|
||||||
|
@ -77,11 +77,17 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -89,8 +89,13 @@ set(ARCHCFLAGS
|
|||||||
"-Wstrict-prototypes -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
"-Wstrict-prototypes -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
||||||
)
|
)
|
||||||
set(ARCHCXXFLAGS
|
set(ARCHCXXFLAGS
|
||||||
"-nostdinc++ -fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas"
|
"-fno-common -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas")
|
||||||
)
|
|
||||||
|
if(NOT CONFIG_LIBCXXTOOLCHAIN)
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -nostdinc++")
|
||||||
|
else()
|
||||||
|
set(ARCHCXXFLAGS "${ARCHCXXFLAGS} -D_STDLIB_H_")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_CXX_EXCEPTION)
|
if(CONFIG_CXX_EXCEPTION)
|
||||||
string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new")
|
string(APPEND ARCHCXXFLAGS " -fno-exceptions -fcheck-new")
|
||||||
|
@ -102,7 +102,7 @@ ifeq ($(CONFIG_ARCH_INSTRUMENT_ALL),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
@ -111,6 +111,12 @@ ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
|||||||
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
||||||
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||||
ARCHCFLAGS += -Wno-psabi
|
ARCHCFLAGS += -Wno-psabi
|
||||||
ARCHCXXFLAGS += -Wno-psabi
|
ARCHCXXFLAGS += -Wno-psabi
|
||||||
|
@ -106,7 +106,7 @@ ifeq ($(CONFIG_ARCH_INSTRUMENT_ALL),y)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
@ -115,6 +115,12 @@ ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
|||||||
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
# we can safely disregard warnings of the type "parameter passing for X changed in GCC 7.1."
|
||||||
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
# Refer to : https://stackoverflow.com/questions/48149323/what-does-the-gcc-warning-project-parameter-passing-for-x-changed-in-gcc-7-1-m
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
ifneq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||||
ARCHCFLAGS += -Wno-psabi
|
ARCHCFLAGS += -Wno-psabi
|
||||||
ARCHCXXFLAGS += -Wno-psabi
|
ARCHCXXFLAGS += -Wno-psabi
|
||||||
|
@ -102,7 +102,7 @@ endif
|
|||||||
# Add -fno-common because macOS "ld -r" doesn't seem to pick objects
|
# Add -fno-common because macOS "ld -r" doesn't seem to pick objects
|
||||||
# for common symbols.
|
# for common symbols.
|
||||||
ARCHCFLAGS += -fno-common
|
ARCHCFLAGS += -fno-common
|
||||||
ARCHCXXFLAGS += -fno-common -nostdinc++
|
ARCHCXXFLAGS += -fno-common
|
||||||
|
|
||||||
# Add -fvisibility=hidden
|
# Add -fvisibility=hidden
|
||||||
# Because we don't want export nuttx's symbols to share libraries
|
# Because we don't want export nuttx's symbols to share libraries
|
||||||
@ -116,6 +116,12 @@ ARCHCXXFLAGS += -ffunction-sections -fdata-sections
|
|||||||
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
ARCHCXXFLAGS += -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LIBCXXTOOLCHAIN),y)
|
||||||
|
ARCHCXXFLAGS += -nostdinc++
|
||||||
|
else
|
||||||
|
ARCHCXXFLAGS += -D_STDLIB_H_
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CXX_STANDARD),)
|
ifneq ($(CONFIG_CXX_STANDARD),)
|
||||||
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
ARCHCXXFLAGS += -std=$(CONFIG_CXX_STANDARD)
|
||||||
endif
|
endif
|
||||||
|
@ -26,6 +26,11 @@ choice
|
|||||||
prompt "C++ Library"
|
prompt "C++ Library"
|
||||||
default LIBCXXMINI
|
default LIBCXXMINI
|
||||||
|
|
||||||
|
config LIBCXXTOOLCHAIN
|
||||||
|
bool "Toolchain C++ support"
|
||||||
|
---help---
|
||||||
|
Use Standard C++ library from toolchain.
|
||||||
|
|
||||||
config LIBCXXMINI
|
config LIBCXXMINI
|
||||||
bool "Basic C++ support"
|
bool "Basic C++ support"
|
||||||
---help---
|
---help---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user