From owner-svn-src-all@FreeBSD.ORG Thu Apr 3 21:18:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C18C13EA; Thu, 3 Apr 2014 21:18:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A21F2F88; Thu, 3 Apr 2014 21:18:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s33LI4Gr097194; Thu, 3 Apr 2014 21:18:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s33LI3v4097189; Thu, 3 Apr 2014 21:18:03 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201404032118.s33LI3v4097189@svn.freebsd.org> From: Ed Maste Date: Thu, 3 Apr 2014 21:18:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264087 - in head/sys/boot: . ficl ficl32 ficl64 i386/efi i386/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 21:18:04 -0000 Author: emaste Date: Thu Apr 3 21:18:03 2014 New Revision: 264087 URL: http://svnweb.freebsd.org/changeset/base/264087 Log: Build boot/ficl as 64-bit library on amd64 The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader. Sponsored by: The FreeBSD Foundation Added: head/sys/boot/ficl32/ - copied from r264086, head/sys/boot/ficl64/ Deleted: head/sys/boot/ficl64/ Modified: head/sys/boot/Makefile.amd64 head/sys/boot/ficl/Makefile head/sys/boot/ficl32/Makefile head/sys/boot/i386/efi/Makefile head/sys/boot/i386/loader/Makefile Modified: head/sys/boot/Makefile.amd64 ============================================================================== --- head/sys/boot/Makefile.amd64 Thu Apr 3 20:18:55 2014 (r264086) +++ head/sys/boot/Makefile.amd64 Thu Apr 3 21:18:03 2014 (r264087) @@ -1,7 +1,10 @@ # $FreeBSD$ SUBDIR+= efi -SUBDIR+= ficl64 SUBDIR+= libstand32 SUBDIR+= zfs SUBDIR+= userboot + +.if ${MK_FORTH} != "no" +SUBDIR+= ficl32 +.endif Modified: head/sys/boot/ficl/Makefile ============================================================================== --- head/sys/boot/ficl/Makefile Thu Apr 3 20:18:55 2014 (r264086) +++ head/sys/boot/ficl/Makefile Thu Apr 3 21:18:03 2014 (r264087) @@ -3,7 +3,7 @@ FICLDIR?= ${.CURDIR} -.if !defined(FICL64) +.if defined(FICL32) .PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} .elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" .PATH: ${FICLDIR}/${MACHINE_ARCH} @@ -16,11 +16,12 @@ BASE_SRCS= dict.c ficl.c fileaccess.c fl SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -.if !defined(FICL64) +.if ${MACHINE_CPUARCH} == "i386" || \ + (${MACHINE_CPUARCH} == "amd64" && defined(FICL32)) CFLAGS+= -march=i386 CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" @@ -53,22 +54,32 @@ SOFTWORDS= softcore.fr jhlocal.fr marker # Optional OO extension softwords #SOFTWORDS+= oo.fr classes.fr -.if ${MACHINE_CPUARCH} == "amd64" && !defined(FICL64) +.if ${MACHINE_CPUARCH} == "amd64" +.if defined(FICL32) CFLAGS+= -m32 -I. +.else +CFLAGS+= -fPIC +.endif .endif .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -I. .endif -CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \ +.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) +FICL_CPUARCH= i386 +.else +FICL_CPUARCH= ${MACHINE_CPUARCH} +.endif + +CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \ -I${FICLDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk (cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) .if !exists(machine) ${SRCS:M*.c:R:S/$/.o/g}: machine Modified: head/sys/boot/ficl32/Makefile ============================================================================== --- head/sys/boot/ficl64/Makefile Thu Apr 3 20:18:55 2014 (r264086) +++ head/sys/boot/ficl32/Makefile Thu Apr 3 21:18:03 2014 (r264087) @@ -1,6 +1,6 @@ # $FreeBSD$ -FICL64= +FICL32= FICLDIR= ${.CURDIR}/../ficl .PATH: ${FICLDIR} Modified: head/sys/boot/i386/efi/Makefile ============================================================================== --- head/sys/boot/i386/efi/Makefile Thu Apr 3 20:18:55 2014 (r264086) +++ head/sys/boot/i386/efi/Makefile Thu Apr 3 21:18:03 2014 (r264087) @@ -31,8 +31,12 @@ BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH CFLAGS+= -I${.CURDIR}/../../ficl CFLAGS+= -I${.CURDIR}/../../ficl/i386 +.if ${MACHINE_CPUARCH} == "amd64" +LIBFICL= ${.OBJDIR}/../../ficl32/libficl.a +.else LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif +.endif # Include bcache code. HAVE_BCACHE= yes Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Thu Apr 3 20:18:55 2014 (r264086) +++ head/sys/boot/i386/loader/Makefile Thu Apr 3 21:18:03 2014 (r264087) @@ -41,8 +41,12 @@ HAVE_ISABUS= yes # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 +.if ${MACHINE_CPUARCH} == "amd64" +LIBFICL= ${.OBJDIR}/../../ficl32/libficl.a +.else LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif +.endif .if defined(LOADER_BZIP2_SUPPORT) CFLAGS+= -DLOADER_BZIP2_SUPPORT