diff options
Diffstat (limited to 'testing/racket/paxmark.patch')
-rw-r--r-- | testing/racket/paxmark.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/testing/racket/paxmark.patch b/testing/racket/paxmark.patch new file mode 100644 index 0000000000..6f70d086a5 --- /dev/null +++ b/testing/racket/paxmark.patch @@ -0,0 +1,77 @@ +This is nasty and quite desperate hack to make Racket built on system +with Grsecurity/PaX. Downstream patch only. + +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -28,9 +28,9 @@ + # but it can also redirect to an existing Racket executable + # that is the same as the version being built (which is + # useful for cross-compilation, for example). +-RUN_THIS_RACKET_CGC = racket/racket@CGC@ +-RUN_THIS_RACKET_MMM = racket/racket@MMM@ +-RUN_THIS_RACKET_MAIN_VARIANT = racket/racket@MAIN_VARIANT@ ++RUN_THIS_RACKET_CGC = paxmark m racket/racket@CGC@ && racket/racket@CGC@ ++RUN_THIS_RACKET_MMM = paxmark m racket/racket@MMM@ && racket/racket@MMM@ ++RUN_THIS_RACKET_MAIN_VARIANT = paxmark m racket/racket@MAIN_VARIANT@ && racket/racket@MAIN_VARIANT@ + + ALLDIRINFO = "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(collectsdir)" \ +--- a/src/racket/Makefile.in ++++ b/src/racket/Makefile.in +@@ -46,8 +46,8 @@ + + # See ../../Makefile about RUN_RACKET_<X>, which + # typically redirects to RUN_THIS_RACKET_<X>: +-RUN_THIS_RACKET_CGC = ./racket@CGC@ +-RUN_THIS_RACKET_MMM = ./racket@MMM@ ++RUN_THIS_RACKET_CGC = paxmark m ./racket@CGC@; ./racket@CGC@ ++RUN_THIS_RACKET_MMM = paxmark m ./racket@MMM@; ./racket@MMM@ + + MZSRC = $(srcdir)/src + +@@ -199,6 +199,7 @@ + + racket@CGC@@NOT_OSX@@NOT_MINGW@: libracket.@LIBSFX@ libmzgc.@LIBSFX@ main.@LTO@ $(LIBRKTIO_FOR_LIB) $(SPECIALIZINGOBJECTS) + @MZLINKER@ -o racket@CGC@ main.@LTO@ $(SPECIALIZINGOBJECTS) libracket.@LIBSFX@ libmzgc.@LIBSFX@ $(LIBRKTIO_FOR_LIB) @LDFLAGS@ @LIBS@ ++ paxmark m racket@CGC@ + + mzcom@CGC@@NOT_MINGW@: + $(NOOP) +@@ -402,6 +403,7 @@ + $(MAKE) unix-@INSTALL_LIBS_ENABLE@-libs-cgc + cd ..; $(ICP) racket/racket@CGC@ "$(DESTDIR)$(bindir)/racket@CGC_INSTALLED@" + cd ..; $(STRIP_DEBUG) "$(DESTDIR)$(bindir)/racket@CGC_INSTALLED@" ++ cd ..; paxmark m "$(DESTDIR)$(bindir)/racket@CGC_INSTALLED@" + cd ..; cp racket/mzdyn.o "$(DESTDIR)$(libpltdir)/mzdyn.o" + @RUN_RACKET_CGC@ -cu "$(srcdir)/collects-path.rkt" "$(DESTDIR)$(bindir)/racket@CGC_INSTALLED@@EXE_SUFFIX@" $(DESTDIR)@COLLECTS_PATH@ $(DESTDIR)@CONFIG_PATH@ + +@@ -420,6 +422,7 @@ + unix-install-3m: + cd ..; $(ICP) racket/racket@MMM@ "$(DESTDIR)$(bindir)/racket@MMM_INSTALLED@" + cd ..; $(STRIP_DEBUG) "$(DESTDIR)$(bindir)/racket@MMM_INSTALLED@" ++ cd ..; paxmark m "$(DESTDIR)$(bindir)/racket@MMM_INSTALLED@" + $(MAKE) unix-@INSTALL_LIBS_ENABLE@-libs-3m + cd ..; $(ICP) racket/mzdyn3m.o "$(DESTDIR)$(libpltdir)/mzdyn3m.o" + @RUN_RACKET_MMM@ -cu "$(srcdir)/collects-path.rkt" "$(DESTDIR)$(bindir)/racket@MMM_INSTALLED@@EXE_SUFFIX@" $(DESTDIR)@COLLECTS_PATH@ $(DESTDIR)@CONFIG_PATH@ +--- a/src/racket/gc2/Makefile.in ++++ b/src/racket/gc2/Makefile.in +@@ -522,6 +522,7 @@ + + ../racket@MMM@@NOT_OSX@@NOT_MINGW@: main.@LTO@ ../libracket3m.@LIBSFX@ $(LIBRKTIO_FOR_LIB) + cd ..; @MZLINKER@ -o racket@MMM@ @PROFFLAGS@ gc2/main.@LTO@ libracket3m.@LIBSFX@ $(LIBRKTIO_UP_FOR_LIB) @LDFLAGS@ $(LIBS) ++ paxmark m ../racket@MMM@ + + # The above "cd .." prevents a problem with libtool's generated script in --enable-shared mode, + # at least for Mac OS X. Beware of changing LIBS or LDFLAGS to inclucde something with a relative + +--- a/src/lt/ltmain.sh ++++ b/src/lt/ltmain.sh +@@ -5453,6 +5453,7 @@ + + *) + $echo >> $output "\ ++ paxmark m \"\$progdir/\$program\" + exec \"\$progdir/\$program\" \${1+\"\$@\"} + " + ;; + ;; |