Add make variables for fs support and propagate them to CFLAGS. Put
-ffreestanding in CFLAGS. Remove unnecessary LDFLAGS.
This commit is contained in:
parent
8f643f6169
commit
ce801add09
@ -1,17 +1,31 @@
|
||||
# $FreeBSD$
|
||||
|
||||
LOADERBASE= 0x100000
|
||||
|
||||
BASE= loader
|
||||
PROG= ${BASE}
|
||||
NEWVERSWHAT= "bootstrap loader" sparc64
|
||||
|
||||
LOADER_DISK_SUPPORT?= yes
|
||||
LOADER_NET_SUPPORT?= yes
|
||||
CFLAGS= -mno-app-regs
|
||||
|
||||
LOADER_DISK_SUPPORT?= no
|
||||
LOADER_NET_SUPPORT?= yes
|
||||
LOADER_NFS_SUPPORT?= yes
|
||||
LOADER_TFTP_SUPPORT?= yes
|
||||
|
||||
.if ${LOADER_DISK_SUPPORT} == "yes"
|
||||
CFLAGS+= -DLOADER_DISK_SUPPORT
|
||||
.endif
|
||||
.if ${LOADER_NET_SUPPORT} == "yes"
|
||||
CFLAGS+= -DLOADER_NET_SUPPORT
|
||||
.endif
|
||||
.if ${LOADER_NFS_SUPPORT} == "yes"
|
||||
CFLAGS+= -DLOADER_NFS_SUPPORT
|
||||
.endif
|
||||
.if ${LOADER_TFTP_SUPPORT} == "yes"
|
||||
CFLAGS+= -DLOADER_TFTP_SUPPORT
|
||||
.endif
|
||||
|
||||
# Architecture-specific loader code
|
||||
SRCS= locore.s main.c metadata.c
|
||||
CFLAGS= -mno-app-regs
|
||||
|
||||
# Always add MI sources
|
||||
.PATH: ${.CURDIR}/../../common
|
||||
@ -21,8 +35,8 @@ CFLAGS+= -I${.CURDIR}/../../.. -I.
|
||||
|
||||
CLEANFILES+= ${PROG}
|
||||
|
||||
CFLAGS+= -W -Wall
|
||||
LDFLAGS= -X -Ttext ${LOADERBASE} -e _start -static
|
||||
CFLAGS+= -W -Wall -ffreestanding
|
||||
LDFLAGS= -X -static
|
||||
|
||||
# where to get libstand from
|
||||
#XXX need a better way to do this
|
||||
@ -37,8 +51,6 @@ LIBOFW= ${.CURDIR}/../../ofw/libofw/libofw.a
|
||||
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
|
||||
CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
|
||||
|
||||
CFLAGS+= -elf -DLOADERBASE=${LOADERBASE}
|
||||
|
||||
# Debug me!
|
||||
#CFLAGS+= -g
|
||||
#LDFLAGS+= -g
|
||||
|
Loading…
Reference in New Issue
Block a user