mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Revert "Fixes for ARM compilation"
This reverts commit a3fe80c36a
.
Break compilation on mingw for me.
This commit is contained in:
parent
a3fe80c36a
commit
e1f600f186
1 changed files with 16 additions and 40 deletions
56
src/Makefile
56
src/Makefile
|
@ -22,10 +22,7 @@
|
||||||
### ==========================================================================
|
### ==========================================================================
|
||||||
|
|
||||||
### Establish the operating system name
|
### Establish the operating system name
|
||||||
KERNEL = $(shell uname -s)
|
UNAME = $(shell uname)
|
||||||
ifneq ($(KERNEL),Darwin)
|
|
||||||
OS = $(shell uname -o)
|
|
||||||
endif
|
|
||||||
|
|
||||||
### Executable name
|
### Executable name
|
||||||
EXE = stockfish
|
EXE = stockfish
|
||||||
|
@ -148,17 +145,8 @@ endif
|
||||||
ifeq ($(COMP),gcc)
|
ifeq ($(COMP),gcc)
|
||||||
comp=gcc
|
comp=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CXXFLAGS += -pedantic -Wextra -Wshadow
|
CXXFLAGS += -pedantic -Wextra -Wshadow -m$(bits)
|
||||||
|
ifneq ($(UNAME),Darwin)
|
||||||
ifeq ($(ARCH),armv7)
|
|
||||||
ifeq ($(OS),Android)
|
|
||||||
CXXFLAGS += -m$(bits)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
CXXFLAGS += -m$(bits)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(KERNEL),Darwin)
|
|
||||||
LDFLAGS += -Wl,--no-as-needed
|
LDFLAGS += -Wl,--no-as-needed
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -166,7 +154,7 @@ endif
|
||||||
ifeq ($(COMP),mingw)
|
ifeq ($(COMP),mingw)
|
||||||
comp=mingw
|
comp=mingw
|
||||||
|
|
||||||
ifeq ($(KERNEL),Linux)
|
ifeq ($(UNAME),Linux)
|
||||||
ifeq ($(bits),64)
|
ifeq ($(bits),64)
|
||||||
ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
|
ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
|
||||||
CXX=x86_64-w64-mingw32-c++
|
CXX=x86_64-w64-mingw32-c++
|
||||||
|
@ -197,19 +185,9 @@ endif
|
||||||
ifeq ($(COMP),clang)
|
ifeq ($(COMP),clang)
|
||||||
comp=clang
|
comp=clang
|
||||||
CXX=clang++
|
CXX=clang++
|
||||||
CXXFLAGS += -pedantic -Wextra -Wshadow
|
CXXFLAGS += -pedantic -Wextra -Wshadow -m$(bits)
|
||||||
|
LDFLAGS += -m$(bits)
|
||||||
ifeq ($(ARCH),armv7)
|
ifeq ($(UNAME),Darwin)
|
||||||
ifeq ($(OS),Android)
|
|
||||||
CXXFLAGS += -m$(bits)
|
|
||||||
LDFLAGS += -m$(bits)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
CXXFLAGS += -m$(bits)
|
|
||||||
LDFLAGS += -m$(bits)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(KERNEL),Darwin)
|
|
||||||
CXXFLAGS += -stdlib=libc++
|
CXXFLAGS += -stdlib=libc++
|
||||||
DEPENDFLAGS += -stdlib=libc++
|
DEPENDFLAGS += -stdlib=libc++
|
||||||
endif
|
endif
|
||||||
|
@ -227,7 +205,7 @@ else
|
||||||
profile_clean = gcc-profile-clean
|
profile_clean = gcc-profile-clean
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(KERNEL),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9
|
CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9
|
||||||
LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9
|
LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9
|
||||||
endif
|
endif
|
||||||
|
@ -245,9 +223,9 @@ endif
|
||||||
### On mingw use Windows threads, otherwise POSIX
|
### On mingw use Windows threads, otherwise POSIX
|
||||||
ifneq ($(comp),mingw)
|
ifneq ($(comp),mingw)
|
||||||
# On Android Bionic's C library comes with its own pthread implementation bundled in
|
# On Android Bionic's C library comes with its own pthread implementation bundled in
|
||||||
ifneq ($(OS),Android)
|
ifneq ($(arch),armv7)
|
||||||
# Haiku has pthreads in its libroot, so only link it in on other platforms
|
# Haiku has pthreads in its libroot, so only link it in on other platforms
|
||||||
ifneq ($(KERNEL),Haiku)
|
ifneq ($(UNAME),Haiku)
|
||||||
LDFLAGS += -lpthread
|
LDFLAGS += -lpthread
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -267,7 +245,7 @@ ifeq ($(optimize),yes)
|
||||||
|
|
||||||
ifeq ($(comp),gcc)
|
ifeq ($(comp),gcc)
|
||||||
|
|
||||||
ifeq ($(KERNEL),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
ifeq ($(arch),i386)
|
ifeq ($(arch),i386)
|
||||||
CXXFLAGS += -mdynamic-no-pic
|
CXXFLAGS += -mdynamic-no-pic
|
||||||
endif
|
endif
|
||||||
|
@ -276,19 +254,19 @@ ifeq ($(optimize),yes)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Android)
|
ifeq ($(arch),armv7)
|
||||||
CXXFLAGS += -fno-gcse -mthumb -march=armv7-a -mfloat-abi=softfp
|
CXXFLAGS += -fno-gcse -mthumb -march=armv7-a -mfloat-abi=softfp
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(comp),icc)
|
ifeq ($(comp),icc)
|
||||||
ifeq ($(KERNEL),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
CXXFLAGS += -mdynamic-no-pic
|
CXXFLAGS += -mdynamic-no-pic
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(comp),clang)
|
ifeq ($(comp),clang)
|
||||||
ifeq ($(KERNEL),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
ifeq ($(pext),no)
|
ifeq ($(pext),no)
|
||||||
CXXFLAGS += -flto
|
CXXFLAGS += -flto
|
||||||
LDFLAGS += $(CXXFLAGS)
|
LDFLAGS += $(CXXFLAGS)
|
||||||
|
@ -348,7 +326,7 @@ ifeq ($(comp),gcc)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(comp),mingw)
|
ifeq ($(comp),mingw)
|
||||||
ifeq ($(KERNEL),Linux)
|
ifeq ($(UNAME),Linux)
|
||||||
ifeq ($(optimize),yes)
|
ifeq ($(optimize),yes)
|
||||||
ifeq ($(debug),no)
|
ifeq ($(debug),no)
|
||||||
CXXFLAGS += -flto
|
CXXFLAGS += -flto
|
||||||
|
@ -360,7 +338,7 @@ endif
|
||||||
|
|
||||||
### 3.9 Android 5 can only run position independent executables. Note that this
|
### 3.9 Android 5 can only run position independent executables. Note that this
|
||||||
### breaks Android 4.0 and earlier.
|
### breaks Android 4.0 and earlier.
|
||||||
ifeq ($(OS), Android)
|
ifeq ($(arch),armv7)
|
||||||
CXXFLAGS += -fPIE
|
CXXFLAGS += -fPIE
|
||||||
LDFLAGS += -fPIE -pie
|
LDFLAGS += -fPIE -pie
|
||||||
endif
|
endif
|
||||||
|
@ -468,8 +446,6 @@ config-sanity:
|
||||||
@echo "optimize: '$(optimize)'"
|
@echo "optimize: '$(optimize)'"
|
||||||
@echo "arch: '$(arch)'"
|
@echo "arch: '$(arch)'"
|
||||||
@echo "bits: '$(bits)'"
|
@echo "bits: '$(bits)'"
|
||||||
@echo "kernel: '$(KERNEL)'"
|
|
||||||
@echo "os: '$(OS)'"
|
|
||||||
@echo "prefetch: '$(prefetch)'"
|
@echo "prefetch: '$(prefetch)'"
|
||||||
@echo "popcnt: '$(popcnt)'"
|
@echo "popcnt: '$(popcnt)'"
|
||||||
@echo "sse: '$(sse)'"
|
@echo "sse: '$(sse)'"
|
||||||
|
|
Loading…
Add table
Reference in a new issue