Hello, Brooks. You wrote 10 апреля 2013 г., 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=/path/to/clang XCXX=/path/to/clang++ XCPP=clang-cpp 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=$(for prog in [ awk cap_mkdb cat chflags chmod chown date echo egrep 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=`which $prog`; then echo $progpath; else echo "Required tool $prog not found in PATH." >&2; exit 1; fi; done); libs=$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort -u | while read line; do $line; if [ "$2 $3" != "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=/data/obj.nano/gateway.v2 MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= PATH=/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/sbin:/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/bin:/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/games:/data/obj.nano/gateway.v2/data/src/tmp/legacy/bin:/data/obj.nano/gateway.v2/data/src/tmp/usr/sbin:/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=/tmp/install.FxqSvHpP PATH_LOCALE=/tmp/install.FxqSvHpP/locale /data/obj.nano/gateway.v2/data/src/make.amd64/make -f Makefile.inc1 __MAKE_SHELL=/tmp/install.FxqSvHpP/sh reinstall; MAKEOBJDIRPREFIX=/data/obj.nano/gateway.v2 MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= PATH=/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/sbin:/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/bin:/data/obj.nano/gateway.v2/data/src/tmp/legacy/usr/games:/data/obj.nano/gateway.v2/data/src/tmp/legacy/bin:/data/obj.nano/gateway.v2/data/src/tmp/usr/sbin:/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=/tmp/install.FxqSvHpP PATH_LOCALE=/tmp/install.FxqSvHpP/locale rm -rf /tmp/install.FxqSvHpP cc: not found "/data/src/share/mk/bsd.compiler.mk", line 9: warning: "cc --version" returned 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) -- // Black Lion AKA Lev Serebryakov <l...@freebsd.org> _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"