From owner-freebsd-stable@FreeBSD.ORG Mon Jan 6 19:38:47 2014 Return-Path: Delivered-To: freebsd-stable@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 64CEDAD4 for ; Mon, 6 Jan 2014 19:38:47 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 257D91380 for ; Mon, 6 Jan 2014 19:38:46 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1W0G0W-000Kjd-Io; Mon, 06 Jan 2014 19:38:40 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s06Jcabk027828; Mon, 6 Jan 2014 12:38:37 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+g+IdKR/f2gFfzxhOf0pKe Subject: Re: Cross-compilation (i386 under amd64) is broken From: Ian Lepore To: Eugene Grosbein In-Reply-To: <52CAEFE3.9020106@grosbein.net> References: <52CA6052.6090009@grosbein.net> <52CAEFE3.9020106@grosbein.net> Content-Type: text/plain; charset="us-ascii" Date: Mon, 06 Jan 2014 12:38:36 -0700 Message-ID: <1389037116.1158.335.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: FreeBSD Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jan 2014 19:38:47 -0000 On Tue, 2014-01-07 at 01:03 +0700, Eugene Grosbein wrote: > On 06.01.2014 14:50, Eugene Grosbein wrote: > > Hi! > > > > For long time I was building NanoBSD for i386 using amd64 box with success, > > just adding NANO_ARCH=i386, TARGET=i386 and TARGET_ARCH=i386 to CONF_BUILD flags > > used to create custom make.conf. > > > > But for recent 9.2-STABLE that seems to be broken: > > > > -------------------------------------------------------------- > >>>> stage 3.1: making dependencies > > -------------------------------------------------------------- > > cd /usr/obj/nanobsd.gw//i386.i386/usr/local/src/sys/GW; MAKEOBJDIRPREFIX=/usr/obj/nanobsd.gw//i386.i386 MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE= _SHLIBDIRPREFIX=/usr/obj/nanobsd.gw//i386.i > > 386/usr/local/src/tmp _LDSCRIPTROOT= VERSION="FreeBSD 9.2-STABLE amd64 902504" INSTALL="sh /usr/local/src/tools/install.sh" PATH=/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/legacy/us > > r/sbin:/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/legacy/usr/bin:/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/legacy/usr/games:/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/legac > > y/bin:/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/usr/sbin:/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/usr/bin:/usr/obj/nanobsd.gw//i386.i386/usr/local/src/tmp/usr/games:/sbin:/bin: > > /usr/sbin:/usr/bin COMPILER_TYPE=gcc /usr/obj/nanobsd.gw//usr/local/src/make.amd64/make -j 3 __MAKE_CONF=/usr/obj/nanobsd.gw//make.conf.build KERNCONFDIR=/home/nanobsd/gw KERNCONF=GW -m /usr > > /local/src/share/mk TARGET=i386 TARGET_ARCH=i386 KERNEL=kernel depend -DNO_MODULES_OBJ > > machine -> /usr/local/src/sys/i386/include > > x86 -> /usr/local/src/sys/x86/include > > awk -f /usr/local/src/sys/tools/vnode_if.awk /usr/local/src/sys/kern/vnode_if.src -p > > awk -f /usr/local/src/sys/tools/vnode_if.awk /usr/local/src/sys/kern/vnode_if.src -q > > cc -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/usr/local/src/sys -I/usr/local/src/sys/contrib/altq -I/usr/local/src/sys/contrib/ipfilter -I/usr/local/src/sys/contrib/pf -I/usr/local/src/sys/dev/ath -I/usr/local/src/sys/dev/ath/ath_hal -I/usr/local/src/sys/contrib/ngatm -I/usr/local/src/sys/dev/twa -I/usr/local/src/sys/gnu/fs/xfs/FreeBSD -I/usr/local/src/sys/gnu/fs/xfs/FreeBSD/support -I/usr/local/src/sys/gnu/fs/xfs -I/usr/local/src/sys/dev/cxgb -I/usr/local/src/sys/dev/cxgbe -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -c /usr/local/src/sys/i386/linux/! li! > nu! > > x_genassym > > .c > > awk -f /usr/local/src/sys/tools/miidevs2h.awk /usr/local/src/sys/dev/mii/miidevs > > awk -f /usr/local/src/sys/tools/pccarddevs2h.awk /usr/local/src/sys/dev/pccard/pccarddevs > > /usr/local/src/sys/i386/linux/linux_genassym.c:1: error: -mpreferred-stack-boundary=2 is not between 4 and 12 > > *** [linux_genassym.o] Error code 1 > > 1 error > > *** [buildkernel] Error code 2 > > 1 error > > *** [buildkernel] Error code 2 > > 1 error > > > > It seems, gcc now thinks it builds code for amd64, insisting on long word stack alignment. > > > > Please help to unbreak this. > > It seems, make buildkernel fails in this case if obj directory does not contain > results of make buildworld. The problem is solved running make buildworld > before buildkernel. Sorry for noise. > > Eugene Grosbein If you don't ultimately need the results of the buildworld (like you're just test-building kernels), you can save some time by making kernel-toolchain rather than buildworld. -- Ian