- Disable MKSANITIZER

- Redo using NOPIE
- Add NORELRO
This commit is contained in:
christos 2018-06-02 14:30:06 +00:00
parent 255b42d2c0
commit 6a25eb7024
9 changed files with 30 additions and 46 deletions

View File

@ -1,5 +1,6 @@
# $NetBSD: Makefile.booters,v 1.91 2017/04/08 19:53:21 christos Exp $ # $NetBSD: Makefile.booters,v 1.92 2018/06/02 14:30:06 christos Exp $
NOSANITIZER=
.include <bsd.own.mk> .include <bsd.own.mk>
STRIPFLAG= STRIPFLAG=

View File

@ -1,4 +1,8 @@
# $NetBSD: Makefile.inc,v 1.14 2018/02/22 01:37:04 christos Exp $ # $NetBSD: Makefile.inc,v 1.15 2018/06/02 14:30:06 christos Exp $
NOSANITIZER=
NOPIE=
NOMAN=
.include <bsd.own.mk> .include <bsd.own.mk>

View File

@ -1,8 +1,10 @@
# $NetBSD: Makefile.boot,v 1.70 2017/04/08 19:53:21 christos Exp $ # $NetBSD: Makefile.boot,v 1.71 2018/06/02 14:30:06 christos Exp $
S= ${.CURDIR}/../../../../.. S= ${.CURDIR}/../../../../..
NOMAN= NOMAN=
NOSANITIZER=
NOPIE=
PROG?= boot PROG?= boot
NEWVERSWHAT?= "BIOS Boot" NEWVERSWHAT?= "BIOS Boot"
@ -11,11 +13,7 @@ AFLAGS.biosboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c
SRCS= ${SOURCES} SRCS= ${SOURCES}
PIE_CFLAGS= .include <bsd.init.mk>
PIE_AFLAGS=
PIE_LDFLAGS=
.include <bsd.own.mk>
STRIPFLAG= # nothing STRIPFLAG= # nothing

View File

@ -1,14 +1,13 @@
# $NetBSD: Makefile.bootxx,v 1.49 2015/08/20 11:38:27 uebayasi Exp $ # $NetBSD: Makefile.bootxx,v 1.50 2018/06/02 14:30:07 christos Exp $
S= ${.CURDIR}/../../../../.. S= ${.CURDIR}/../../../../..
AFLAGS.bootxx.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.bootxx.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
AFLAGS.pbr.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.pbr.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
PIE_CFLAGS= NOPIE=
PIE_LDFLAGS=
PIE_AFLAGS=
NOMAN= NOMAN=
NOSANITIZER=
PROG?= bootxx_${FS} PROG?= bootxx_${FS}
BINDIR= /usr/mdec BINDIR= /usr/mdec
BINMODE= 0444 BINMODE= 0444
@ -23,7 +22,7 @@ BOOTXX_MAXSIZE?= $$(( ${BOOTXX_SECTORS} * 512 ))
SRCS= pbr.S label.S bootxx.S boot1.c SRCS= pbr.S label.S bootxx.S boot1.c
.include <bsd.own.mk> .include <bsd.init.mk>
STRIPFLAG= # nothing STRIPFLAG= # nothing

View File

@ -1,15 +1,10 @@
# $NetBSD: Makefile,v 1.14 2014/01/12 15:26:29 tsutsui Exp $ # $NetBSD: Makefile,v 1.15 2018/06/02 14:30:07 christos Exp $
S= ${.CURDIR}/../../../.. S= ${.CURDIR}/../../../..
AFLAGS.cdboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.cdboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
PIE_CFLAGS= .include <bsd.init.mk>
PIE_LDFLAGS=
PIE_AFLAGS=
NOMAN= # defined
.include <bsd.own.mk>
STRIPFLAG= # nothing STRIPFLAG= # nothing

View File

@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.30 2016/01/23 22:29:29 christos Exp $ # $NetBSD: Makefile,v 1.31 2018/06/02 14:30:07 christos Exp $
S= ${.CURDIR}/../../../.. S= ${.CURDIR}/../../../..
BASE= dosboot BASE= dosboot
PROG= ${BASE}.com PROG= ${BASE}.com
NOMAN= # defined
NEWVERSWHAT= "DOS Boot" NEWVERSWHAT= "DOS Boot"
STARTFILE= ${DOSSTART} STARTFILE= ${DOSSTART}
RELOC= 0x100 RELOC= 0x100
@ -33,11 +32,7 @@ I386MISCMAKEFLAGS= I386_INCLUDE_DOS=yes
VERSIONFILE= ${.CURDIR}/version VERSIONFILE= ${.CURDIR}/version
PIE_CFLAGS= .include <bsd.init.mk>
PIE_LDFLAGS=
PIE_AFLAGS=
.include <bsd.own.mk>
release: check_RELEASEDIR release: check_RELEASEDIR
${HOST_INSTALL_FILE} -m ${BINMODE} dosboot.com \ ${HOST_INSTALL_FILE} -m ${BINMODE} dosboot.com \

View File

@ -1,8 +1,11 @@
# $NetBSD: Makefile.efiboot,v 1.12 2018/04/11 10:32:09 nonaka Exp $ # $NetBSD: Makefile.efiboot,v 1.13 2018/06/02 14:30:07 christos Exp $
S= ${.CURDIR}/../../../../.. S= ${.CURDIR}/../../../../..
NOMAN= # defined NOMAN= # defined
NOPIE= # defined
NOSANITIZER= # defined
NORELRO= # defined
PROG?= boot.efi PROG?= boot.efi
NEWVERSWHAT?= "EFI Boot" NEWVERSWHAT?= "EFI Boot"
@ -16,11 +19,7 @@ LIBI386SRCS= biosdisk.c bootinfo.c bootinfo_biosgeom.c bootmenu.c
LIBI386SRCS+= diskbuf.c exec.c menuutils.c parseutils.c pread.c LIBI386SRCS+= diskbuf.c exec.c menuutils.c parseutils.c pread.c
SRCS= ${SOURCES} ${EXTRA_SOURCES} ${LIBI386SRCS} SRCS= ${SOURCES} ${EXTRA_SOURCES} ${LIBI386SRCS}
PIE_CFLAGS= .include <bsd.init.mk>
PIE_LDFLAGS=
PIE_AFLAGS=
.include <bsd.own.mk>
STRIPFLAG= # nothing STRIPFLAG= # nothing

View File

@ -1,9 +1,11 @@
# $NetBSD: Makefile.fat,v 1.7 2014/01/12 15:26:29 tsutsui Exp $ # $NetBSD: Makefile.fat,v 1.8 2018/06/02 14:30:07 christos Exp $
S= ${.CURDIR}/../../../../.. S= ${.CURDIR}/../../../../..
PROG?= fatboot PROG?= fatboot
NOMAN= # defined NOMAN= # defined
NOPIE= # defined
NOSANITIZER= # defined
LIBCRT0= # nothing LIBCRT0= # nothing
LIBCRTI= # nothing LIBCRTI= # nothing
@ -13,11 +15,7 @@ LIBC= # nothing
AFLAGS.fatboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.fatboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
PIE_CFLAGS= .include <bsd.init.mk>
PIE_LDFLAGS=
PIE_AFLAGS=
.include <bsd.own.mk>
STRIPFLAG= # override STRIPFLAG= # override

View File

@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.24 2016/01/23 22:29:29 christos Exp $ # $NetBSD: Makefile,v 1.25 2018/06/02 14:30:07 christos Exp $
S= ${.CURDIR}/../../../.. S= ${.CURDIR}/../../../..
BASE?= pxeboot_ia32 BASE?= pxeboot_ia32
PROG= ${BASE}.bin PROG= ${BASE}.bin
NOMAN= # defined
NEWVERSWHAT= "PXE Boot" NEWVERSWHAT= "PXE Boot"
STARTFILE= ${PXESTART} STARTFILE= ${PXESTART}
RELOC= 0x0 RELOC= 0x0
@ -19,11 +18,7 @@ SRCS= main.c dev_net.c devopen.c conf.c exec.c pxe.c pxe_call.S
.PATH: ${.CURDIR}/../libsa .PATH: ${.CURDIR}/../libsa
SRCS+= nfs.c SRCS+= nfs.c
PIE_CFLAGS= .include <bsd.init.mk>
PIE_AFLAGS=
PIE_LDFLAGS=
.include <bsd.own.mk>
.if ${MACHINE_ARCH} == "x86_64" .if ${MACHINE_ARCH} == "x86_64"
LDFLAGS+= -Wl,-m,elf_i386 LDFLAGS+= -Wl,-m,elf_i386