Skip to content

Commit

Permalink
Revert "Fixes for ARM compilation"
Browse files Browse the repository at this point in the history
This reverts commit a3fe80c.

Break compilation on mingw for me.
  • Loading branch information
mcostalba committed Oct 13, 2016
1 parent a3fe80c commit e1f600f
Showing 1 changed file with 16 additions and 40 deletions.
56 changes: 16 additions & 40 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
### ==========================================================================

### Establish the operating system name
KERNEL = $(shell uname -s)
ifneq ($(KERNEL),Darwin)
OS = $(shell uname -o)
endif
UNAME = $(shell uname)

### Executable name
EXE = stockfish
Expand Down Expand Up @@ -148,25 +145,16 @@ endif
ifeq ($(COMP),gcc)
comp=gcc
CXX=g++
CXXFLAGS += -pedantic -Wextra -Wshadow

ifeq ($(ARCH),armv7)
ifeq ($(OS),Android)
CXXFLAGS += -m$(bits)
endif
else
CXXFLAGS += -m$(bits)
endif

ifneq ($(KERNEL),Darwin)
CXXFLAGS += -pedantic -Wextra -Wshadow -m$(bits)
ifneq ($(UNAME),Darwin)
LDFLAGS += -Wl,--no-as-needed
endif
endif

ifeq ($(COMP),mingw)
comp=mingw

ifeq ($(KERNEL),Linux)
ifeq ($(UNAME),Linux)
ifeq ($(bits),64)
ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
CXX=x86_64-w64-mingw32-c++
Expand Down Expand Up @@ -197,19 +185,9 @@ endif
ifeq ($(COMP),clang)
comp=clang
CXX=clang++
CXXFLAGS += -pedantic -Wextra -Wshadow

ifeq ($(ARCH),armv7)
ifeq ($(OS),Android)
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
endif
else
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
endif

ifeq ($(KERNEL),Darwin)
CXXFLAGS += -pedantic -Wextra -Wshadow -m$(bits)
LDFLAGS += -m$(bits)
ifeq ($(UNAME),Darwin)
CXXFLAGS += -stdlib=libc++
DEPENDFLAGS += -stdlib=libc++
endif
Expand All @@ -227,7 +205,7 @@ else
profile_clean = gcc-profile-clean
endif

ifeq ($(KERNEL),Darwin)
ifeq ($(UNAME),Darwin)
CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9
LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9
endif
Expand All @@ -245,9 +223,9 @@ endif
### On mingw use Windows threads, otherwise POSIX
ifneq ($(comp),mingw)
# 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
ifneq ($(KERNEL),Haiku)
ifneq ($(UNAME),Haiku)
LDFLAGS += -lpthread
endif
endif
Expand All @@ -267,7 +245,7 @@ ifeq ($(optimize),yes)

ifeq ($(comp),gcc)

ifeq ($(KERNEL),Darwin)
ifeq ($(UNAME),Darwin)
ifeq ($(arch),i386)
CXXFLAGS += -mdynamic-no-pic
endif
Expand All @@ -276,19 +254,19 @@ ifeq ($(optimize),yes)
endif
endif

ifeq ($(OS), Android)
ifeq ($(arch),armv7)
CXXFLAGS += -fno-gcse -mthumb -march=armv7-a -mfloat-abi=softfp
endif
endif

ifeq ($(comp),icc)
ifeq ($(KERNEL),Darwin)
ifeq ($(UNAME),Darwin)
CXXFLAGS += -mdynamic-no-pic
endif
endif

ifeq ($(comp),clang)
ifeq ($(KERNEL),Darwin)
ifeq ($(UNAME),Darwin)
ifeq ($(pext),no)
CXXFLAGS += -flto
LDFLAGS += $(CXXFLAGS)
Expand Down Expand Up @@ -348,7 +326,7 @@ ifeq ($(comp),gcc)
endif

ifeq ($(comp),mingw)
ifeq ($(KERNEL),Linux)
ifeq ($(UNAME),Linux)
ifeq ($(optimize),yes)
ifeq ($(debug),no)
CXXFLAGS += -flto
Expand All @@ -360,7 +338,7 @@ endif

### 3.9 Android 5 can only run position independent executables. Note that this
### breaks Android 4.0 and earlier.
ifeq ($(OS), Android)
ifeq ($(arch),armv7)
CXXFLAGS += -fPIE
LDFLAGS += -fPIE -pie
endif
Expand Down Expand Up @@ -468,8 +446,6 @@ config-sanity:
@echo "optimize: '$(optimize)'"
@echo "arch: '$(arch)'"
@echo "bits: '$(bits)'"
@echo "kernel: '$(KERNEL)'"
@echo "os: '$(OS)'"
@echo "prefetch: '$(prefetch)'"
@echo "popcnt: '$(popcnt)'"
@echo "sse: '$(sse)'"
Expand Down

0 comments on commit e1f600f

Please sign in to comment.