Fix Makefiles in the data-formatter-stl tests
- specify compiler flag -stdlib=libstdc++ only if using clang (not supported in gcc) llvm-svn: 183333
This commit is contained in:
parent
741cebbea0
commit
c7ffa7a958
|
|
@ -2,7 +2,7 @@ LEVEL = ../../../../../make
|
|||
|
||||
CXX_SOURCES := main.cpp
|
||||
|
||||
include $(LEVEL)/Makefile.rules
|
||||
CFLAGS_EXTRAS := -O0
|
||||
USE_LIBSTDCPP := 1
|
||||
|
||||
CXXFLAGS += -stdlib=libstdc++ -O0
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
include $(LEVEL)/Makefile.rules
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ LEVEL = ../../../../../make
|
|||
|
||||
CXX_SOURCES := main.cpp
|
||||
|
||||
include $(LEVEL)/Makefile.rules
|
||||
CFLAGS_EXTRAS := -O0
|
||||
USE_LIBSTDCPP := 1
|
||||
|
||||
CXXFLAGS += -stdlib=libstdc++ -O0
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
include $(LEVEL)/Makefile.rules
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ LEVEL = ../../../../../make
|
|||
|
||||
CXX_SOURCES := main.cpp
|
||||
|
||||
include $(LEVEL)/Makefile.rules
|
||||
USE_LIBSTDCPP := 1
|
||||
|
||||
CXXFLAGS += -stdlib=libstdc++ -O0
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
include $(LEVEL)/Makefile.rules
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ LEVEL = ../../../../../make
|
|||
|
||||
CXX_SOURCES := main.cpp
|
||||
|
||||
include $(LEVEL)/Makefile.rules
|
||||
CFLAGS_EXTRAS := -O0
|
||||
USE_LIBSTDCPP := 1
|
||||
|
||||
CXXFLAGS += -stdlib=libstdc++ -O0
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
include $(LEVEL)/Makefile.rules
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ LEVEL = ../../../../../make
|
|||
|
||||
CXX_SOURCES := main.cpp
|
||||
|
||||
include $(LEVEL)/Makefile.rules
|
||||
CFLAGS_EXTRAS := -O0
|
||||
USE_LIBSTDCPP := 1
|
||||
|
||||
CXXFLAGS += -O0
|
||||
ifeq (,$(findstring gcc,$(CC)))
|
||||
CXXFLAGS += -stdlib=libstdc++
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
endif
|
||||
include $(LEVEL)/Makefile.rules
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ LEVEL = ../../../../../make
|
|||
|
||||
CXX_SOURCES := main.cpp
|
||||
|
||||
include $(LEVEL)/Makefile.rules
|
||||
CXXFLAGS := -O0
|
||||
USE_LIBSTDCPP := 1
|
||||
|
||||
CXXFLAGS += -stdlib=libstdc++ -O0
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
include $(LEVEL)/Makefile.rules
|
||||
|
|
|
|||
|
|
@ -111,6 +111,17 @@ cxx_compiler = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if
|
|||
# Function that returns the C++ linker, given $(CC) as arg.
|
||||
cxx_linker = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring icc,$(1)), $(subst icc,icpc,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))))
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# C++ standard library options
|
||||
#----------------------------------------------------------------------
|
||||
ifeq (1,$(USE_LIBSTDCPP))
|
||||
# Clang requires an extra flag: -stdlib=libstdc++
|
||||
ifneq (,$(findstring clang,$(CC)))
|
||||
CFLAGS += -stdlib=libstdc++
|
||||
LDFLAGS += -stdlib=libstdc++
|
||||
endif
|
||||
endif
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# dylib settings
|
||||
#----------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue