-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
270a4df
commit b79d2ee
Showing
4 changed files
with
30,730 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From 39d5924982e54a20b923df49d4b6a3abe079040f Mon Sep 17 00:00:00 2001 | ||
From: Marc Mezzarobba <[email protected]> | ||
Date: Thu, 29 Jun 2023 14:50:06 +0200 | ||
Subject: [PATCH] fix detection of ntl | ||
Subject: [PATCH 1/4] fix detection of ntl | ||
|
||
--- | ||
configure.ac | 2 ++ | ||
|
24 changes: 24 additions & 0 deletions
24
build/pkgs/flint/patches/0002-missing-include-in-t-NTL-interface.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 719aeb85a5887d429ceef7015a560e5401e76f0b Mon Sep 17 00:00:00 2001 | ||
From: Marc Mezzarobba <[email protected]> | ||
Date: Sun, 2 Jul 2023 13:42:33 +0200 | ||
Subject: [PATCH 2/4] missing include in t-NTL-interface | ||
|
||
--- | ||
src/interfaces/test/t-NTL-interface.cpp | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/interfaces/test/t-NTL-interface.cpp b/src/interfaces/test/t-NTL-interface.cpp | ||
index 98119de3d..a4dc325fb 100644 | ||
--- a/src/interfaces/test/t-NTL-interface.cpp | ||
+++ b/src/interfaces/test/t-NTL-interface.cpp | ||
@@ -18,6 +18,7 @@ | ||
#include <gmp.h> | ||
#include "flint.h" | ||
#include "fmpz.h" | ||
+#include "fmpz_mod.h" | ||
#include "fmpz_poly.h" | ||
#include "fmpz_mod_poly.h" | ||
#include "ulong_extras.h" | ||
-- | ||
2.40.1 | ||
|
65 changes: 65 additions & 0 deletions
65
build/pkgs/flint/patches/0003-actually-build-the-NTL-interface-when-asked-for-it.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From 4c4971d763e60fda024f9754d1476947570f1fed Mon Sep 17 00:00:00 2001 | ||
From: Marc Mezzarobba <[email protected]> | ||
Date: Sun, 2 Jul 2023 13:43:16 +0200 | ||
Subject: [PATCH 3/4] actually build the NTL interface when asked for it | ||
|
||
--- | ||
Makefile.in | 14 ++++++++------ | ||
1 file changed, 8 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Makefile.in b/Makefile.in | ||
index 4c9f1b927..791b8e73c 100644 | ||
--- a/Makefile.in | ||
+++ b/Makefile.in | ||
@@ -82,6 +82,9 @@ CPPFLAGS2:=-L$(FLINT_DIR) $(CPPFLAGS) | ||
LIB_CPPFLAGS:=@LIB_CPPFLAGS@ | ||
CXXFLAGS:=@CXXFLAGS@ | ||
LIBS:=@LIBS@ | ||
+ifneq ($(WANT_NTL), 0) | ||
+LIBS += -lstdc++ -lntl | ||
+endif | ||
LIBS2:=$(LIBS) -lflint | ||
PIC_FLAG:=@PIC_FLAG@ | ||
|
||
@@ -300,10 +303,6 @@ define xxx_LOBJS | ||
$(1)_LOBJS := $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.lo,$($(1)_SOURCES)) | ||
endef | ||
$(foreach dir, $(DIRS), $(eval $(call xxx_LOBJS,$(dir)))) | ||
-LOBJS := $(foreach dir, $(DIRS), $($(dir)_LOBJS)) | ||
-ifneq ($(WANT_NTL), 0) | ||
-LOBJS += $(BUILD_DIR)/interfaces/NTL-interface.lo | ||
-endif | ||
endif | ||
|
||
################################################################################ | ||
@@ -370,6 +369,9 @@ $(BUILD_DIR)/$(1)_merged.lo: $($(1)_LOBJS) | $(BUILD_DIR) | ||
endef | ||
$(foreach dir, $(DIRS), $(eval $(call xxx_merged_lobj_rule,$(dir)))) | ||
MERGED_LOBJS:=$(foreach dir, $(DIRS),$(BUILD_DIR)/$(dir)_merged.lo) | ||
+ifneq ($(WANT_NTL), 0) | ||
+MERGED_LOBJS += $(BUILD_DIR)/interfaces/NTL-interface.lo | ||
+endif | ||
|
||
$(FLINT_DIR)/$(FLINT_LIB_FULL): $(MERGED_LOBJS) | ||
$(CC) $(CFLAGS) -shared $(EXTRA_SHARED_FLAGS) $(MERGED_LOBJS) -o $(FLINT_LIB_FULL) $(LDFLAGS) $(LIBS) | ||
@@ -522,7 +524,7 @@ endef | ||
$(foreach dir, $(DIRS), $(eval $(call xxx_OBJS_rule,$(dir)))) | ||
|
||
ifneq ($(WANT_NTL), 0) | ||
-$(BUILD_DIR)/interfaces/NTL-interface.o: $(SRC_DIR)/interfaces/test/t-NTL-interface.cpp | $(BUILD_DIR)/interfaces | ||
+$(BUILD_DIR)/interfaces/NTL-interface.o: $(SRC_DIR)/interfaces/NTL-interface.cpp | $(BUILD_DIR)/interfaces | ||
@echo " CXX $(@:$(BUILD_DIR)/%=%)" | ||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) -c $< -o $@ -MMD -MF $(@:%=%.d) | ||
endif | ||
@@ -542,7 +544,7 @@ endef | ||
$(foreach dir, $(DIRS), $(eval $(call xxx_LOBJS_rule,$(dir)))) | ||
|
||
ifneq ($(WANT_NTL), 0) | ||
-$(BUILD_DIR)/interfaces/NTL-interface.lo: $(SRC_DIR)/interfaces/test/t-NTL-interface.cpp | $(BUILD_DIR)/interfaces | ||
+$(BUILD_DIR)/interfaces/NTL-interface.lo: $(SRC_DIR)/interfaces/NTL-interface.cpp | $(BUILD_DIR)/interfaces | ||
@echo " CXX $(@:$(BUILD_DIR)/%=%)" | ||
@$(CXX) $(PIC_FLAG) $(CXXFLAGS) $(CPPFLAGS) $(LIB_CPPFLAGS) -c $< -o $@ -MMD -MF $(@:%=.d) | ||
endif | ||
-- | ||
2.40.1 | ||
|
Oops, something went wrong.