mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 18:09:48 +00:00
Add Newlib test
This commit is contained in:
parent
0c6dc33d2b
commit
889c98b9af
20
GNUmakefile
20
GNUmakefile
@ -175,19 +175,10 @@ ifeq ($(ARFLAGS),rv)
|
||||
ARFLAGS = r
|
||||
endif
|
||||
|
||||
# Newlib needs _XOPEN_SOURCE=600 for signals
|
||||
TPROG = TestPrograms/test_cxx.cxx
|
||||
HAS_NEWLIB := $(shell $(CXX) $(CXXFLAGS) -dM -E $(TPROG) 2>&1 | $(GREP) -i -c "__NEWLIB__")
|
||||
ifneq ($(HAS_NEWLIB),0)
|
||||
ifeq ($(findstring -D_XOPEN_SOURCE,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -D_XOPEN_SOURCE=600
|
||||
endif
|
||||
endif
|
||||
|
||||
# Clang integrated assembler will be used with -Wa,-q
|
||||
CLANG_INTEGRATED_ASSEMBLER ?= 0
|
||||
|
||||
# original MinGW targets Win2k by default, but lacks proper Win2k support
|
||||
# Original MinGW targets Win2k by default, but lacks proper Win2k support
|
||||
# if target Windows version is not specified, use Windows XP instead
|
||||
ifeq ($(IS_MINGW),1)
|
||||
ifeq ($(findstring -D_WIN32_WINNT,$(CXXFLAGS)),)
|
||||
@ -201,6 +192,15 @@ endif # _WIN32_WINDOWS
|
||||
endif # _WIN32_WINNT
|
||||
endif # IS_MINGW
|
||||
|
||||
# Newlib needs _XOPEN_SOURCE=600 for signals
|
||||
TPROG = TestPrograms/test_newlib.cxx
|
||||
HAVE_OPT = $(shell $(CXX) $(CXXFLAGS) $(ZOPT) $(TPROG) -o $(TOUT) 2>&1 | $(GREP) -i -c -E $(BAD_RESULT))
|
||||
ifeq ($(HAVE_OPT),0)
|
||||
ifeq ($(findstring -D_XOPEN_SOURCE,$(CXXFLAGS)),)
|
||||
CXXFLAGS += -D_XOPEN_SOURCE=600
|
||||
endif
|
||||
endif
|
||||
|
||||
###########################################################
|
||||
##### X86/X32/X64 Options #####
|
||||
###########################################################
|
||||
|
8
TestPrograms/test_newlib.cxx
Normal file
8
TestPrograms/test_newlib.cxx
Normal file
@ -0,0 +1,8 @@
|
||||
#include <string>
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#ifndef __NEWLIB__
|
||||
XXX
|
||||
#endif
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user