From owner-freebsd-amd64@FreeBSD.ORG Sat Feb 11 04:30:16 2012 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BDCD1065670 for ; Sat, 11 Feb 2012 04:30:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6618FC17 for ; Sat, 11 Feb 2012 04:30:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1B4UGZ7088052 for ; Sat, 11 Feb 2012 04:30:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1B4UGPe088047; Sat, 11 Feb 2012 04:30:16 GMT (envelope-from gnats) Date: Sat, 11 Feb 2012 04:30:16 GMT Message-Id: <201202110430.q1B4UGPe088047@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org From: Russell Cattelan Cc: Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Russell Cattelan List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2012 04:30:16 -0000 The following reply was made to PR amd64/163710; it has been noted by GNATS. From: Russell Cattelan To: bug-followup@FreeBSD.org, cattelan@thebarn.com Cc: Subject: Re: amd64/163710: setjump in userboot.so causes stack corruption Date: Fri, 10 Feb 2012 22:04:52 -0600 So here is a suggestion. So the default build does do the right thing. The problem is when doing userboot development the symlink from the loader build ends up including the wrong files. the userboot build of fill does not need a sym link so make sure the link does not exist when doing the build. This make sure the right header files are used for userboot builds=20 diff --git a/sys/boot/userboot/ficl/Makefile = b/sys/boot/userboot/ficl/Makefile index 829ae1e..6249eb2 100644 --- a/sys/boot/userboot/ficl/Makefile +++ b/sys/boot/userboot/ficl/Makefile @@ -61,6 +61,10 @@ softcore.c: ${SOFTWORDS} softcore.awk (cd ${.CURDIR}/../../ficl/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp=3D"`LC_ALL=3DC date`") > = ${.TARGET} =20 +beforedepend ${OBJS}: no-machine + +no-machine: + rm -f ${.CURDIR}/../../ficl/machine #.if ${MACHINE_CPUARCH} =3D=3D "amd64" #${SRCS:M*.c:R:S/$/.o/g}: machine #