Date: Wed, 10 Apr 2013 19:56:43 +0400 From: Lev Serebryakov <lev@FreeBSD.org> To: Brooks Davis <brooks@FreeBSD.org> Cc: deeptech71 <deeptech71@gmail.com>, freebsd-hackers@FreeBSD.org Subject: Re: building world and kernel without ebuilding ("bootstrap"?) clang? Message-ID: <814732856.20130410195643@serebryakov.spb.ru> In-Reply-To: <20130410145004.GA66560@lor.one-eyed-alien.net> References: <5164815A.6040908@gmail.com> <1952710103.20130410180935@serebryakov.spb.ru> <20130410145004.GA66560@lor.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, Brooks. You wrote 10 =D0=B0=D0=BF=D1=80=D0=B5=D0=BB=D1=8F 2013 =D0=B3., 18:50:04: BD> The key is to pass the --sysroot option to the compiler. I've got a not BD> quite finished (mostly due to a complete lack of documentation) set of BD> patches to Makefile.inc1 to do this: BD> http://people.freebsd.org/~brooks/patches/xcc3.diff BD> If you set XCC=3D/path/to/clang XCXX=3D/path/to/clang++ XCPP=3Dclang-cp= p then BD> when building world and kernel you will use those compilers and not BD> build a cross compiler. In that mode you will still build and use a BD> cross binutils I've checked this patch right now, it works for me for "buildworld" and "buildkernel" but not for "installworld": mkdir -p /tmp/install.FxqSvHpP progs=3D$(for prog in [ awk cap_mkdb cat chflags chmod chown date echo egr= ep find grep id install ln lockf make mkdir mtree nmtree mv pwd_mkdb rm = sed sh sysctl test true uname wc zic tzsetup; do if progpath=3D`which $pro= g`; then echo $progpath; else echo "Required tool $prog not found in PAT= H." >&2; exit 1; fi; done); libs=3D$(ldd -f "%o %p\n" -f "%o %p\n" $pro= gs 2>/dev/null | sort -u | while read line; do $line; if [ "$2 $3" !=3D = "not found" ]; then echo $2; else echo "Required library $1 not found." = >&2; exit 1; fi; done); cp $libs $progs /tmp/install.FxqSvHpP cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.FxqSvHpP/locale cd /data/src; MAKEOBJDIRPREFIX=3D/data/obj.nano/gateway.v2 MACHINE_ARCH=3Da= md64 MACHINE=3Damd64 CPUTYPE=3D PATH=3D/data/obj.nano/gateway.v2/data/src/t= mp/legacy/usr/sbin:/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/bin:/d= ata/obj.nano/gateway.v2/data/src/tmp/legacy/usr/games:/data/obj.nano/gatewa= y.v2/data/src/tmp/legacy/bin:/data/obj.nano/gateway.v2/data/src/tmp/usr/sbi= n:/data/obj.nano/gateway.v2/data/src/tmp/usr/bin:/data/obj.nano/gateway.v2/= data/src/tmp/usr/games:/tmp/install.FxqSvHpP LD_LIBRARY_PATH=3D/tmp/instal= l.FxqSvHpP PATH_LOCALE=3D/tmp/install.FxqSvHpP/locale /data/obj.nano/gatew= ay.v2/data/src/make.amd64/make -f Makefile.inc1 __MAKE_SHELL=3D/tmp/inst= all.FxqSvHpP/sh reinstall; MAKEOBJDIRPREFIX=3D/data/obj.nano/gateway.v2 MA= CHINE_ARCH=3Damd64 MACHINE=3Damd64 CPUTYPE=3D PATH=3D/data/obj.nano/gateway= .v2/data/src/tmp/legacy/usr/sbin:/data/obj.nano/gateway.v2/data/src/tmp/leg= acy/usr/bin:/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/games:/data/o= bj.nano/gateway.v2/data/src/tmp/legacy/bin:/data/obj.nano/gateway.v2/data/s= rc/tmp/usr/sbin:/data/obj.nano/gateway.v2/data/src/tmp/usr/bin:/data/obj.na= no/gateway.v2/data/src/tmp/usr/games:/tmp/install.FxqSvHpP LD_LIBRARY_PATH= =3D/tmp/install.FxqSvHpP PATH_LOCALE=3D/tmp/install.FxqSvHpP/locale rm -rf= /tmp/install.FxqSvHpP cc: not found "/data/src/share/mk/bsd.compiler.mk", line 9: warning: "cc --version" retur= ned non-zero status "/data/src/share/mk/bsd.compiler.mk", line 17: Unable to determine compiler= type for cc. Consider setting COMPILER_TYPE. *** [installworld] Error code 1 1 error *** [installworld] Error code 2 1 error (sources is /data/src, OBJDIRPREFIX is /data/obj.nano/gateway.v2) --=20 // Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?814732856.20130410195643>