Date: Sun, 1 Sep 2013 19:01:29 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: Adrian Chadd <adrian@freebsd.org> Cc: freebsd-current <freebsd-current@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: how do i cross build world/kernel with clang? Message-ID: <20130902020129.GD36239@funkthat.com> In-Reply-To: <CAJ-Vmom3cLdEei%2BjwNRx7n_MgU0H3X0LigagNzU567tyeHBd8Q@mail.gmail.com> References: <CAJ-Vmom3cLdEei%2BjwNRx7n_MgU0H3X0LigagNzU567tyeHBd8Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Adrian Chadd wrote this message on Sat, Aug 31, 2013 at 19:30 -0700: > How do i cross-build a mips world/kernel with clang? > > ie, how do I tell the build system to build a mips targetted clang instead > of gcc and use that to build everything? I finally figured out why my advice didn't work for you the other day.. It's because if you specify WITH_CLANG_IS_CC=YES, it doesn't imply WITH_CLANG=YES... and clang is turned off by default for mips... # make TARGET_ARCH=mips -j 8 WITH_CLANG_IS_CC=YES WITH_CLANG=YES toolchain [...] # make buildenv TARGET_ARCH=mips WITH_CLANG_IS_CC=YES Entering world for mips:mips # cc --version FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: mips-unknown-freebsd10.0 Thread model: posix The WITH_CLANG_IS_CC=YES is probably unnecessary on the buildenv command... Though the toolchain build failed, as apparently there are issues w/ clang, mips and libc: --- libc.so.7 --- /usr/obj/mips.mips/usr/src/tmp/usr/bin/ld: /usr/obj/mips.mips/usr/src/tmp/usr/li b/crtbeginS.o: warning: linking PIC files with non-PIC files /usr/obj/mips.mips/usr/src/tmp/usr/bin/ld: /usr/obj/mips.mips/usr/src/tmp/usr/li b/crtn.o: warning: linking PIC files with non-PIC files exect.So: In function `exect': (.text+0x18): relocation truncated to fit: R_MIPS_PC16 against `__cerror' [...] -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130902020129.GD36239>