i386 removal, part 11/x: Remove wrong machine/ setup in the boot Makefiles.
authorSascha Wildner <saw@online.de>
Fri, 3 Jul 2015 23:13:32 +0000 (01:13 +0200)
committerSascha Wildner <saw@online.de>
Sat, 4 Jul 2015 08:23:50 +0000 (10:23 +0200)
Several of the link targets were pointing to ${.CURDIR}/../../i386/...
which doesn't exist. This is from times when our platform-specific
headers were differently laid out and it was never noticed that after
some point, it was no longer needed.

In fact, sys/boot builds properly without all this, because:

* -m32 ensures that the i386 platform is targeted by the compiler

* Various (needed) __i386__ checks in sys/cpu/x86_64/include ensure that
  even on x86_64, the basic types have the right sizes.

Confirmed by binary compare of /boot without and with the patch.

sys/boot/dloader/Makefile
sys/boot/pc32/boot2/Makefile
sys/boot/pc32/libi386/Makefile
sys/boot/pc32/loader/Makefile
sys/boot/pc32/loader_tftp/Makefile

index 6fad1a1..f070347 100644 (file)
@@ -30,20 +30,5 @@ stack_protector.o: ../../libkern/stack_protector.c
 .include <bsd.lib.mk>
 .endif
 
-.if defined(REALLY_X86_64)
-CFLAGS+=       -I.
-.endif
-
 CFLAGS+=       -I${.CURDIR}
 CFLAGS+=       -I${.CURDIR}/../common
-
-.if defined(REALLY_X86_64)
-${SRCS:M*.c:R:S/$/.o/g}: machine
-
-beforedepend ${OBJS}: machine
-
-machine:
-       ${LN} -sf ${.CURDIR}/../../i386/include machine
-
-CLEANFILES+=   machine
-.endif
index a97bc66..1a2704d 100644 (file)
@@ -148,6 +148,7 @@ boot2$s.out: boot2$s.o sio.o ${_ADDOBJS$s}
 CLEANFILES+=   boot1$s boot1$s.out boot1$s.o \
                boot2$s boot2$s.ldr boot2$s.bin \
                boot2$s.ld boot2$s.out boot2$s.o boot2$s.h boot2$s.s \
+               bootasmdef.nx \
                ${_ADDOBJS$s}
 
 hammer2$s.o: hammer2.c
@@ -179,25 +180,3 @@ install:
                boot2_64 ${DESTDIR}${BINDIR}/boot2_64
 
 .include <bsd.prog.mk>
-
-.if defined(REALLY_X86_64)
-# For x86_64, we need to fake up a complete machine/ tree
-# so that types for -m32 appear correctly.
-
-boot2.o: machine
-
-beforedepend ${OBJS}: machine cpu
-
-machine::
-       mkdir -p machine
-       ${LN} -sf ${.CURDIR}/../../../cpu/i386/include/* machine
-       ${LN} -sf ${.CURDIR}/../../../platform/pc32/include/* machine
-
-cpu::
-       ${LN} -hsf ${.CURDIR}/../../../cpu/i386/include cpu
-
-CLEANDIRS+=    machine cpu
-.endif
-
-CLEANFILES+=   bootasmdef.nx
-
index 96e2d01..41ec401 100644 (file)
@@ -34,19 +34,4 @@ CFLAGS+=     -I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \
 # the location of libstand
 CFLAGS+=       -I${.CURDIR}/../../../../lib/libstand/
 
-# If it's not there, don't consider it a target
-.if exists(${.CURDIR}/../../../cpu/i386/include)
-
-# Make "machine" required for all objects
-# (based on the more complete case in sys/arch/i386/boot/Makefile.inc)
-${SRCS:M*.c:R:S/$/.o/g}: machine
-
-beforedepend ${OBJS}: machine
-
-CLEANFILES+=   machine
-machine:
-       ${LN} -sf ${.CURDIR}/../../../cpu/i386/include machine
-
-.endif
-
 .include <bsd.lib.mk>
index b575aef..6e3d07c 100644 (file)
@@ -116,14 +116,3 @@ FILES+=    ${.CURDIR}/dloader.rc
 ${PROG}.sym: ${OBJS} ${LIBI386} ${LIBSTAND} ${LIBDLOADER} vers.o
        ${CC} ${COMPILER_LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} vers.o \
                ${LIBDLOADER} ${LIBI386} ${LIBSTAND}
-
-# If it's not there, don't consider it a target
-.if exists(${.CURDIR}/../../../i386/include)
-beforedepend ${OBJS}: machine
-
-machine:
-       ${LN} -sf ${.CURDIR}/../../../i386/include machine
-
-.endif
-
-CLEANFILES+=   machine
index b6c30a3..1c7dcdd 100644 (file)
@@ -115,14 +115,3 @@ FILES+=    ${.CURDIR}/../loader/dloader.rc
 ${PROG}.sym: ${OBJS} ${LIBI386} ${LIBSTAND} ${LIBDLOADER} vers.o
        ${CC} ${COMPILER_LDFLAGS} -o ${.TARGET} ${BTXCRT} ${OBJS} vers.o \
                ${LIBDLOADER} ${LIBI386} ${LIBSTAND}
-
-# If it's not there, don't consider it a target
-.if exists(${.CURDIR}/../../../i386/include)
-beforedepend ${OBJS}: machine
-
-machine:
-       ${LN} -sf ${.CURDIR}/../../../i386/include machine
-
-.endif
-
-CLEANFILES+=   machine