Re: another external compiler topic

From: <dt71_at_gmx.com>
Date: Wed, 05 Jun 2013 22:46:01 +0200
On 06/05/2013 21:31, Brooks Davis wrote:
> My first reaction is that your configuration is so far beyond anything
> that is actually documented as working you're going to be mostly on your
> own.

Why?

> First off I assume that since you posted to freebsd-current_at_ that you
> are running the latest head.

Yes:
> On Wed, Jun 05, 2013 at 08:53:14PM +0200, dt71_at_gmx.com wrote:
>> Installed system revision: 251046.
>> Checked out source tree revision: 251352.

> Setting CC, CPP, and CXX except in the environment isn't supported and
> can't work for cross build cases.  It looks like your avoiding those
> cases (but more on your wrapper script later), but this does put you in
> uncharted land.

Now compiling with CC, CPP and CXX only in the environment (and XCC, XCPP and XCXX in make.conf).

> I see that WITHOUT_KERBEROS is not set here.  Was it ever?  Migration
> from a WITHOUT_KERBEROS system to a WITH_KERBEROS system is known to be
> broken which might explain your breakage in the libkrb5 build.

Yes, WITHOUT_KERBEROS was set once in the past, but that was only so multiple re-buildworld and re-installworld iterations ago.

>> When building the system that is currently installed, the following "compiler" was used:
>> ======= /path/to/clang begins =======
>> #!/bin/sh
>> /path/to/real/clang "$_at_" || /path/to/real/clang --sysroot=/usr/obj/usr/src/tmp "$_at_"
>> ======= /path/to/clang ends =======
>
> This has got to corrupt your build.  I can't imagine anything staying
> working for long given that many translation units will compile with
> the system headers and then get linked to something compiled with the
> headers from the source tree.

I forgot to mention that after re-buildworld-ing and re-installworld-ing with the script, I redid the whole process again without the script (at which point the sysroot argument was not required anymore, until the next header update).

>> Also, the following patch was applied to the source tree:
>> ======= diff begins =======
>> Index: Makefile.inc1
>> ===================================================================
>> --- Makefile.inc1	(revision 251352)
>> +++ Makefile.inc1	(working copy)
>> _at__at_ -722,7 +722,7 _at__at_
>>    ITOOLS=	[ awk cap_mkdb cat chflags chmod chown \
>>    	date echo egrep find grep id install ${_install-info} \
>>    	ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
>> -	rm sed sh sysctl test true uname wc ${_zoneinfo}
>> +	rm sed sh sysctl test true uname wc ${_zoneinfo} btxld ls mv cp dd
>>
>>    #
>>    # distributeworld
>> Index: usr.bin/xlint/llib/Makefile
>> ===================================================================
>> --- usr.bin/xlint/llib/Makefile	(revision 251352)
>> +++ usr.bin/xlint/llib/Makefile	(working copy)
>> _at__at_ -9,9 +9,9 _at__at_
>>    CLEANFILES+= ${LIBS}
>>
>>    llib-lposix.ln: llib-lposix
>> -	${LINT} ${LINTFLAGS} -Cposix ${.ALLSRC}
>> +	CC=${CC:Q} ${LINT} ${LINTFLAGS} -Cposix ${.ALLSRC}
>>
>>    llib-lstdc.ln: llib-lstdc
>> -	${LINT} ${LINTFLAGS} -Cstdc ${.ALLSRC}
>> +	CC=${CC:Q} ${LINT} ${LINTFLAGS} -Cstdc ${.ALLSRC}
>>
>>    .include <bsd.prog.mk>
>> ======= diff ends =======
>
> What do these patches work around?

The 1st hunk works around an installkernel issue: in some cases (unknown, but seemingly related to header updates), installkernel seems to involve some compiling, "cp"ing, "btxld"ing, etc..

Without the 2nd hunk, the lint program would call "cc", which does not exist (ie., there is no /usr/bin/cc, but there is a ${CC}).
Received on Wed Jun 05 2013 - 18:46:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC