Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2010 21:02:25 -0300
From:      Renato Botelho <rbgarga@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        perl@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: Clang now builds world and kernel, on i386 and amd64
Message-ID:  <AANLkTikm0FrJbOTiRPQhcqM30N-GyOYRBk_8jR-Gq9jF@mail.gmail.com>
In-Reply-To: <AANLkTimYj1VnVQBLROE94rqPYO7pQyHWfpjiYYZ2ORrX@mail.gmail.com>
References:  <4C99A53E.7060707@FreeBSD.org> <AANLkTimYj1VnVQBLROE94rqPYO7pQyHWfpjiYYZ2ORrX@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 28, 2010 at 6:07 PM, Renato Botelho <rbgarga@gmail.com> wrote:
> On Wed, Sep 22, 2010 at 3:42 AM, Dimitry Andric <dim@freebsd.org> wrote:
>> Hi,
>>
>> As of r212979, you should now be able to build world and kernel on i386
>> and amd64 with clang, without any additional patches!
>>
>> To do so, make sure you have updated your installed world to at least
>> r212904 (which has the most recently imported clang/llvm snapshot), and
>> put the following in /etc/src.conf:
>>
>> .if !defined(CC) || ${CC} =3D=3D "cc"
>> CC=3Dclang
>> .endif
>> .if !defined(CXX) || ${CXX} =3D=3D "c++"
>> CXX=3Dclang++
>> .endif
>> # Don't die on warnings
>> NO_WERROR=3D
>> WERROR=3D
>>
>> Both world and kernel can also be installed, and should run properly,
>> but please make sure you have a way to revert if anything unexpected
>> happens. :) =A0Alternatively, just install into a chroot to try it out
>> from there.
>>
>> Some additional information can be found on this wiki page:
>>
>> http://wiki.freebsd.org/BuildingFreeBSDWithClang
>>
>> Thanks to all the people that made this possible, especially Roman
>> Divacky, Ed Schouten, Rui Paulo, and of course the clang/llvm
>> developers.
>
> I built my desktop world + kernel with clang, rev. 213247 amd64, it
> booted perfectly, the only problem i got was something went wrong
> with a perl module File::Temp.
>
> To be sure it's related i'm rebuilding the src (same rev.) with gcc and
> will take a look if it will back to work. I'll send an email after testin=
g.
>
> Just to show, the problem i got with perl was using this code:
>
> #!/usr/bin/perl
>
> use File::Temp;
>
> my ( $fh, $filename ) =3D File::Temp::tempfile();
> print "$filename\n";
> unlink $filename;
>
> with this results:
>
> Error in tempfile() using /tmp/XXXXXXXXXX: Tried to get a new temp
> name different to the previous value 50 times.
> Something wrong with template?? (/tmp/XXXXXXXXXX) at testes/tmp.pl line 5

After rebuild world+kernel with gcc and reboot everything
back to normal:

garga@botelhor:~> perl testes/tmp.pl
/tmp/MfmvMiztew
garga@botelhor:~> perl testes/tmp.pl
/tmp/M4xIxsTxlc

I'm using perl-5.12.2_2

--=20
Renato Botelho



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikm0FrJbOTiRPQhcqM30N-GyOYRBk_8jR-Gq9jF>