summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-22 17:16:47 -0500
committermidipix <writeonce@midipix.org>2018-12-22 19:14:26 -0500
commita4a46b7e65bcc92f177e5fcb5970655fbe5e95de (patch)
tree3b562cd7079633157f6d5d70585e504e7c8dc8d7
parentad39fbf857b0951300dc23f59eaae3656db37661 (diff)
downloadsbpython3-a4a46b7e65bcc92f177e5fcb5970655fbe5e95de.tar.bz2
sbpython3-a4a46b7e65bcc92f177e5fcb5970655fbe5e95de.tar.xz
project: extensions: _decimal: take the -DUNIVERSAL code path.
-rw-r--r--profiles/toolchain/64-default.h3
-rw-r--r--project/pycompile.mk2
-rw-r--r--project/pyexts.c3
-rw-r--r--project/pyexts.mk4
4 files changed, 6 insertions, 6 deletions
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)