Date: Sat, 26 May 2012 21:01:49 +0200 From: Oliver Pinter <oliver.pntr@gmail.com> To: Mel Flynn <rflynn@acsalaska.net> Cc: ports@freebsd.org, x11@freebsd.org Subject: Re: libX11 and clang: compile error Message-ID: <CAPjTQNGs-u-LFcV0bRpCtZ2kmiQ3SzHYj2vm8UUiU0kWUwZTEw@mail.gmail.com> In-Reply-To: <CAPjTQNEvV_%2BVT2iE_1EHDdR_nciMc1yWLFGnDKyqd6nu-wek2Q@mail.gmail.com> References: <CAPjTQNHCHCPNm=6%2BinkDmbnj4%2BW1kdcXkwFxS8LURj3kqWPDmg@mail.gmail.com> <4FC1082A.9090801@acsalaska.net> <CAPjTQNG-8mosRuun-u%2BWHVVAu_VydDhdLekrQ8hOEQ%2BPML-3Zg@mail.gmail.com> <4FC112A1.7080600@acsalaska.net> <CAPjTQNEvV_%2BVT2iE_1EHDdR_nciMc1yWLFGnDKyqd6nu-wek2Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/26/12, Oliver Pinter <oliver.pntr@gmail.com> wrote: > On 5/26/12, Mel Flynn <rflynn@acsalaska.net> wrote: >> On 26-5-2012 19:17, Oliver Pinter wrote: >>> I think src.conf is relevant, while it changes the system behavior, as >>> changed the default cc from gcc-4.2 to clang. >> >> Thinking it doesn't make it so. Run: >> grep _WITHOUT_SRCCONF /usr/share/mk/*.mk >> >> Then investigate. >> Setting CC in /etc/src.conf has *no effect on CC passed to the ports*. >> Really. It does not. >> The file that can do that is /etc/make.conf. >> Another way is setting CC in your environment variables, through >> /etc/login.conf, /etc/yourshellrc ~/.profile ~/.[cz]?shrc and what not. >> >> In order to debug your issue, you should provide the output of what make >> thinks CC and CPP are and backtrack where they are set. >> Start with: >> make -C /usr/ports/x11/libX11 -V CC -V CPP >> -- >> Mel >> > > After setting WITH_CLANG_IS_CC in src.conf the base system cc,cpp and > c++ has changed: > > op@opn ~> cc --version > FreeBSD clang version 3.1 (branches/release_31 155985) 20120503 > Target: x86_64-unknown-freebsd9.0 > Thread model: posix > op@opn ~> cpp --version > FreeBSD clang version 3.1 (branches/release_31 155985) 20120503 > Target: x86_64-unknown-freebsd9.0 > Thread model: posix > op@opn ~> c++ --version > FreeBSD clang version 3.1 (branches/release_31 155985) 20120503 > Target: x86_64-unknown-freebsd9.0 > Thread model: posix > > This is the new behavior after this patch: > > commit 61fe77c5c9eb33f033bd89d869b05ce6dcd5fd5f > Author: dim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f> > Date: Sat Mar 17 22:29:05 2012 +0000 > > MFC 232322: > Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, > that > installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp. > > Note this does *not* disable building and installing gcc, which will > still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp. > If > you want to disable gcc completely, you must use WITHOUT_GCC. > > MFC 232323: > Regenerate src.conf(5) after r232322. > MFC 232323: > Regenerate src.conf(5) after r232322. > > MFC 232477: > In r232322, I forgot one case where a check for MK_CLANG_IS_CC was > needed, in sys/conf/kern.pre.mk. Add it now. > > MFC 232522: > Fix a thinko in r232322, where gcc (and its tools) are not built > during > the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set. > > This causes no 'cc' to be installed in the temporary cross-tools > tree, > making lint fall over later in the build, because it ignores ${CC} > and > attempts to run 'cc' anyway. > > To fix this, only skip building gcc during cross-tools, if > WITHOUT_GCC > is set, or if WITH_CLANG_IS_CC is set. > > Pointy hat to: dim > > git-svn-id: svn://svn.freebsd.org/base/stable/9@233099 > ccf9f872-aa2e-dd11-9f > op@opn ~> less /tmp/failed-configure-test Does cpp preserve "whitespace"? _ACEOF if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." "$LINENO" 5 fi fi rm -f conftest.$ac_ext and the bad news, this failed in xorg-server too and in most xorg related ports
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPjTQNGs-u-LFcV0bRpCtZ2kmiQ3SzHYj2vm8UUiU0kWUwZTEw>