diff options
| author | Paul Eggert | 2016-04-27 15:52:53 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-04-27 16:03:50 -0700 |
| commit | 734fb3ac6c3e5708ed05b6c5b1d8af92838ee3f5 (patch) | |
| tree | 4cde4fb6d3a298f27cd9c673ca0eb62c2168e9ec /src | |
| parent | 0255a70c8ae22e259e8938ac3840c7b6687edec8 (diff) | |
| download | emacs-734fb3ac6c3e5708ed05b6c5b1d8af92838ee3f5.tar.gz emacs-734fb3ac6c3e5708ed05b6c5b1d8af92838ee3f5.zip | |
Port dumping to NetBSD with PaX
Problem reported by Thomas Klausner (Bug#23371).
* configure.ac (PAXCTL_dumped, PAXCTL_notdumped): New vars.
Set them to setfattr and/or paxctl commands appropriate for
GNU/Linux and/or NetBSD; the latter prefers paxctl +a. Search
for paxctl only if setfattr is not found.
* src/Makefile.in (PAXCTL_dumped, PAXCTL_notdumped):
New vars, replacing PAXCTL_if_present and SETFATTR_if_present.
All uses changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.in | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 1f0df6f3ec8..d54670932d3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -114,8 +114,9 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) | |||
| 114 | ## around this, newer ones setfattr. See Bug#11398 and Bug#16343. | 114 | ## around this, newer ones setfattr. See Bug#11398 and Bug#16343. |
| 115 | PAXCTL = @PAXCTL@ | 115 | PAXCTL = @PAXCTL@ |
| 116 | SETFATTR = @SETFATTR@ | 116 | SETFATTR = @SETFATTR@ |
| 117 | PAXCTL_if_present = $(or $(PAXCTL),: paxctl) | 117 | ## Commands to set PaX flags on dumped and not-dumped instances of Emacs. |
| 118 | SETFATTR_if_present = $(or $(SETFATTR),: setfattr) | 118 | PAXCTL_dumped = @PAXCTL_dumped@ |
| 119 | PAXCTL_notdumped = @PAXCTL_notdumped@ | ||
| 119 | 120 | ||
| 120 | ## Some systems define this to request special libraries. | 121 | ## Some systems define this to request special libraries. |
| 121 | LIBS_SYSTEM=@LIBS_SYSTEM@ | 122 | LIBS_SYSTEM=@LIBS_SYSTEM@ |
| @@ -532,7 +533,9 @@ ifeq ($(CANNOT_DUMP),yes) | |||
| 532 | ln -f temacs$(EXEEXT) $@ | 533 | ln -f temacs$(EXEEXT) $@ |
| 533 | else | 534 | else |
| 534 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump | 535 | LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump |
| 535 | $(PAXCTL_if_present) -zex $@ | 536 | ifneq ($(PAXCTL_dumped),) |
| 537 | $(PAXCTL_dumped) $@ | ||
| 538 | endif | ||
| 536 | ln -f $@ bootstrap-emacs$(EXEEXT) | 539 | ln -f $@ bootstrap-emacs$(EXEEXT) |
| 537 | endif | 540 | endif |
| 538 | 541 | ||
| @@ -594,8 +597,9 @@ temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \ | |||
| 594 | -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) | 597 | -o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES) |
| 595 | $(MKDIR_P) $(etc) | 598 | $(MKDIR_P) $(etc) |
| 596 | ifneq ($(CANNOT_DUMP),yes) | 599 | ifneq ($(CANNOT_DUMP),yes) |
| 597 | $(PAXCTL_if_present) -r $@ | 600 | ifneq ($(PAXCTL_notdumped),) |
| 598 | $(SETFATTR_if_present) -n user.pax.flags -v er $@ | 601 | $(PAXCTL_notdumped) $@ |
| 602 | endif | ||
| 599 | endif | 603 | endif |
| 600 | 604 | ||
| 601 | ## The following oldxmenu-related rules are only (possibly) used if | 605 | ## The following oldxmenu-related rules are only (possibly) used if |
| @@ -734,7 +738,9 @@ ifeq ($(CANNOT_DUMP),yes) | |||
| 734 | ln -f temacs$(EXEEXT) $@ | 738 | ln -f temacs$(EXEEXT) $@ |
| 735 | else | 739 | else |
| 736 | $(RUN_TEMACS) --batch --load loadup bootstrap | 740 | $(RUN_TEMACS) --batch --load loadup bootstrap |
| 737 | $(PAXCTL_if_present) -zex emacs$(EXEEXT) | 741 | ifneq ($(PAXCTL_dumped),) |
| 742 | $(PAXCTL_dumped) emacs$(EXEEXT) | ||
| 743 | endif | ||
| 738 | mv -f emacs$(EXEEXT) $@ | 744 | mv -f emacs$(EXEEXT) $@ |
| 739 | endif | 745 | endif |
| 740 | @: Compile some files earlier to speed up further compilation. | 746 | @: Compile some files earlier to speed up further compilation. |