From a4a46b7e65bcc92f177e5fcb5970655fbe5e95de Mon Sep 17 00:00:00 2001 From: midipix Date: Dec 23 2018 00:14:26 +0000 Subject: project: extensions: _decimal: take the -DUNIVERSAL code path. --- diff --git a/profiles/toolchain/64-default.h b/profiles/toolchain/64-default.h index d181917..e39b71a 100644 --- a/profiles/toolchain/64-default.h +++ b/profiles/toolchain/64-default.h @@ -4,7 +4,4 @@ #define HAVE_GCC_ASM_FOR_X87 1 #define HAVE_GCC_ASM_FOR_X64 1 -#define CONFIG_64 1 -#define ASM 1 - #endif diff --git a/project/pycompile.mk b/project/pycompile.mk index a432f85..8cf2ac4 100644 --- a/project/pycompile.mk +++ b/project/pycompile.mk @@ -86,6 +86,8 @@ $(PYCOMPILE_DIR)/core/%.o: $(SOURCE_DIR)/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) $(PYCOMPILE_DIR)/pyext/obj/%.o: $(SOURCE_DIR)/Modules/%.c $(ALL_HEADERS) $(PYCOMPILE_TAGS) $(NATIVE_CC) -c -o $@ $< $(PYCOMPILE_CFLAGS) +$(PYCOMPILE_DIR)/pyext/obj/_decimal/%.o: NATIVE_CC_CFLAGS += -DUNIVERSAL + PYCOMPILE_PYEXT_SRCS = \ $(PYEXT_DECIMAL_SRCS) \ diff --git a/project/pyexts.c b/project/pyexts.c index 3456b4e..71bca45 100644 --- a/project/pyexts.c +++ b/project/pyexts.c @@ -127,7 +127,8 @@ static const struct pyext_meta pyexts[] = { "_curses_panel"), PYEXT_COMMON("_decimal", - "-I$(SOURCE_DIR)/Modules/_decimal/libmpdec",0, + "-I$(SOURCE_DIR)/Modules/_decimal/libmpdec -DUNIVERSAL", + 0, "_decimal/_decimal", "_decimal/libmpdec/basearith", "_decimal/libmpdec/constants", diff --git a/project/pyexts.mk b/project/pyexts.mk index 753ef69..4cc0eab 100644 --- a/project/pyexts.mk +++ b/project/pyexts.mk @@ -1552,8 +1552,8 @@ PYEXT_DECIMAL_SRCS += pyext/obj/_decimal/libmpdec/transpose.c PYEXT_DECIMAL_LOBJS = $(PYEXT_DECIMAL_SRCS:.c=.lo) PYEXT_DECIMAL_OBJS = $(PYEXT_DECIMAL_SRCS:.c=.o) -$(PYEXT_DECIMAL_LOBJS): CFLAGS_CONFIG += -I$(SOURCE_DIR)/Modules/_decimal/libmpdec -$(PYEXT_DECIMAL_OBJS): CFLAGS_CONFIG += -I$(SOURCE_DIR)/Modules/_decimal/libmpdec +$(PYEXT_DECIMAL_LOBJS): CFLAGS_CONFIG += -I$(SOURCE_DIR)/Modules/_decimal/libmpdec -DUNIVERSAL +$(PYEXT_DECIMAL_OBJS): CFLAGS_CONFIG += -I$(SOURCE_DIR)/Modules/_decimal/libmpdec -DUNIVERSAL PYEXT_DECIMAL_SHARED = pyext/_decimal$(PYTHON_SOEXT) PYEXT_DECIMAL_STATIC = pyext/_decimal$(OS_ARCHIVE_EXT)