Index: SingleSource/UnitTests/C++11/CMakeLists.txt =================================================================== --- SingleSource/UnitTests/C++11/CMakeLists.txt +++ SingleSource/UnitTests/C++11/CMakeLists.txt @@ -1,3 +1,6 @@ list(APPEND CXXFLAGS -std=c++11 -pthread) list(APPEND LDFLAGS -lstdc++ -pthread) +if("${ARCH}" STREQUAL "Mips") + list(APPEND LDFLAGS -Wl,--whole-archive -lpthread -Wl,--no-whole-archive) +endif() llvm_singlesource() Index: SingleSource/UnitTests/C++11/Makefile =================================================================== --- SingleSource/UnitTests/C++11/Makefile +++ SingleSource/UnitTests/C++11/Makefile @@ -10,3 +10,8 @@ LDFLAGS += -lstdc++ -pthread include $(LEVEL)/SingleSource/Makefile.singlesrc + +ifeq ($(ARCH),Mips) +# TODO +LDFLAGS += -Wl,--whole-archive -lpthread -Wl,--no-whole-archive +endif \ No newline at end of file