Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Jan 2014 12:38:36 -0700
From:      Ian Lepore <ian@FreeBSD.org>
To:        Eugene Grosbein <eugen@grosbein.net>
Cc:        FreeBSD Stable <freebsd-stable@FreeBSD.org>
Subject:   Re: Cross-compilation (i386 under amd64) is broken
Message-ID:  <1389037116.1158.335.camel@revolution.hippie.lan>
In-Reply-To: <52CAEFE3.9020106@grosbein.net>
References:  <52CA6052.6090009@grosbein.net>  <52CAEFE3.9020106@grosbein.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1389037116.1158.335.camel>