Fixes for mingw and cygwin builds.
This commit is contained in:
parent
f323876d02
commit
fae57fcf12
@ -76,16 +76,19 @@ you need to do additional changes:
|
||||
== MinGW
|
||||
===============================================================================
|
||||
|
||||
Use MinGW distro from http://nuwen.net/mingw.html. That way you don't have to do
|
||||
anything, you are ready to go.
|
||||
For MinGW the easiest route is to use the mSYS2 environment from https://www.msys2.org/.
|
||||
|
||||
If you are using a stock MinGW installation, you'll have to build boost yourself.
|
||||
Use 'pacman' to install boost matching your toolchain. An example would be:
|
||||
|
||||
pacman -S ucrt64/mingw-w64-ucrt-x86_64-boost
|
||||
|
||||
or
|
||||
|
||||
pacman -S mingw64/mingw-w64-x86_64-boost
|
||||
|
||||
===============================================================================
|
||||
== Cygwin
|
||||
===============================================================================
|
||||
|
||||
As of this writing, Cygwin is broken. Theoretically, all you have to select all
|
||||
the boost libraries in the cygwin setup.
|
||||
See http://comments.gmane.org/gmane.os.cygwin/158779 for what's wrong with the
|
||||
current packages.
|
||||
Cygwin comes with boost packages (boost-devel). Install them and you should be
|
||||
good to go.
|
||||
|
||||
@ -93,7 +93,8 @@ ifndef REMOVE
|
||||
REMOVE = del
|
||||
endif
|
||||
#ifndef MKDIR
|
||||
MKDIR = mkdir $(subst /,\,$(1))
|
||||
# MKDIR = mkdir $(subst /,\,$(1))
|
||||
MKDIR = mkdir -p $(1)
|
||||
#endif
|
||||
endif
|
||||
|
||||
@ -149,6 +150,11 @@ define static_lib
|
||||
$(1)
|
||||
endef
|
||||
endif
|
||||
ifeq ($(SYSTEM),mingw)
|
||||
define static_lib
|
||||
:lib$(strip $(1))-mt.a
|
||||
endef
|
||||
endif
|
||||
|
||||
#################################################################################
|
||||
### Setting up some common libraries
|
||||
@ -171,6 +177,7 @@ COMMON_LIBS += stdc++
|
||||
ifeq ("$(SYSTEM)","mingw")
|
||||
COMMON_LIBS += wsock32
|
||||
COMMON_LIBS += ws2_32
|
||||
COMMON_LIBS += Bcrypt
|
||||
endif
|
||||
ifeq ($(SYSTEM),linux)
|
||||
NCURSES_LIBS += $(call static_lib, ncurses)
|
||||
|
||||
@ -169,6 +169,7 @@ std::string WriteTest(const std::string &aPrefix, const CInt_t &aA, const CInt_t
|
||||
Result = aOperation(CFloat_t(aA), CFloat_t(aB));
|
||||
}
|
||||
catch (std::exception &) {
|
||||
Result.Value = 0xdeadbeef;
|
||||
Overflow = true;
|
||||
}
|
||||
RetVal << "____" << (Overflow ? "1" : "0") << "_" << std::noshowbase << std::uppercase << std::hex << std::setw(16) << std::setfill('0') << Result.Value;
|
||||
@ -188,6 +189,7 @@ std::string WriteTest(const std::string &aPrefix, const CInt_t &aA, CFloat_t(*aO
|
||||
Result = aOperation(CFloat_t(aA));
|
||||
}
|
||||
catch (std::exception &) {
|
||||
Result.Value = 0xdeadbeef;
|
||||
Overflow = true;
|
||||
}
|
||||
RetVal << "____" << std::noshowbase << std::uppercase << std::hex << std::setw(16) << std::setfill('0') << Result.Value;
|
||||
@ -540,8 +542,8 @@ TestResult_s TestSettings(size_t aStep0Precision, size_t aStep1Precision, size_t
|
||||
|
||||
void SearchSettings() {
|
||||
TestResult_s BestResult;
|
||||
size_t BestStep0Precision;
|
||||
size_t BestStep1Precision;
|
||||
size_t BestStep0Precision = 0xdeadbeef;
|
||||
size_t BestStep1Precision = 0xdeadbeef;
|
||||
size_t BestStep2Precision = 0;
|
||||
uint64_t BestStep1CorrectionFactor = 0;
|
||||
uint64_t BestStep2CorrectionFactor = 0;
|
||||
|
||||
@ -45,7 +45,7 @@ void SetThreadAffinity(std::thread &aThread, size_t aCpuId) {
|
||||
CRAY_ASSERT(aCpuId < std::thread::hardware_concurrency());
|
||||
CRAY_ASSERT(aCpuId < (sizeof(DWORD_PTR) *8));
|
||||
DWORD_PTR CpuMask = DWORD_PTR(1) << aCpuId;
|
||||
DWORD_PTR RetVal = SetThreadAffinityMask(aThread.native_handle(), CpuMask);
|
||||
DWORD_PTR RetVal = SetThreadAffinityMask((HANDLE)aThread.native_handle(), CpuMask);
|
||||
if (RetVal == 0) throw Generic_x() << "Error calling SetThreadAffinityMask: " << HexPrinter(GetLastError());
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user