Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Mar 2012 22:46:43 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        "O. Hartmann" <ohartman@zedat.fu-berlin.de>
Cc:        Pegasus Mc Cleaft <ken@mthelicon.com>, freebsd-current@freebsd.org
Subject:   Re: CLANG buildworld failure: lint: cannot exec /usr/obj/usr/src/tmp/usr/bin/cc: No such file or directory
Message-ID:  <4F53E2C3.7090102@FreeBSD.org>
In-Reply-To: <4F53D1D3.2010607@zedat.fu-berlin.de>
References:  <4F536D41.1030302@zedat.fu-berlin.de> <201203041628.q24GS12l088270@pozo.com> <201203041751.02531.ken@mthelicon.com> <4F53D1D3.2010607@zedat.fu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-03-04 21:34, O. Hartmann wrote:
...
> Where are those new "WITH_CLANG_XXXX" tags documented?

In src.conf(5), where all the WITH_ and WITHOUT_ settings are
documented.

I should probably have sent a heads up to this list, to announce this
new setting, which installs clang as /usr/bin/cc, /usr/bin/c++ and
/usr/bin/cpp, effectively making it the "default compiler".

That said, I made a mistake in r232322, which introduced the setting,
causing gcc not to be built at all if you had all default settings,
except CC=clang, CXX=clang++ and CPP=clang-cpp.

This caused no 'cc', 'c++' and 'cpp' executables to be installed under
the temporary object tree.  It should theoretically work, but some tools
like lint still have 'cc' hardcoded, and thus they fail.

I have worked around this in r232522.  Please update to that revision,
and try again.


> In my case things developed even worse. After the last "make update" in
> /usr/src (SVN based), I can't even build a kernel (make buildworld fails
> very early):
> 
> ===> games/fortune/strfile (obj,depend,all,install)
> /usr/obj/usr/src/tmp/usr/src/games/fortune/strfile created for
> /usr/src/games/fortune/strfile
> rm -f .depend
> CC='clang' mkdep -f .depend -a
> -I/usr/obj/usr/src/tmp/legacy/usr/include -std=gnu99
> /usr/src/games/fortune/strfile/strfile.c
> echo strfile: /usr/lib/libc.a
> /usr/obj/usr/src/tmp/legacy/usr/lib/libegacy.a >> .depend
> clang -O2 -pipe -O2 -fno-strict-aliasing -pipe -std=gnu99
> -I/usr/obj/usr/src/tmp/legacy/usr/include -c
> /usr/src/games/fortune/strfile/strfile.c
> clang -O2 -pipe -O2 -fno-strict-aliasing -pipe -std=gnu99
> -I/usr/obj/usr/src/tmp/legacy/usr/include  -static
> -L/usr/obj/usr/src/tmp/legacy/usr/lib -o strfile strfile.o -legacy
> clang: warning: argument unused during compilation: '-std=gnu99'
> strfile.o: In function `main':
> /usr/src/games/fortune/strfile/strfile.c:(.text+0x2e0): undefined
> reference to `_ThreadRuneLocale'

This is unrelated to the 'cc' problem, but I suggest deleting /usr/obj/*
and starting the build from scratch.




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