| @@ -1,27 +1,27 @@ | | | @@ -1,27 +1,27 @@ |
1 | # $NetBSD: hacks.mk,v 1.5 2016/08/23 20:27:40 maya Exp $ | | 1 | # $NetBSD: hacks.mk,v 1.6 2016/08/27 08:38:31 maya Exp $ |
2 | | | 2 | |
3 | .if !defined(EMACS_HACKS_MK) | | 3 | .if !defined(EMACS_HACKS_MK) |
4 | EMACS_HACKS_MK= defined | | 4 | EMACS_HACKS_MK= defined |
5 | | | 5 | |
6 | .include "../../mk/compiler.mk" | | 6 | .include "../../mk/compiler.mk" |
7 | | | 7 | |
8 | ### On NetBSD/amd64 7.99.26, gcc optimisation, at least for version 5.x, | | 8 | ### On NetBSD/amd64 7.99.26, gcc optimisation, at least for version 5.x, |
9 | ### produces, a "temacs" binary which segfaults. | | 9 | ### produces, a "temacs" binary which segfaults. |
10 | ### | | 10 | ### |
11 | . if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) | | 11 | . if !empty(MACHINE_PLATFORM:MNetBSD-*) |
12 | . if !empty(CC_VERSION:Mgcc-5.*) | | 12 | . if !empty(CC_VERSION:Mgcc-5.*) |
13 | PKG_HACKS+= optimisation | | 13 | PKG_HACKS+= optimisation |
14 | BUILDLINK_TRANSFORM+= opt:-O2:-O0 | | 14 | CFLAGS+= -fno-optimize-strlen |
15 | . endif | | 15 | . endif |
16 | . endif | | 16 | . endif |
17 | | | 17 | |
18 | ### PaX is enabled, bootstrap-emacs command dumps core with segfault. | | 18 | ### PaX is enabled, bootstrap-emacs command dumps core with segfault. |
19 | ### emacs-24.5/src/Makefile.in does not support NetBSD paxctl(8) syntax. | | 19 | ### emacs-24.5/src/Makefile.in does not support NetBSD paxctl(8) syntax. |
20 | ### http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23371 | | 20 | ### http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23371 |
21 | ### | | 21 | ### |
22 | . if !empty(MACHINE_PLATFORM:MNetBSD-*) | | 22 | . if !empty(MACHINE_PLATFORM:MNetBSD-*) |
23 | . if exists(/usr/sbin/paxctl) | | 23 | . if exists(/usr/sbin/paxctl) |
24 | SUBST_CLASSES+= paxctl | | 24 | SUBST_CLASSES+= paxctl |
25 | SUBST_STAGE.paxctl= pre-configure | | 25 | SUBST_STAGE.paxctl= pre-configure |
26 | SUBST_MESSAGE.paxctl= Setting paxctl command | | 26 | SUBST_MESSAGE.paxctl= Setting paxctl command |
27 | SUBST_FILES.paxctl+= src/Makefile.in | | 27 | SUBST_FILES.paxctl+= src/Makefile.in |