Sat Oct 1 13:57:44 2016 UTC ()
deal with PIE and SSP


(christos)
diff -r1.31 -r1.32 src/sys/arch/sparc/stand/Makefile.buildboot
diff -r1.13 -r1.14 src/sys/arch/sparc/stand/Makefile.inc
diff -r1.15 -r1.16 src/sys/arch/sparc/stand/bootblk/Makefile
diff -r1.36 -r1.37 src/sys/arch/sparc/stand/ofwboot/Makefile

cvs diff -r1.31 -r1.32 src/sys/arch/sparc/stand/Makefile.buildboot (expand / switch to unified diff)

--- src/sys/arch/sparc/stand/Makefile.buildboot 2016/03/10 09:00:24 1.31
+++ src/sys/arch/sparc/stand/Makefile.buildboot 2016/10/01 13:57:44 1.32
@@ -1,26 +1,29 @@ @@ -1,26 +1,29 @@
1# $NetBSD: Makefile.buildboot,v 1.31 2016/03/10 09:00:24 martin Exp $ 1# $NetBSD: Makefile.buildboot,v 1.32 2016/10/01 13:57:44 christos Exp $
2# 2#
3# This file is for the sparc `boot' and `bootxx' only; it does not 3# This file is for the sparc `boot' and `bootxx' only; it does not
4# currently play well on a 64-bit system. 4# currently play well on a 64-bit system.
5 5
 6NOSSP= # defined
 7NOPIE= # defined
 8NOMAN= # defined
 9
6S= ${.CURDIR}/../../../.. 10S= ${.CURDIR}/../../../..
7 11
8.PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc 12.PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
9 13
10COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c isfloppy.c 14COMMONSOURCE= srt0.S promdev.c dvma.c promlib.c isfloppy.c
11 15
12SRCS= ${COMMONSOURCE} ${PROGSOURCE} 16SRCS= ${COMMONSOURCE} ${PROGSOURCE}
13NOMAN= # defined 
14BINMODE= 444 17BINMODE= 444
15 18
16.include <bsd.own.mk> 19.include <bsd.own.mk>
17 20
18# 21#
19# The relocation address for `boot' must leave enough free memory below 22# The relocation address for `boot' must leave enough free memory below
20# it to load a kernel at address 0x4000. On the other hand, on some 23# it to load a kernel at address 0x4000. On the other hand, on some
21# machines, the PROM uses memory in the upper portion of the first 4MB 24# machines, the PROM uses memory in the upper portion of the first 4MB
22# segment, depending on the actual memory bank configuration probably. 25# segment, depending on the actual memory bank configuration probably.
23# Our boot program must stear clear of that as well. 26# Our boot program must stear clear of that as well.
24# 27#
25# Relocating `boot' at 0x388000 seems to provide a working compromise 28# Relocating `boot' at 0x388000 seems to provide a working compromise
26# on the machines tested so far. 29# on the machines tested so far.

cvs diff -r1.13 -r1.14 src/sys/arch/sparc/stand/Makefile.inc (expand / switch to unified diff)

--- src/sys/arch/sparc/stand/Makefile.inc 2016/05/19 15:41:18 1.13
+++ src/sys/arch/sparc/stand/Makefile.inc 2016/10/01 13:57:44 1.14
@@ -1,18 +1,15 @@ @@ -1,18 +1,15 @@
1# $NetBSD: Makefile.inc,v 1.13 2016/05/19 15:41:18 christos Exp $ 1# $NetBSD: Makefile.inc,v 1.14 2016/10/01 13:57:44 christos Exp $
2 2
3.ifndef __INCLUDED_STAND_MAKEFILE_INC 3NOSSP= # defined
4__INCLUDED_STAND_MAKEFILE_INC= 4NOPIE= # defined
5 5NOMAN= # defined
6.include <bsd.own.mk> 
7 6
8BINDIR= /usr/mdec 7BINDIR= /usr/mdec
9NOPIE= yes 8NOPIE= yes
10 9
11CPPFLAGS+= -DSTANDALONE -I. 10CPPFLAGS+= -DSTANDALONE -I.
12CFLAGS+= -ffreestanding ${${ACTIVE_CC} == "gcc":? -msoft-float :} 11CFLAGS+= -ffreestanding ${${ACTIVE_CC} == "gcc":? -msoft-float :}
13 12
14.if ${MACHINE} == "sparc64" 13.if ${MACHINE} == "sparc64"
15CPPFLAGS+= -DSUN4U 14CPPFLAGS+= -DSUN4U
16.endif 15.endif
17 
18.endif 

cvs diff -r1.15 -r1.16 src/sys/arch/sparc/stand/bootblk/Makefile (expand / switch to unified diff)

--- src/sys/arch/sparc/stand/bootblk/Makefile 2014/03/04 17:57:56 1.15
+++ src/sys/arch/sparc/stand/bootblk/Makefile 2016/10/01 13:57:44 1.16
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1# $NetBSD: Makefile,v 1.15 2014/03/04 17:57:56 joerg Exp $ 1# $NetBSD: Makefile,v 1.16 2016/10/01 13:57:44 christos Exp $
 2
 3.include <bsd.init.mk>
2 4
3CURDIR= ${.CURDIR} 5CURDIR= ${.CURDIR}
4S= ${CURDIR}/../../../.. 6S= ${CURDIR}/../../../..
5 7
6# 8#
7# Override normal settings 9# Override normal settings
8# 10#
9 11
10PROG= bootblk 12PROG= bootblk
11SRCS= bootblk.fth 13SRCS= bootblk.fth
12OBJS= 14OBJS=
13CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \ 15CLEANFILES= ffs.fth.h lfs.fth.h assym.fth.h.tmp \
14 bootblk bootblk.text bootblk.text.tmp 16 bootblk bootblk.text bootblk.text.tmp

cvs diff -r1.36 -r1.37 src/sys/arch/sparc/stand/ofwboot/Makefile (expand / switch to unified diff)

--- src/sys/arch/sparc/stand/ofwboot/Makefile 2015/10/26 07:11:33 1.36
+++ src/sys/arch/sparc/stand/ofwboot/Makefile 2016/10/01 13:57:44 1.37
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1# $NetBSD: Makefile,v 1.36 2015/10/26 07:11:33 mrg Exp $ 1# $NetBSD: Makefile,v 1.37 2016/10/01 13:57:44 christos Exp $
 2
 3.include <bsd.init.mk>
2 4
3CURDIR= ${.CURDIR} 5CURDIR= ${.CURDIR}
4S= ${CURDIR}/../../../.. 6S= ${CURDIR}/../../../..
5 7
6# 8#
7# Override normal settings 9# Override normal settings
8# 10#
9 11
10WARNS?= 2 12WARNS?= 2
11KLINK_MACHINE= sparc64 13KLINK_MACHINE= sparc64
12 14
13PROG?= ofwboot 15PROG?= ofwboot
14SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c 16SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c