From owner-freebsd-x11@FreeBSD.ORG Sat May 26 19:01:50 2012 Return-Path: Delivered-To: x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA830106564A; Sat, 26 May 2012 19:01:50 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5D7D68FC15; Sat, 26 May 2012 19:01:50 +0000 (UTC) Received: by yhgm50 with SMTP id m50so1417003yhg.13 for ; Sat, 26 May 2012 12:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MFX8Oy6MIOxo2W2Kf/I24gNed6efCVtRTVU443CvTkg=; b=TXG2jFVpkgbfamncBi+OeGxD/1U1klN6j7gG5CB+B3J23dps6zln/bExedzYochPCM krPfvjEZwDq9LAF3AP8P++/hddt8uAn1iZd5uHqZcX2+DebjWPQoM+QkoOUQ6KxnVgDi 3YFC6sXU3rtIjdC+GXhQWZmpaNhEFPtWPT21vrTjb+vINdCW0oLG7rC767H60jzoRGg4 rZaYiMVfJoxQ+pAAx2qF0igL2TQvH80H86dRTMp2kdEmX1k2OJWlfKqAV0iDVavtbXOH 82dglKi0zp7pASc4rDCl+6o4LMrZ67fhEnnhEiuI+yfIRffd/WZkF1T57w6ZkD5V60Ix UUkw== MIME-Version: 1.0 Received: by 10.236.75.232 with SMTP id z68mr3034311yhd.6.1338058909684; Sat, 26 May 2012 12:01:49 -0700 (PDT) Received: by 10.236.44.73 with HTTP; Sat, 26 May 2012 12:01:49 -0700 (PDT) In-Reply-To: References: <4FC1082A.9090801@acsalaska.net> <4FC112A1.7080600@acsalaska.net> Date: Sat, 26 May 2012 21:01:49 +0200 Message-ID: From: Oliver Pinter To: Mel Flynn Content-Type: text/plain; charset=ISO-8859-1 Cc: ports@freebsd.org, x11@freebsd.org Subject: Re: libX11 and clang: compile error X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2012 19:01:50 -0000 On 5/26/12, Oliver Pinter wrote: > On 5/26/12, Mel Flynn 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 > 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