From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- .../mlton/files/mlton-20070826-no-execmem.patch | 29 ++++++++++ dev-lang/mlton/files/mlton-20130715-no-PIE.patch | 66 ++++++++++++++++++++++ .../mlton-20130715-split-make-for-pax-mark.patch | 11 ++++ .../mlton/files/mlton-20180207-bootstrap.patch | 27 +++++++++ dev-lang/mlton/files/mlton-20180207-paxmark.patch | 18 ++++++ 5 files changed, 151 insertions(+) create mode 100644 dev-lang/mlton/files/mlton-20070826-no-execmem.patch create mode 100644 dev-lang/mlton/files/mlton-20130715-no-PIE.patch create mode 100644 dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch create mode 100644 dev-lang/mlton/files/mlton-20180207-bootstrap.patch create mode 100644 dev-lang/mlton/files/mlton-20180207-paxmark.patch (limited to 'dev-lang/mlton/files') diff --git a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch new file mode 100644 index 000000000000..f4d4bdf540bf --- /dev/null +++ b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch @@ -0,0 +1,29 @@ +From 544930de3b1c754fa8803169902a63bce7cc02ba Mon Sep 17 00:00:00 2001 +From: Adam Goode +Date: Wed, 6 Feb 2008 20:17:51 -0500 +Subject: [PATCH] Remove PROT_EXEC from mprotect + +It looks like mprotect is used here as part of signal handling. +There doesn't seems to be a reason to have the area of memory +marked as executable. In fact, on Fedora 9, this causes MLton +compiled binaries (including MLton itself) to fail. +--- + runtime/platform/mmap-protect.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/runtime/platform/mmap-protect.c b/runtime/platform/mmap-protect.c +index f0dea49..df42215 100644 +--- a/runtime/platform/mmap-protect.c ++++ b/runtime/platform/mmap-protect.c +@@ -7,7 +7,7 @@ void *GC_mmapAnon_safe_protect (void *start, size_t length, + if (mprotect (low, dead_low, PROT_NONE)) + diee ("mprotect failed"); + result = (void*)((pointer)low + dead_low); +- if (mprotect (result, length, PROT_READ | PROT_WRITE | PROT_EXEC)) ++ if (mprotect (result, length, PROT_READ | PROT_WRITE)) + diee ("mprotect failed"); + high = (void*)((pointer)result + length); + if (mprotect (high, dead_high, PROT_NONE)) +-- +1.5.4 + diff --git a/dev-lang/mlton/files/mlton-20130715-no-PIE.patch b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch new file mode 100644 index 000000000000..a059b1598bec --- /dev/null +++ b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch @@ -0,0 +1,66 @@ +--- mlton-20130715-orig/bin/upgrade-basis 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/bin/upgrade-basis 2013-12-17 18:17:24.165889500 +1100 +@@ -28,7 +28,7 @@ + tmp="$$.sml" + + echo "val () = print \"I work\"" >"$tmp" +-if ! mlton "$tmp" 1>&2; then ++if ! mlton -link-opt -fno-PIE "$tmp" 1>&2; then + die "Error: cannot upgrade basis because the compiler doesn't work" + fi + +--- mlton-20130715-orig/mlton/Makefile 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/mlton/Makefile 2013-12-17 23:35:06.137421195 +1100 +@@ -106,7 +106,7 @@ + rm -f control/version.sml + $(MAKE) control/version.sml + @echo 'Compiling mlton (takes a while)' +- mlton $(FLAGS) $(FILE) ++ mlton $(FLAGS) -link-opt -fno-PIE $(FILE) + + .PHONY: def-use + def-use: mlton.def-use +--- mlton-20130715-orig/mllex/Makefile 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/mllex/Makefile 2013-12-18 07:03:29.592171611 +1100 +@@ -21,7 +21,7 @@ + + $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb) + @echo 'Compiling $(NAME)' +- "$(MLTON)" $(FLAGS) $(NAME).mlb ++ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb + + html/index.html: $(TEX_FILES) + mkdir -p html +--- mlton-20130715-orig/mlnlffigen/Makefile 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/mlnlffigen/Makefile 2013-12-18 11:55:33.590660407 +1100 +@@ -22,7 +22,7 @@ + + $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb) + @echo 'Compiling $(NAME)' +- $(MLTON) $(FLAGS) $(NAME).mlb ++ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb + + .PHONY: clean + clean: +--- mlton-20130715-orig/mlprof/Makefile 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/mlprof/Makefile 2013-12-20 14:02:50.292677796 +1100 +@@ -21,7 +21,7 @@ + + $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb) + @echo 'Compiling $(NAME)' +- $(MLTON) $(FLAGS) $(NAME).mlb ++ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb + + .PHONY: clean + clean: +--- mlton-20130715-orig/mlyacc/Makefile 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/mlyacc/Makefile 2013-12-20 15:01:26.567775876 +1100 +@@ -41,7 +41,7 @@ + + $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb) + @echo 'Compiling $(NAME)' +- "$(MLTON)" $(FLAGS) $(NAME).mlb ++ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb + + src/yacc.lex.sml: src/yacc.lex + rm -f src/yacc.lex.sml && \ diff --git a/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch new file mode 100644 index 000000000000..3286d44e3522 --- /dev/null +++ b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch @@ -0,0 +1,11 @@ +--- mlton-20130715-orig/Makefile 2013-07-16 05:59:09.000000000 +1000 ++++ mlton-20130715/Makefile 2013-12-27 13:29:35.259563131 +1100 +@@ -58,7 +58,7 @@ + + .PHONY: all-no-docs + all-no-docs: +- $(MAKE) dirs runtime compiler basis-no-check script mlbpathmap constants libraries tools ++ $(MAKE) basis-no-check script mlbpathmap constants libraries tools + # Remove $(AOUT) so that the $(MAKE) compiler below will remake MLton. + # We also want to re-run the just-built tools (mllex and mlyacc) + # because they may be better than those that were used for the first diff --git a/dev-lang/mlton/files/mlton-20180207-bootstrap.patch b/dev-lang/mlton/files/mlton-20180207-bootstrap.patch new file mode 100644 index 000000000000..5287a809f5aa --- /dev/null +++ b/dev-lang/mlton/files/mlton-20180207-bootstrap.patch @@ -0,0 +1,27 @@ +--- mlton-20180207-orig/Makefile 2018-02-07 21:22:55.000000000 +1100 ++++ mlton-20180207/Makefile 2018-02-28 11:28:00.639642560 +1100 +@@ -137,18 +137,22 @@ + .PHONY: bootstrap-smlnj + bootstrap-smlnj: + $(MAKE) smlnj-mlton +- $(RM) "$(BIN)/mlton" ++ $(MV) "$(BIN)/mlton" "$(BIN)/mlton.mlton" ++ $(CP) "$(BIN)/mlton.smlnj" "$(BIN)/mlton" + $(MAKE) BOOTSTRAP_MLTON=mlton.smlnj all + smlnj_heap_suffix=`echo 'TextIO.output (TextIO.stdErr, SMLofNJ.SysInfo.getHeapSuffix ());' | sml 2>&1 1> /dev/null` && $(RM) "$(LIB)/mlton/mlton-smlnj.$$smlnj_heap_suffix" + $(RM) "$(BIN)/mlton.smlnj" ++ $(MV) "$(BIN)/mlton.mlton" "$(BIN)/mlton" + + .PHONY: bootstrap-polyml + bootstrap-polyml: + $(MAKE) polyml-mlton +- $(RM) "$(BIN)/mlton" ++ $(MV) "$(BIN)/mlton" "$(BIN)/mlton.mlton" ++ $(CP) "$(BIN)/mlton.polyml" "$(BIN)/mlton" + $(MAKE) BOOTSTRAP_MLTON=mlton.polyml all + $(RM) "$(LIB)/mlton-polyml$(EXE)" + $(RM) "$(BIN)/mlton.polyml" ++ $(MV) "$(BIN)/mlton.mlton" "$(BIN)/mlton" + + .PHONY: clean + clean: diff --git a/dev-lang/mlton/files/mlton-20180207-paxmark.patch b/dev-lang/mlton/files/mlton-20180207-paxmark.patch new file mode 100644 index 000000000000..00f4b84c7dc9 --- /dev/null +++ b/dev-lang/mlton/files/mlton-20180207-paxmark.patch @@ -0,0 +1,18 @@ +--- mlton-20180207-orig/Makefile 2018-02-07 21:22:55.000000000 +1100 ++++ mlton-20180207/Makefile 2018-02-28 11:27:30.448517470 +1100 +@@ -51,6 +51,7 @@ + SED := sed + TAR := tar + XARGS := xargs ++PAXMARK := true + + ###################################################################### + ###################################################################### +@@ -97,6 +98,7 @@ + all: + $(MAKE) dirs runtime + $(MAKE) compiler CHECK_FIXPOINT=false # tools0 + mlton0 -> mlton1 ++ $(PAXMARK) -m lib/mlton/mlton-compile bin/mllex bin/mlyacc + $(MAKE) script basis-no-check constants basis-check libraries + $(MAKE) tools CHECK_FIXPOINT=false # tools0 + mlton1 -> tools1 + ifeq (true, $(findstring true,$(BOOTSTRAP) $(CHECK_FIXPOINT))) -- cgit v1.2.3