summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-10 09:26:35 +0000
committerobrien <obrien@FreeBSD.org>2002-05-10 09:26:35 +0000
commitce04447cdfa298204b0d3e6fe6cc24686c935354 (patch)
tree129629b06e5fc8f495f4447b72ce9c193c4cae7d
parent5eb5239e7b9b006e0d68a2a4dd7bb7fdc40f042d (diff)
downloadFreeBSD-src-ce04447cdfa298204b0d3e6fe6cc24686c935354.zip
FreeBSD-src-ce04447cdfa298204b0d3e6fe6cc24686c935354.tar.gz
-ffreestanding is the word.
(also resort some CFLAGS such that the more "important" value are first so they are easier to see)
-rw-r--r--sys/boot/alpha/boot1/Makefile6
-rw-r--r--sys/boot/alpha/cdboot/Makefile2
-rw-r--r--sys/boot/alpha/libalpha/Makefile11
-rw-r--r--sys/boot/alpha/loader/Makefile2
-rw-r--r--sys/boot/alpha/netboot/Makefile2
-rw-r--r--sys/boot/arc/lib/Makefile1
-rw-r--r--sys/boot/arc/loader/Makefile2
-rw-r--r--sys/boot/efi/libefi/Makefile2
-rw-r--r--sys/boot/efi/loader/Makefile1
-rw-r--r--sys/boot/ficl/Makefile1
-rw-r--r--sys/boot/ia64/efi/Makefile1
-rw-r--r--sys/boot/ia64/libski/Makefile2
-rw-r--r--sys/boot/ia64/ski/Makefile1
-rw-r--r--sys/boot/ia64/skiload/Makefile1
-rw-r--r--sys/boot/pc98/boot2/Makefile2
-rw-r--r--sys/boot/pc98/kgzldr/Makefile2
-rw-r--r--sys/boot/pc98/libpc98/Makefile1
-rw-r--r--sys/boot/pc98/loader/Makefile1
-rw-r--r--sys/boot/powerpc/loader/Makefile2
-rw-r--r--sys/boot/powerpc/ofw/Makefile2
-rw-r--r--sys/boot/sparc64/boot1/Makefile3
-rw-r--r--sys/boot/sparc64/loader/Makefile2
22 files changed, 29 insertions, 21 deletions
diff --git a/sys/boot/alpha/boot1/Makefile b/sys/boot/alpha/boot1/Makefile
index 262f9dd..2d69202 100644
--- a/sys/boot/alpha/boot1/Makefile
+++ b/sys/boot/alpha/boot1/Makefile
@@ -8,12 +8,12 @@ PROG = boot1
.PATH: ${.CURDIR}/../libalpha
SRCS= start.S boot1.c sys.c
-CFLAGS+= -mno-fp-regs
+CFLAGS+= -ffreestanding -mno-fp-regs
+CFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS} -DMINIMAL
+CFLAGS+= -DBOOT1
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
CFLAGS+= -I${LIBSTANDDIR}
CFLAGS+= -I${.CURDIR}/..
-CFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS} -DMINIMAL
-CFLAGS+= -DBOOT1
NOMAN=1
STRIP=
BINDIR?= /boot
diff --git a/sys/boot/alpha/cdboot/Makefile b/sys/boot/alpha/cdboot/Makefile
index 83af791..b4f07bb 100644
--- a/sys/boot/alpha/cdboot/Makefile
+++ b/sys/boot/alpha/cdboot/Makefile
@@ -6,6 +6,6 @@ NOMAN=
NEWVERSWHAT= "SRM CD9660 boot" alpha
LOAD_ADDRESS= ${PRIMARY_LOAD_ADDRESS}
-CFLAGS+= -DLOADER_CDROM_SUPPORT
+CFLAGS+= -ffreestanding -DLOADER_CDROM_SUPPORT
.include <${.CURDIR}/../common/Makefile.common>
diff --git a/sys/boot/alpha/libalpha/Makefile b/sys/boot/alpha/libalpha/Makefile
index 0abacda..a3fe818 100644
--- a/sys/boot/alpha/libalpha/Makefile
+++ b/sys/boot/alpha/libalpha/Makefile
@@ -5,19 +5,20 @@ NOPIC= true
NOPROFILE= true
INTERNALLIB= true
+CFLAGS+= -ffreestanding
+#CFLAGS+= -DDISK_DEBUG
+#CPPFLAGS+= -DNO_DISKLABEL
+#CPPFLAGS+= -DSAVE_MEMORY
+
# XXX hack to pick up stand.h
LIBSTANDDIR= ${.CURDIR}/../../../../lib/libstand
-CFLAGS+= -I${LIBSTANDDIR}
CFLAGS+= -DDEBUG
+CFLAGS+= -I${LIBSTANDDIR}
# Pick up the bootstrap header for some interface items
CFLAGS+= -I${.CURDIR}/../../common -mno-fp-regs \
-I${.CURDIR}/../../.. -I.
-#CFLAGS+= -DDISK_DEBUG
-#CPPFLAGS+= -DNO_DISKLABEL
-#CPPFLAGS+= -DSAVE_MEMORY
-
SRCS= OSFpal.c elf_freebsd.c prom.c prom_disp.S prom_swpal.S \
pal.S reboot.c delay.c time.c alpha_module.c devicename.c \
srmdisk.c srmnet.c getsecs.c alpha_copy.c bootinfo.c
diff --git a/sys/boot/alpha/loader/Makefile b/sys/boot/alpha/loader/Makefile
index 177f2c4b..3b663de 100644
--- a/sys/boot/alpha/loader/Makefile
+++ b/sys/boot/alpha/loader/Makefile
@@ -7,6 +7,6 @@ INSTALL_HELP= yes
LOAD_ADDRESS= ${SECONDARY_LOAD_ADDRESS}
# Only disk support
-CFLAGS+= -DLOADER_DISK_SUPPORT # -DLOADER_EXT2FS_SUPPORT
+CFLAGS+= -ffreestanding -DLOADER_DISK_SUPPORT # -DLOADER_EXT2FS_SUPPORT
.include <${.CURDIR}/../common/Makefile.common>
diff --git a/sys/boot/alpha/netboot/Makefile b/sys/boot/alpha/netboot/Makefile
index 0d44c74..5599aab 100644
--- a/sys/boot/alpha/netboot/Makefile
+++ b/sys/boot/alpha/netboot/Makefile
@@ -7,7 +7,7 @@ NOMAN=
NEWVERSWHAT= "SRM net boot" alpha
LOAD_ADDRESS= ${PRIMARY_LOAD_ADDRESS}
-CFLAGS+= -DLOADER_NET_SUPPORT
+CFLAGS+= -ffreestanding -DLOADER_NET_SUPPORT
.include <${.CURDIR}/../common/Makefile.common>
diff --git a/sys/boot/arc/lib/Makefile b/sys/boot/arc/lib/Makefile
index 1c7bb6c..fbbfeb8 100644
--- a/sys/boot/arc/lib/Makefile
+++ b/sys/boot/arc/lib/Makefile
@@ -5,6 +5,7 @@ NOPIC= true
NOPROFILE= true
INTERNALLIB= true
+CFLAGS+= -ffreestanding
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
# XXX hack to pick up stand.h
LIBSTANDDIR= ${.CURDIR}/../../../../lib/libstand
diff --git a/sys/boot/arc/loader/Makefile b/sys/boot/arc/loader/Makefile
index 351311b..e7b7457 100644
--- a/sys/boot/arc/loader/Makefile
+++ b/sys/boot/arc/loader/Makefile
@@ -14,7 +14,7 @@ SRCS+= main.c conf.c
# Always add MI sources
.PATH: ${.CURDIR}/../../common
.include <${.CURDIR}/../../common/Makefile.inc>
-CFLAGS+= -mno-fp-regs
+CFLAGS+= -ffreestanding -mno-fp-regs
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/../../.. -I.
CFLAGS+= -DLOADER
diff --git a/sys/boot/efi/libefi/Makefile b/sys/boot/efi/libefi/Makefile
index 2e7bff2..18f26a8 100644
--- a/sys/boot/efi/libefi/Makefile
+++ b/sys/boot/efi/libefi/Makefile
@@ -15,7 +15,7 @@ SRCS+= delay.c efifs.c efinet.c elf_freebsd.c bootinfo.c pal.s
SRCS+= efifpswa.c
.endif
-CFLAGS+= -fpic
+CFLAGS+= -ffreestanding -fpic
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile
index 7911280..5881829 100644
--- a/sys/boot/efi/loader/Makefile
+++ b/sys/boot/efi/loader/Makefile
@@ -11,6 +11,7 @@ STRIP= # We must not strip loader.efi at install time.
SRCS+= main.c conf.c dev_net.c
+CFLAGS+= -ffreestanding
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE_ARCH}
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index f569f7a..a1187e7 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -6,6 +6,7 @@ BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
SRCS= ${BASE_SRCS} sysdep.c softcore.c
CLEANFILES= softcore.c testmain testmain.o
+CFLAGS+= -ffreestanding
.if ${MACHINE_ARCH} == "alpha"
CFLAGS+= -mno-fp-regs
.endif
diff --git a/sys/boot/ia64/efi/Makefile b/sys/boot/ia64/efi/Makefile
index 7911280..5881829 100644
--- a/sys/boot/ia64/efi/Makefile
+++ b/sys/boot/ia64/efi/Makefile
@@ -11,6 +11,7 @@ STRIP= # We must not strip loader.efi at install time.
SRCS+= main.c conf.c dev_net.c
+CFLAGS+= -ffreestanding
# Enable BootForth
BOOT_FORTH= yes
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE_ARCH}
diff --git a/sys/boot/ia64/libski/Makefile b/sys/boot/ia64/libski/Makefile
index 30bb7e5..417a692 100644
--- a/sys/boot/ia64/libski/Makefile
+++ b/sys/boot/ia64/libski/Makefile
@@ -9,7 +9,7 @@ INTERNALSTATICLIB= true
SRCS= skiconsole.c time.c copy.c devicename.c module.c exit.c
SRCS+= delay.c skifs.c elf_freebsd.c bootinfo.c ssc.c
-CFLAGS+= -fpic -g
+CFLAGS+= -ffreestanding -fpic -g
CFLAGS+= -I${.CURDIR}/../include
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
diff --git a/sys/boot/ia64/ski/Makefile b/sys/boot/ia64/ski/Makefile
index c34b789..bb4fc5c 100644
--- a/sys/boot/ia64/ski/Makefile
+++ b/sys/boot/ia64/ski/Makefile
@@ -11,6 +11,7 @@ SRCS+= main.c conf.c
# Enable BootForth
BOOT_FORTH= yes
+CFLAGS+= -ffreestanding
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/ia64
.if BOOT_FORTH
diff --git a/sys/boot/ia64/skiload/Makefile b/sys/boot/ia64/skiload/Makefile
index c34b789..bb4fc5c 100644
--- a/sys/boot/ia64/skiload/Makefile
+++ b/sys/boot/ia64/skiload/Makefile
@@ -11,6 +11,7 @@ SRCS+= main.c conf.c
# Enable BootForth
BOOT_FORTH= yes
+CFLAGS+= -ffreestanding
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/ia64
.if BOOT_FORTH
diff --git a/sys/boot/pc98/boot2/Makefile b/sys/boot/pc98/boot2/Makefile
index d4bdde4..4490866 100644
--- a/sys/boot/pc98/boot2/Makefile
+++ b/sys/boot/pc98/boot2/Makefile
@@ -8,7 +8,7 @@ SRCS+= probe_keyboard.c io.c disk.c sys.c
BINDIR= /boot
BINMODE= 444
-CFLAGS= -elf -Os -fno-builtin -fforce-addr -fdata-sections \
+CFLAGS= -elf -Os -ffreestanding -fforce-addr -fdata-sections \
-malign-functions=0 -malign-jumps=0 -malign-loops=0 \
-mpreferred-stack-boundary=2 -mrtd \
-D_KERNEL -DPC98 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
diff --git a/sys/boot/pc98/kgzldr/Makefile b/sys/boot/pc98/kgzldr/Makefile
index c0820c1..0c2998b 100644
--- a/sys/boot/pc98/kgzldr/Makefile
+++ b/sys/boot/pc98/kgzldr/Makefile
@@ -3,7 +3,7 @@
FILES= kgzldr.o
SRCS= start.s boot.c inflate.c lib.c crt.s sio.s
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
-CFLAGS= -fno-builtin
+CFLAGS= -ffreestanding
.if ${OBJFORMAT} == aout
CFLAGS+=-O2
.else
diff --git a/sys/boot/pc98/libpc98/Makefile b/sys/boot/pc98/libpc98/Makefile
index 9bcae48..35bf67c 100644
--- a/sys/boot/pc98/libpc98/Makefile
+++ b/sys/boot/pc98/libpc98/Makefile
@@ -13,6 +13,7 @@ SRCS= aout_freebsd.c biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \
i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
time.c vidconsole.c
+CFLAGS+= -ffreestanding
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \
-I${.CURDIR}/../../i386/libi386 \
-I${.CURDIR}/../../../contrib/dev/acpica \
diff --git a/sys/boot/pc98/loader/Makefile b/sys/boot/pc98/loader/Makefile
index 501a294..eff2fec 100644
--- a/sys/boot/pc98/loader/Makefile
+++ b/sys/boot/pc98/loader/Makefile
@@ -10,6 +10,7 @@ INSTALLFLAGS= -b
LOADER_AOUT_SUPPORT= yes
.endif
+CFLAGS+= -ffreestanding
CFLAGS+= -DPC98
# architecture-specific loader code
diff --git a/sys/boot/powerpc/loader/Makefile b/sys/boot/powerpc/loader/Makefile
index 045f190..4887c04 100644
--- a/sys/boot/powerpc/loader/Makefile
+++ b/sys/boot/powerpc/loader/Makefile
@@ -11,6 +11,7 @@ INSTALLFLAGS= -b
LOADER_DISK_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
+CFLAGS+= -ffreestanding
# load address
RELOC?= 0x6c0000
CFLAGS+= -DRELOC=${RELOC}
@@ -48,7 +49,6 @@ CFLAGS+= -I${.CURDIR}/../../.. -I.
CLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin ${BASE}.sym ${BASE}.help
-CFLAGS+= -Wall
LDFLAGS= -nostdlib -static -Ttext ${RELOC}
# OpenFirmware standalone support library
diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile
index 045f190..4887c04 100644
--- a/sys/boot/powerpc/ofw/Makefile
+++ b/sys/boot/powerpc/ofw/Makefile
@@ -11,6 +11,7 @@ INSTALLFLAGS= -b
LOADER_DISK_SUPPORT?= yes
LOADER_NET_SUPPORT?= yes
+CFLAGS+= -ffreestanding
# load address
RELOC?= 0x6c0000
CFLAGS+= -DRELOC=${RELOC}
@@ -48,7 +49,6 @@ CFLAGS+= -I${.CURDIR}/../../.. -I.
CLEANFILES+= vers.c vers.o ${BASE}.list ${BASE}.bin ${BASE}.sym ${BASE}.help
-CFLAGS+= -Wall
LDFLAGS= -nostdlib -static -Ttext ${RELOC}
# OpenFirmware standalone support library
diff --git a/sys/boot/sparc64/boot1/Makefile b/sys/boot/sparc64/boot1/Makefile
index af073a2..ab012f7 100644
--- a/sys/boot/sparc64/boot1/Makefile
+++ b/sys/boot/sparc64/boot1/Makefile
@@ -9,8 +9,7 @@ BINMODE= 444
BOOTBLOCKBASE= 0x4000
-CFLAGS= -W -Wall -Wno-unused -I../../ -I../../common/ -Os -ffreestanding \
- -mcmodel=medlow
+CFLAGS= -ffreestanding -mcmodel=medlow -Os -I../.. -I../../common
boot1.elf: _start.o boot1.o
${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} ${.ALLSRC}
diff --git a/sys/boot/sparc64/loader/Makefile b/sys/boot/sparc64/loader/Makefile
index 83076be..dab90c9 100644
--- a/sys/boot/sparc64/loader/Makefile
+++ b/sys/boot/sparc64/loader/Makefile
@@ -45,7 +45,7 @@ CFLAGS+= -I${.CURDIR}/../../.. -I.
CLEANFILES+= ${PROG}.help
-CFLAGS+= -W -Wall -ffreestanding
+CFLAGS+= -ffreestanding
LDFLAGS= -nostdlib -static
LDADD= ${LIBSTAND} ${LIBOFW}
OpenPOWER on IntegriCloud