Skip to content

Commit

Permalink
fix build of greenlet wheel for older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
hgy59 committed Jun 16, 2023
1 parent aac8d6b commit b2b1a40
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spk/homeassistant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,19 @@ include ../../mk/spksrc.spk.mk
# prefere native python tools (pip, maturin, ...)
ENV += PATH=$(realpath $(WORK_DIR)/../../../native/python310/work-native/install/usr/local/bin):$(PATH)

# [greenlet]
ifeq ($(call version_lt, ${TC_GCC}, 5.0),1)
WHEELS_CPPFLAGS += [greenlet] -std=c++11
endif

# [numpy]
# Fix wheel building with older compilers
ifeq ($(call version_lt, $(TC_GCC), 5.0),1)
WHEELS_CPPFLAGS = [numpy] -std=c++0x
WHEELS_CPPFLAGS += [numpy] -std=c++0x
# workaround for compiler bug:
# https://github.com/numpy/numpy/issues/13622
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
WHEELS_CFLAGS = [numpy] -O0
WHEELS_CFLAGS += [numpy] -O0
endif
endif

Expand All @@ -120,7 +125,6 @@ WHEELS_CFLAGS += [pycryptodomex] -std=c99
WHEELS_CFLAGS += [ciso8601] -std=c99
endif


# target to download and prepare hacs after changing HACS_VERS above
.PHONY: get_hacs
get_hacs:
Expand Down

0 comments on commit b2b1a40

Please sign in to comment.