Date: Tue, 27 May 2003 14:55:05 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 31947 for review Message-ID: <200305272155.h4RLt5v1052382@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31947 Change 31947 by peter@peter_hammer on 2003/05/27 14:54:41 Make this build on amd64, and from just about any subdir. Affected files ... .. //depot/projects/hammer/sys/boot/Makefile#6 edit .. //depot/projects/hammer/sys/boot/common/Makefile.inc#6 edit .. //depot/projects/hammer/sys/boot/i386/Makefile.inc#2 edit .. //depot/projects/hammer/sys/boot/i386/boot2/Makefile#4 edit .. //depot/projects/hammer/sys/boot/i386/btx/Makefile.inc#1 add .. //depot/projects/hammer/sys/boot/i386/btx/btxldr/Makefile#3 edit Differences ... ==== //depot/projects/hammer/sys/boot/Makefile#6 (text+ko) ==== @@ -1,8 +1,7 @@ # $FreeBSD: src/sys/boot/Makefile,v 1.16 2003/04/30 22:13:36 peter Exp $ .if ${MACHINE_ARCH} == "amd64" -MACHINE_ARCH=i386 -MACHINE=i386 +.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true .endif .if !defined(NOFORTH) ==== //depot/projects/hammer/sys/boot/common/Makefile.inc#6 (text+ko) ==== @@ -34,7 +34,3 @@ .endif MAN+= loader.8 - -.if ${MACHINE_ARCH} == "amd64" -CFLAGS+= -m32 -.endif ==== //depot/projects/hammer/sys/boot/i386/Makefile.inc#2 (text+ko) ==== @@ -4,3 +4,14 @@ LOADER_ADDRESS?= 0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 + +.if ${MACHINE_ARCH} == "amd64" +.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true +.endif + +.if defined(REALLY_AMD64) && !defined(__been_to_Makefile_inc) +__been_to_Makefile_inc= 1 +CFLAGS+= -m32 +LDFLAGS+= -m elf_i386_fbsd +AFLAGS+= --32 +.endif ==== //depot/projects/hammer/sys/boot/i386/boot2/Makefile#4 (text+ko) ==== @@ -109,3 +109,15 @@ boot2 ${DESTDIR}${BINDIR}/boot2 .include <bsd.prog.mk> + +.if defined(REALLY_AMD64) +boot2.o: machine + +beforedepend ${OBJS}: machine + +machine: + ln -sf ${.CURDIR}/../../../i386/include machine + +CLEANFILES+= machine +.endif + ==== //depot/projects/hammer/sys/boot/i386/btx/btxldr/Makefile#3 (text+ko) ==== @@ -19,5 +19,4 @@ CLEANFILES+= btxldr btxldr.out btxldr.o -.include <${.CURDIR}/../../Makefile.inc> .include <bsd.prog.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305272155.h4RLt5v1052382>