From owner-svn-src-head@freebsd.org Tue Oct 25 17:31:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E2A7C21B17; Tue, 25 Oct 2016 17:31:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1794C9AA; Tue, 25 Oct 2016 17:31:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PHVwrA084253; Tue, 25 Oct 2016 17:31:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9PHVvjj084243; Tue, 25 Oct 2016 17:31:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201610251731.u9PHVvjj084243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 25 Oct 2016 17:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307942 - in head/sys/boot: common efi/libefi ficl ficl32 i386/libi386 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 17:31:59 -0000 Author: imp Date: Tue Oct 25 17:31:57 2016 New Revision: 307942 URL: https://svnweb.freebsd.org/changeset/base/307942 Log: Really make WITHOUT_FORTH (MK_FORTH==no) work. The recent inclusion of FICL definitions not in ficl/ficl32 files broke this generally. This makes that stuff conditional on BOOT_FORTH. Also, move definitions related to the architecture (FICL_CPUARCH and friends) into Makefile.ficl that all parts of the tree that include files with ficl need to include (but only if MK_FORTH == yes). In addition, had to fix library ordering issue with LIBSTAND to keep it last. Without boot forth, there's no references to memset to bring in memset.o from libstand.a to satisfy libgeliboot.a's use of it. Listing libstand last solves this issue (and it's the proper place for libstand to boot). Modified: head/sys/boot/common/Makefile.inc head/sys/boot/common/pnp.c head/sys/boot/efi/libefi/Makefile head/sys/boot/ficl/Makefile head/sys/boot/ficl32/Makefile head/sys/boot/i386/libi386/biospci.c head/sys/boot/i386/loader/Makefile Modified: head/sys/boot/common/Makefile.inc ============================================================================== --- head/sys/boot/common/Makefile.inc Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/common/Makefile.inc Tue Oct 25 17:31:57 2016 (r307942) @@ -60,6 +60,7 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c +.include "${SRCTOP}/sys/boot/Makefile.ficl" .endif .if defined(BOOT_PROMPT_123) Modified: head/sys/boot/common/pnp.c ============================================================================== --- head/sys/boot/common/pnp.c Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/common/pnp.c Tue Oct 25 17:31:57 2016 (r307942) @@ -17,7 +17,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef BOOT_FORTH #include "ficl.h" +#endif static struct pnpinfo_stql pnp_devices; static int pnp_devices_initted = 0; @@ -186,6 +188,7 @@ pnp_eisaformat(u_int8_t *data) return(idbuf); } +#ifdef BOOT_FORTH void ficlPnpdevices(FICL_VM *pVM) { @@ -230,3 +233,4 @@ static void ficlCompilePnp(FICL_SYSTEM * } FICL_COMPILE_SET(ficlCompilePnp); +#endif Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/efi/libefi/Makefile Tue Oct 25 17:31:57 2016 (r307942) @@ -2,6 +2,10 @@ .include +.if ${MK_FORTH} != "no" +.include "${.CURDIR}/../../Makefile.ficl" +.endif + LIB= efi INTERNALLIB= WARNS?= 2 @@ -16,8 +20,6 @@ SRCS+= time_event.c .endif .if ${MK_FORTH} != "no" SRCS+= env.c -CFLAGS+= -I${.CURDIR}/../../ficl -CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH} .endif # We implement a slightly non-standard %S in that it always takes a Modified: head/sys/boot/ficl/Makefile ============================================================================== --- head/sys/boot/ficl/Makefile Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/ficl/Makefile Tue Oct 25 17:31:57 2016 (r307942) @@ -1,15 +1,8 @@ # $FreeBSD$ # -FICLDIR?= ${.CURDIR} +.include "${.CURDIR}/../Makefile.ficl" -.if defined(FICL32) -.PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} -.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" -.PATH: ${FICLDIR}/mips64 -.else -.PATH: ${FICLDIR}/${MACHINE_CPUARCH} -.endif BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ prefix.c search.c stack.c tools.c vm.c words.c @@ -41,42 +34,6 @@ SOFTWORDS= softcore.fr jhlocal.fr marker # Optional OO extension softwords #SOFTWORDS+= oo.fr classes.fr -.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 - -.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) -FICL_CPUARCH= i386 -.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" -FICL_CPUARCH= mips64 -.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" && defined(FICL32) -.if !exists(machine) -${SRCS:M*.c:R:S/$/.o/g}: machine - -beforedepend ${OBJS}: machine -.endif - -machine: .NOMETA - ln -sf ${.CURDIR}/../../i386/include machine - -CLEANFILES+= machine -.endif Modified: head/sys/boot/ficl32/Makefile ============================================================================== --- head/sys/boot/ficl32/Makefile Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/ficl32/Makefile Tue Oct 25 17:31:57 2016 (r307942) @@ -1,8 +1,5 @@ # $FreeBSD$ FICL32= -FICLDIR= ${.CURDIR}/../ficl -.PATH: ${FICLDIR} - -.include "${FICLDIR}/Makefile" +.include "${.CURDIR}/../ficl/Makefile" Modified: head/sys/boot/i386/libi386/biospci.c ============================================================================== --- head/sys/boot/i386/libi386/biospci.c Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/i386/libi386/biospci.c Tue Oct 25 17:31:57 2016 (r307942) @@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include #include "libi386.h" +#ifdef BOOT_FORTH #include "ficl.h" +#endif /* * Stupid PCI BIOS interface doesn't let you simply enumerate everything @@ -429,6 +431,7 @@ biospci_count_device_type(uint32_t devid return i; } +#ifdef BOOT_FORTH /* * pcibios-device-count (devid -- count) * @@ -582,3 +585,4 @@ static void ficlCompilePciBios(FICL_SYST } FICL_COMPILE_SET(ficlCompilePciBios); +#endif Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Tue Oct 25 17:16:58 2016 (r307941) +++ head/sys/boot/i386/loader/Makefile Tue Oct 25 17:31:57 2016 (r307942) @@ -123,8 +123,8 @@ FILES+= loader.rc menu.rc # XXX crt0.o needs to be first for pxeboot(8) to work OBJS= ${BTXCRT} -DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} ${LIBGELIBOOT} -LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} ${LIBGELIBOOT} +DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSTAND} +LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBGELIBOOT} ${LIBSTAND} .include