Re: freebsd-current Digest, Vol 465, Issue 5

From: <wsakir_at_columbus.rr.com>
Date: Fri, 14 Sep 2012 21:55:41 -0400
Help

----- Reply message -----
From: freebsd-current-request_at_freebsd.org
To: <freebsd-current_at_freebsd.org>
Subject: freebsd-current Digest, Vol 465, Issue 5
Date: Thu, Sep 13, 2012 8:00 am


Send freebsd-current mailing list submissions to
	freebsd-current_at_freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.freebsd.org/mailman/listinfo/freebsd-current
or, via email, send a message with subject or body 'help' to
	freebsd-current-request_at_freebsd.org

You can reach the person managing the list at
	freebsd-current-owner_at_freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-current digest..."


Today's Topics:

   1. Re: Clang as default compiler November 4th (David Chisnall)
   2. Re: Building world with clang ToT (Dimitry Andric)
   3. Re: Clang as default compiler November 4th (Lars Engels)
   4. Re: Clang as default compiler November 4th (Mark Linimon)
   5. Re: Clang as default compiler November 4th (Lev Serebryakov)
   6. Re: Building world with clang ToT (Edward Meewis)
   7. recently updated -current fatal trap at boot (Kim Culhan)
   8. Re: recently updated -current fatal trap at boot (Michael Butler)
   9. Re: recently updated -current fatal trap at boot (David Wolfskill)
  10. Re: Building world with clang ToT (Dimitry Andric)
  11. Re: Building world with clang ToT (Brooks Davis)
  12. Re: recently updated -current fatal trap at boot (Kim Culhan)
  13. Re: Raspberry PI gets USB support [FreeBSD 10 current]
      (Hans Petter Selasky)
  14. Re: Clang as default compiler November 4th (Doug Barton)
  15. Re: Clang as default compiler November 4th (Doug Barton)
  16. Re: Clang as default compiler November 4th (Nathan Whitehorn)
  17. Re: Clang as default compiler November 4th (Gerald Pfeifer)
  18. Re: Clang as default compiler November 4th (Steve Kargl)
  19. Re: Clang as default compiler November 4th (Jan Beich)
  20. Re: Clang as default compiler November 4th (Pietro Cerutti)
  21. Re: Clang as default compiler November 4th (Mark Linimon)
  22. Re: Building world with clang ToT (Edward Meewis)
  23. Re: Building world with clang ToT (Dimitry Andric)


----------------------------------------------------------------------

Message: 1
Date: Wed, 12 Sep 2012 12:49:44 +0100
From: David Chisnall <theraven_at_theravensnest.org>
Subject: Re: Clang as default compiler November 4th
To: Doug Barton <dougb_at_dougbarton.us>
Cc: toolchain_at_freebsd.org, Roman Divacky <rdivacky_at_freebsd.org>,
	Dimitry Andric <dim_at_freebsd.org>, current_at_freebsd.org,	Steve Kargl
	<sgk_at_troutmask.apl.washington.edu>
Message-ID: <7778270C-218B-4F23-9941-D6DBED8E054D_at_theravensnest.org>
Content-Type: text/plain; charset=iso-8859-1

On 12 Sep 2012, at 10:09, Doug Barton wrote:

> Also, users who actually are helping with testing clang for ports
> continue to report runtime problems, even with things that build fine.

I hope that you are encouraging maintainers of ports that don't work as expected with clang to submit bug reports upstream.  We can't fix bugs if we aren't made aware of them.

David
Current hat: LLVM / Clang developer.

------------------------------

Message: 2
Date: Wed, 12 Sep 2012 14:15:34 +0200
From: Dimitry Andric <dim_at_FreeBSD.org>
Subject: Re: Building world with clang ToT
To: Edward Meewis <ed_at_extraordinarymachine.nl>
Cc: freebsd-current_at_freebsd.org
Message-ID: <50507CE6.6060803_at_FreeBSD.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2012-09-12 13:45, Edward Meewis wrote:
....
> I added the following lines to each individual Makefile it stumbled on:
>
> CFLAGS+= -I/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/include
>
> LDADD+=-L/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/lib
> or:
> LDFLAGS+=-L/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/lib
>
> I hope to find a better place to set those, but it will do for now.

Normally this should never be done, but it could work in theory.


....
>> There must be a certain setting on your system which causes this. Most
>> likely, it is again using your existing system headers, instead of those
>> in /usr/obj.
>
> I suppose so, but where?
....
> /etc/make.conf:
> ----------------------
> #
> # Clang
> #
> USE_CLANG?=no
> #
> .if ${USE_CLANG} == "yes"
> .if !defined(CC) || ${CC} == "cc"
> CC=/usr/local/bin/clang

Don't use absolute paths here, it will not work for buildworld.  This
has been discussed recently in another thread.  (Not an issue with
clang or gcc, but with the way buildworld bootstraps its compiler in
general.)


....
> /etc/src.conf
> ------------------
> # src.conf - Source build options
>
> #WITHOUT_TOOLCHAINS="yes"
>
> WITHOUT_ATM="yes"
> WITHOUT_BLUETOOTH="yes"
> WITHOUT_BSNMP="yes"
> WITHOUT_CDDL="yes"
> WITHOUT_CLANG="yes"
> WITHOUT_CTM="yes"
> WITHOUT_CVS="yes"
> WITHOUT_GCC="yes"

I don't think buildworld can ever work correctly, if you have both
WITHOUT_CLANG and WITHOUT_GCC defined, at least not with how it is
currently implemented.

At least, certainly not for a -CURRENT build on -STABLE, that is.  If
you'd build this on a fully installed -CURRENT box, it might complete,
but again, no guarantees.

Try building with gcc, while removing the WITHOUT_GCC line, or building
with clang, while removing the WITHOUT_CLANG line.


------------------------------

Message: 3
Date: Wed, 12 Sep 2012 15:03:43 +0200
From: Lars Engels <lars.engels_at_0x20.net>
Subject: Re: Clang as default compiler November 4th
To: Mark Linimon <linimon_at_lonesome.com>
Cc: toolchain_at_FreeBSD.org, Doug Barton <dougb_at_FreeBSD.org>,
	current_at_FreeBSD.org,	Brooks Davis <brooks_at_FreeBSD.org>,
	freebsd-ports_at_FreeBSD.org
Message-ID: <20120912130343.GL20762_at_e-new.0x20.net>
Content-Type: text/plain; charset="utf-8"

On Wed, Sep 12, 2012 at 04:15:20AM -0500, Mark Linimon wrote:
> On Tue, Sep 11, 2012 at 11:27:50AM +0200, Lars Engels wrote:
> > At the moment the ports maintainers don't give much about if their ports
> > build with CLANG or not because they're not forced to.
> 
> I think this is a mis-representation.
> 
> Adding the requirement "your ports must work on clang" is adding an
> ex-post-facto requirement.  This creates the following matrix of what
> we are implicitly asking maintainers to do:
> 
> (FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base clang)
> 
> It is completely insane to expect anyone to be able to test in all of those
> environments, or even a tiny subset of them.  This isn't what most people
> sign up for when they sign up to maintain ports.

No, I didn't mean it that way. I only meant that the people /
maintainers running CURRENT will actually see that their ports don't
work and if they want to keep on using them on CURRENT they need to fix
them. e.g. two of the ports I maintain don't build with CLANG, yet. I
just checked that on the wiki page [1].
I had to look that up manually, but would have experienced that if I my
CURRENT box was building with CLANG by default. :)

It's clear that we cannot expect our maintainers to check all possible
combinations of FreeBSD, architecture and compiler.

> 
> > Those who don't run CURRENT won't notice, but those who do will have to
> > get their butts up and fix the ports
> 
> I think it's foolish to assume that maintainres don't have their butts in
> gear as it is.  Please note, we have nearly 1300 PRs, hundreds of ports with
> build errors and/or PRs, and hundreds that fail on -current only.  I try to
> advertise all these things the best I know how.  Adding the hundreds that
> fail on -clang only and then blaming the maintainers is simply going to be
> counter-productive.



[1] http://wiki.freebsd.org/PortsAndClang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120912/a789d5a1/attachment-0001.pgp

------------------------------

Message: 4
Date: Wed, 12 Sep 2012 09:56:26 -0500
From: Mark Linimon <linimon_at_lonesome.com>
Subject: Re: Clang as default compiler November 4th
To: Lars Engels <lars.engels_at_0x20.net>
Cc: toolchain_at_FreeBSD.org, Doug Barton <dougb_at_FreeBSD.org>,
	current_at_FreeBSD.org,	Brooks Davis <brooks_at_FreeBSD.org>,
	freebsd-ports_at_FreeBSD.org
Message-ID: <20120912145626.GA15977_at_lonesome.com>
Content-Type: text/plain; charset=us-ascii

On Wed, Sep 12, 2012 at 03:03:43PM +0200, Lars Engels wrote:
> two of the ports I maintain don't build with CLANG, yet. I
> just checked that on the wiki page [1].

To repeat myself, the ports I've listed on that page are the "big
problems".  People need to look at the errorlogs URLs up at the
top to see the complete list.

mcl


------------------------------

Message: 5
Date: Wed, 12 Sep 2012 19:19:07 +0400
From: Lev Serebryakov <lev_at_FreeBSD.org>
Subject: Re: Clang as default compiler November 4th
To: Patrick Lamaiziere <patfbsd_at_davenulle.org>
Cc: toolchain_at_freebsd.org, brooks_at_freebsd.org, current_at_freebsd.org
Message-ID: <192201737.20120912191907_at_serebryakov.spb.ru>
Content-Type: text/plain; charset=windows-1251

Hello, Patrick.
You wrote 12 �������� 2012 �., 1:22:44:

PL> Well, I will not be able to run FreeBSD from scratch on my soekris :-)
  Thank you for warning, I've missed this.

-- 
// Black Lion AKA Lev Serebryakov <lev_at_FreeBSD.org>



------------------------------

Message: 6
Date: Wed, 12 Sep 2012 17:31:34 +0200
From: Edward Meewis <ed_at_extraordinarymachine.nl>
Subject: Re: Building world with clang ToT
To: Dimitry Andric <dim_at_FreeBSD.org>, Chuck Burns <break19_at_gmail.com>
Cc: freebsd-current_at_FreeBSD.org
Message-ID: <5050AAD6.2080202_at_extraordinarymachine.nl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 12-09-12 14:15, Dimitry Andric wrote:
> Try building with gcc, while removing the WITHOUT_GCC line, or building
> with clang, while removing the WITHOUT_CLANG line.

I'll be damned, that did it! (with gcc)

Thanks, guys!

-- Ed.


------------------------------

Message: 7
Date: Wed, 12 Sep 2012 11:48:45 -0400
From: Kim Culhan <w8hdkim_at_gmail.com>
Subject: recently updated -current fatal trap at boot
To: freebsd-current_at_FreeBSD.org
Message-ID:
	<CAKZxVQU1tecNnKHNi-XE5OJqM+JeKcm2d72GjzYkPtuMiYRG2w_at_mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

FreeBSD -current r240360 has a fatal trap at boot.

This has been noted on two machines running -current which were
updated using the recommended
buildworld update procedure.

Booting in single-user mode is possible and booting with the previous
kernel, r240327M from ~ 09-10-12,
is also possible and appears to run well.

On the console the moment of failure is just after the config data for
the last network device
is displayed, where normally on the console is:

add net default: gateway: 1.2.3.4

When pflog was enabled, pflog was the last item displayed, disabling
pf and pflog has no effect.

A serial console is not available so a picture of the console after
the fatal trap is:

https://picasaweb.google.com/lh/photo/vFCZkxwtD1iTis5FEFZPN3l5YW7gL02s7FRYfqxWRYs?feat=directlink

Any recommendations toward finding the cause would be greatly appreciated.

thanks
-kim


------------------------------

Message: 8
Date: Wed, 12 Sep 2012 11:53:06 -0400
From: Michael Butler <imb_at_protected-networks.net>
Subject: Re: recently updated -current fatal trap at boot
To: Kim Culhan <w8hdkim_at_gmail.com>
Cc: freebsd-current_at_FreeBSD.org
Message-ID: <5050AFE2.7060008_at_protected-networks.net>
Content-Type: text/plain; charset=ISO-8859-1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/12/12 11:48, Kim Culhan wrote:
> FreeBSD -current r240360 has a fatal trap at boot.

SVN r240367 reverts the troublesome change,

	imb


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlBQr+IACgkQQv9rrgRC1JKkSQCggIYLIw3nXzJgbsWhMID7vyKG
rBoAoLPqm84XvhMhf8Ykp6bcwcedu8XJ
=q3eX
-----END PGP SIGNATURE-----


------------------------------

Message: 9
Date: Wed, 12 Sep 2012 08:57:49 -0700
From: David Wolfskill <david_at_catwhisker.org>
Subject: Re: recently updated -current fatal trap at boot
To: Kim Culhan <w8hdkim_at_gmail.com>
Cc: freebsd-current_at_freebsd.org
Message-ID: <20120912155749.GI3357_at_albert.catwhisker.org>
Content-Type: text/plain; charset="us-ascii"

On Wed, Sep 12, 2012 at 11:48:45AM -0400, Kim Culhan wrote:
> FreeBSD -current r240360 has a fatal trap at boot.
> ...

As noted yesterday, yes.  You need to either revert r240344 or apply
r240367 (which reverts r240344).

FWIW, I had no trouble at r240388.

Peace,
david
-- 
David H. Wolfskill				david_at_catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120912/0310ccc5/attachment-0001.pgp

------------------------------

Message: 10
Date: Wed, 12 Sep 2012 18:18:06 +0200
From: Dimitry Andric <dim_at_FreeBSD.org>
Subject: Re: Building world with clang ToT
To: Edward Meewis <ed_at_extraordinarymachine.nl>
Cc: freebsd-current_at_FreeBSD.org, Chuck Burns <break19_at_gmail.com>
Message-ID: <5050B5BE.7090005_at_FreeBSD.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2012-09-12 17:31, Edward Meewis wrote:
> On 12-09-12 14:15, Dimitry Andric wrote:
>> Try building with gcc, while removing the WITHOUT_GCC line, or building
>> with clang, while removing the WITHOUT_CLANG line.
>
> I'll be damned, that did it! (with gcc)

Note that some people have been working on external toolchain support.

This would aim to make it possible to do what you were trying, e.g.
building world using WITHOUT_TOOLCHAIN, which sets both WITHOUT_CLANG
and WITHOUT_GCC, among others.

However, I am not sure how far these efforts have come by now. :-)


------------------------------

Message: 11
Date: Wed, 12 Sep 2012 11:34:55 -0500
From: Brooks Davis <brooks_at_FreeBSD.org>
Subject: Re: Building world with clang ToT
To: Dimitry Andric <dim_at_FreeBSD.org>
Cc: freebsd-current_at_FreeBSD.org, Edward Meewis
	<ed_at_extraordinarymachine.nl>,	Chuck Burns <break19_at_gmail.com>
Message-ID: <20120912163455.GA86169_at_lor.one-eyed-alien.net>
Content-Type: text/plain; charset="us-ascii"

On Wed, Sep 12, 2012 at 06:18:06PM +0200, Dimitry Andric wrote:
> On 2012-09-12 17:31, Edward Meewis wrote:
> > On 12-09-12 14:15, Dimitry Andric wrote:
> >> Try building with gcc, while removing the WITHOUT_GCC line, or building
> >> with clang, while removing the WITHOUT_CLANG line.
> >
> > I'll be damned, that did it! (with gcc)
> 
> Note that some people have been working on external toolchain support.
> 
> This would aim to make it possible to do what you were trying, e.g.
> building world using WITHOUT_TOOLCHAIN, which sets both WITHOUT_CLANG
> and WITHOUT_GCC, among others.
> 
> However, I am not sure how far these efforts have come by now. :-)

I've got some patches that aren't quite ready for prime-time that
allow me to cross build world with an external CLANG.  I'll post them to
the toolchain_at_ list when they are closer to ready (hopefully quite soon).

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120912/65400a35/attachment-0001.pgp

------------------------------

Message: 12
Date: Wed, 12 Sep 2012 14:07:08 -0400
From: Kim Culhan <w8hdkim_at_gmail.com>
Subject: Re: recently updated -current fatal trap at boot
To: imb_at_protected-networks.net, david_at_catwhisker.org
Cc: freebsd-current_at_freebsd.org
Message-ID:
	<CAKZxVQWPu740N0YLRgZ9m3DfReZNqEBQgQotn6gKHOJr8zxYtA_at_mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Sep 12, 2012 at 11:53 AM, Michael Butler
<imb_at_protected-networks.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/12/12 11:48, Kim Culhan wrote:
>> FreeBSD -current r240360 has a fatal trap at boot.
>
> SVN r240367 reverts the troublesome change,
>
>         imb

On Wed, Sep 12, 2012 at 11:57 AM, David Wolfskill <david_at_catwhisker.org> wrote:
> On Wed, Sep 12, 2012 at 11:48:45AM -0400, Kim Culhan wrote:
>> FreeBSD -current r240360 has a fatal trap at boot.
>> ...
>
> As noted yesterday, yes.  You need to either revert r240344 or apply
> r240367 (which reverts r240344).
>
> FWIW, I had no trouble at r240388.

Thanks to both of you for pointing this out, rebuilding now.

-kim


------------------------------

Message: 13
Date: Wed, 12 Sep 2012 21:35:03 +0200
From: Hans Petter Selasky <hselasky_at_c2i.net>
Subject: Re: Raspberry PI gets USB support [FreeBSD 10 current]
To: freebsd-current_at_freebsd.org
Cc: Garrett Cooper <yanegomi_at_gmail.com>,	Alexander Yerenkow
	<yerenkow_at_gmail.com>,	Ivan Voras <ivoras_at_freebsd.org>,
	freebsd-usb_at_freebsd.org
Message-ID: <201209122135.03654.hselasky_at_c2i.net>
Content-Type: Text/Plain;  charset="iso-8859-1"

On Wednesday 12 September 2012 12:24:58 Alexander Yerenkow wrote:
> We tested kernel built by gonzo@, there working framebuffer, ue0, and
> USB2.0 devices (in theory, I didn't have those).
> But after some activity (like download few megabytes file) all is stuck
> with message
> usb device stalled
> 
> This is getting 100% repeatedly, no matter if download goes to sd card, or
> to malloc-md-device.
> If (When) this will be fixed, then Rpi would be a candy, prepared to
> testing and more or less usable.
> I have in plans try it with xorg-framebuffer, and with directfb, while
> there's no video support.

Hi,

You should try a kernel after "r240419"

Right now my code uses PIO mode and is a bit slow, but it should be more 
stable. Let's start from there and work on upwards?

Anyone care to look into to optimising bus_space_region_4() calls to use 
load/store multiple?

--HPS


------------------------------

Message: 14
Date: Wed, 12 Sep 2012 10:53:50 -1000
From: Doug Barton <dougb_at_FreeBSD.org>
Subject: Re: Clang as default compiler November 4th
To: Erik Cederstrand <erik_at_cederstrand.dk>
Cc: toolchain_at_freebsd.org, Roman Divacky <rdivacky_at_freebsd.org>,
	current_at_freebsd.org, freebsd-ports <freebsd-ports_at_FreeBSD.org>
Message-ID: <5050F65E.1040901_at_FreeBSD.org>
Content-Type: text/plain; charset=ISO-8859-1

On 9/12/2012 12:40 AM, Erik Cederstrand wrote:
> Den 12/09/2012 kl. 11.29 skrev Doug Barton <dougb_at_FreeBSD.org>:
> 
>> On 09/11/2012 02:52 AM, Erik Cederstrand wrote:
>>> So can we do a sweep on the ports tree and mark the 2232 ports
>>> with USE_GCC=4.2 until they can actually build with clang?
>> 
>> Unfortunately it isn't that simple. We already have a
>> statistically significant number of ports that don't even compile
>> with gcc 4.2.1. How many compilers do we expect the users to
>> install? :)
> 
> If a port doesn't compile with the default compiler in base, I expect
> that port to add a build dependency on the compiler that it actually
> does compiles with.

Yes, they do this now. The problem is that the set is growing, and the
rate of growth is increasing.

> Of course, I hope to not have 6 different
> compilers installed on my system, but the list of build or runtime
> dependencies are at the discretion of the port (maintainer). As you
> (I think) said, we can't force port maintainers to patch their ports
> to support clang.

Those are unrelated issues. Please re-read the bits of my post that you
snipped. The overwhelming majority of problems we have with compiling
ports now would be fixed by having a modern version of gcc as the
official (i.e., supported) "ports compiler." The clang efforts would be
a parallel track.

Doug



------------------------------

Message: 15
Date: Wed, 12 Sep 2012 10:50:15 -1000
From: Doug Barton <dougb_at_dougbarton.us>
Subject: Re: Clang as default compiler November 4th
To: David Chisnall <theraven_at_theravensnest.org>
Cc: toolchain_at_freebsd.org, Roman Divacky <rdivacky_at_freebsd.org>,
	Dimitry Andric <dim_at_freebsd.org>, current_at_freebsd.org,	Steve Kargl
	<sgk_at_troutmask.apl.washington.edu>
Message-ID: <5050F587.6010105_at_dougbarton.us>
Content-Type: text/plain; charset=ISO-8859-1

On 9/12/2012 1:49 AM, David Chisnall wrote:
> On 12 Sep 2012, at 10:09, Doug Barton wrote:
> 
>> Also, users who actually are helping with testing clang for ports
>> continue to report runtime problems, even with things that build fine.
> 
> I hope that you are encouraging maintainers of ports that don't work as expected with clang to submit bug reports upstream.  We can't fix bugs if we aren't made aware of them.

I personally am not directly involved in this effort (other than for my
own ports), but from what I've seen the classical emphasis on pushing
bug reports upstream has been applied in this area as well.

hth,

Doug


------------------------------

Message: 16
Date: Wed, 12 Sep 2012 16:42:27 -0500
From: Nathan Whitehorn <nwhitehorn_at_freebsd.org>
Subject: Re: Clang as default compiler November 4th
To: Dimitry Andric <dim_at_FreeBSD.org>
Cc: toolchain_at_FreeBSD.org, Tijl Coosemans <tijl_at_coosemans.org>,
	current_at_FreeBSD.org, Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Message-ID: <505101C3.70203_at_freebsd.org>
Content-Type: text/plain; CHARSET=US-ASCII; format=flowed

On 09/11/12 09:56, Dimitry Andric wrote:
> On 2012-09-11 16:27, Tijl Coosemans wrote:> On 11-09-2012 16:10, 
> Dimitry Andric wrote:
> ...
>>> Yes, maths support, specifically precision, is admittedly still one of
>>> clang's (really llvm's) weaker points.  It is currently not really a
>>> high priority item for upstream.
>>>
>>> This is obviously something that a certain part of our userbase will
>>> care a lot about, while most of the time they won't care so much about
>>> licensing or politics.  So those people are probably better off using
>>> gcc for the time being.
>>
>> Does it affect the accuracy of libm functions?
>
> It seems to, at least in specific cases; Steve posted about this in an
> earlier thread on -current:
>
>   http://docs.freebsd.org/cgi/mid.cgi?20120905221310.GA97847
> _______________________________________________

If true, this is a serious problem, especially for those of us who use 
FreeBSD in a scientific computing environment.
-Nathan


------------------------------

Message: 17
Date: Thu, 13 Sep 2012 01:22:46 +0200 (CEST)
From: Gerald Pfeifer <gerald_at_pfeifer.com>
Subject: Re: Clang as default compiler November 4th
To: toolchain_at_freebsd.org
Cc: current_at_freebsd.org
Message-ID: <alpine.LNX.2.00.1209130121160.1687_at_tuna.site>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 11 Sep 2012, Erik Cederstrand wrote:
> So can we do a sweep on the ports tree and mark the 2232 ports with 
> USE_GCC=4.2 until they can actually build with clang? This could allow 
> the clang switch to proceed. Hopefully, waiting for GCC to compile just 
> to install some tiny port will be enough of a nuisance for people to 
> eventually fix the remaining ports.

To make it less painful, I just adjusted lang/gcc42 to not boostrap
any more, rather just build.  This allows for a full build in ten or
less minutes on an old quad core I used for testing.

Gerald


------------------------------

Message: 18
Date: Wed, 12 Sep 2012 19:08:33 -0700
From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Subject: Re: Clang as default compiler November 4th
To: Nathan Whitehorn <nwhitehorn_at_freebsd.org>
Cc: toolchain_at_freebsd.org, Tijl Coosemans <tijl_at_coosemans.org>,
	Dimitry Andric <dim_at_freebsd.org>, current_at_freebsd.org
Message-ID: <20120913020833.GA8255_at_troutmask.apl.washington.edu>
Content-Type: text/plain; charset=us-ascii

On Wed, Sep 12, 2012 at 04:42:27PM -0500, Nathan Whitehorn wrote:
> On 09/11/12 09:56, Dimitry Andric wrote:
> >On 2012-09-11 16:27, Tijl Coosemans wrote:> On 11-09-2012 16:10, 
> >Dimitry Andric wrote:
> >...
> >>>Yes, maths support, specifically precision, is admittedly still one of
> >>>clang's (really llvm's) weaker points.  It is currently not really a
> >>>high priority item for upstream.
> >>>
> >>>This is obviously something that a certain part of our userbase will
> >>>care a lot about, while most of the time they won't care so much about
> >>>licensing or politics.  So those people are probably better off using
> >>>gcc for the time being.
> >>
> >>Does it affect the accuracy of libm functions?
> >
> >It seems to, at least in specific cases; Steve posted about this in an
> >earlier thread on -current:
> >
> >  http://docs.freebsd.org/cgi/mid.cgi?20120905221310.GA97847
> >_______________________________________________
> 
> If true, this is a serious problem, especially for those of us who use 
> FreeBSD in a scientific computing environment.

Just to clarify.

I do not oppose switching the default compiler to clang as long
as the proponents for the switch have shown adequate testing.
Neither clang successfully building world nor clang building a
working kernel are adequate testing (IMHO).  Neither of those
"benchmarks" use floating point, and AFAIK the libm built by
clang during a buildworld is not (extensively?) exercised.  

As far as the URL above, I've been fixing accuracy issues in
the j0f() function, and so, I have a program that allows me to
exhaustively test all possible input values in the range reported.
For my locally patched j0f(), I saw the issue as reported in the
URL, but in doing additional development on j0f() I accidentally
deletely/lost that specific version of the code.  I hope to
regenerate the code from my notes this weekend, and redo the 
tests.

In regards to my initial post in this thread, I was just trying
to assess whether any benchmarks have been performed on FreeBSD
for floating point generated by clang.  Other than the limited
testing that I've done, it appears that the answer is 'no'.

-- 
Steve


------------------------------

Message: 19
Date: Wed, 12 Sep 2012 17:03:09 -1100
From: Jan Beich <jbeich_at_tormail.org>
Subject: Re: Clang as default compiler November 4th
To: Doug Barton <dougb_at_freebsd.org>
Cc: toolchain_at_freebsd.org, Roman Divacky <rdivacky_at_freebsd.org>,
	current_at_freebsd.org, Erik Cederstrand <erik_at_cederstrand.dk>,
	freebsd-ports <freebsd-ports_at_FreeBSD.org>
Message-ID: <1TC0ey-0009o8-NU_at_internal.tormail.org>
Content-Type: text/plain

Doug Barton <dougb_at_FreeBSD.org> writes:

> On 09/11/2012 02:52 AM, Erik Cederstrand wrote:
>> So can we do a sweep on the ports tree and mark the 2232 ports with USE_GCC=4.2 until they can actually build with clang?
>
> Unfortunately it isn't that simple. We already have a statistically
> significant number of ports that don't even compile with gcc 4.2.1. How
> many compilers do we expect the users to install? :)
>
> What we need to do is what I and others have been asking to do for
> years. We need to designate a modern version of gcc (no less than 4.6)
> as the official default ports compiler, and rework whatever is needed to
> support this. Fortunately, that goal is much more easily achieved than
> fixing ports to build and run with clang. (It's harder than it sounds
> because there are certain key libs that define some paths depending on
> what compiler they were built with, but still easier than dealing with
> clang in the short term.)

To that effect ports also need to respect CC/CXX. There were a few -exp
runs without /usr/bin/{cc,gcc,etc} to find out non-conforming ones as
part of ports/159117. However, the issue was quickly shoved under the
carpet in order to focus on the more important, clang as default.

# last try, assumes_gcc are ports ignoring CC/CXX, many are fixed
http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/index-reason.html

>
> Once that is done, the compiler in the base is an afterthought, and we
> can do away with gcc in the base altogether much more easily. Users who
> want to help support building ports with clang can continue to do so.
>
> Doug

--
Ignoring for the moment clang -exp runs are *still* done with clang 3.0
while we're discussing here clang 3.2 becoming default.


------------------------------

Message: 20
Date: Thu, 13 Sep 2012 08:21:31 +0200
From: Pietro Cerutti <gahr_at_FreeBSD.org>
Subject: Re: Clang as default compiler November 4th
To: Doug Barton <dougb_at_FreeBSD.org>
Cc: toolchain_at_freebsd.org, Roman Divacky <rdivacky_at_freebsd.org>,
	current_at_freebsd.org, Erik Cederstrand <erik_at_cederstrand.dk>,
	freebsd-ports <freebsd-ports_at_FreeBSD.org>
Message-ID: <20120913062131.GA29644_at_gahrfit.gahr.ch>
Content-Type: text/plain; charset="utf-8"

On 2012-Sep-11, 23:29, Doug Barton wrote:
> What we need to do is what I and others have been asking to do for
> years. We need to designate a modern version of gcc (no less than 4.6)
> as the official default ports compiler, and rework whatever is needed to
> support this. Fortunately, that goal is much more easily achieved than
> fixing ports to build and run with clang. (It's harder than it sounds
> because there are certain key libs that define some paths depending on
> what compiler they were built with, but still easier than dealing with
> clang in the short term.)

I like the idea very much. My only concern is that gcc is heavy to
build. I can't imagine booting into a freshly installed production
machine and having to install gcc just to build the couple of ports
that I need there. Unless we provide a fast shortcut way to have make
depends install gcc via pkg when needed, or some similar mechanism..

-- 
Pietro Cerutti
The FreeBSD Project
gahr_at_FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120913/b523394f/attachment-0001.pgp

------------------------------

Message: 21
Date: Thu, 13 Sep 2012 01:46:25 -0500
From: Mark Linimon <linimon_at_lonesome.com>
Subject: Re: Clang as default compiler November 4th
To: Pietro Cerutti <gahr_at_FreeBSD.org>
Cc: Doug Barton <dougb_at_FreeBSD.org>, current_at_freebsd.org,	Erik
	Cederstrand <erik_at_cederstrand.dk>,	Roman Divacky
	<rdivacky_at_freebsd.org>, toolchain_at_freebsd.org,	freebsd-ports
	<freebsd-ports_at_FreeBSD.org>
Message-ID: <20120913064625.GB2452_at_lonesome.com>
Content-Type: text/plain; charset=us-ascii

On Thu, Sep 13, 2012 at 08:21:31AM +0200, Pietro Cerutti wrote:
> On 2012-Sep-11, 23:29, Doug Barton wrote:
> > What we need to do is what I and others have been asking to do for
> > years. We need to designate a modern version of gcc (no less than 4.6)
> > as the official default ports compiler, and rework whatever is needed to
> > support this. Fortunately, that goal is much more easily achieved than
> > fixing ports to build and run with clang. (It's harder than it sounds
> > because there are certain key libs that define some paths depending on
> > what compiler they were built with, but still easier than dealing with
> > clang in the short term.)
> 
> I like the idea very much. My only concern is that gcc is heavy to
> build.

Gerald has been advocating this for a while as well.  In fact, he's
just made a commit that makes the lang/gcc42 compiler much easier to
bootstrap itself.

There's a set of interlocking changes that we need to make to the
infrastructure to modernize our compiler choices.  I've been talking
to Gerald about some of the aspects of it and hope to have something
to propose fairly soon.

But IMHO it's a little bit trickier than it appears at first glance.

mcl


------------------------------

Message: 22
Date: Thu, 13 Sep 2012 11:27:35 +0200
From: Edward Meewis <ed_at_extraordinarymachine.nl>
Subject: Re: Building world with clang ToT
To: Brooks Davis <brooks_at_FreeBSD.org>
Cc: freebsd-current_at_FreeBSD.org
Message-ID: <5051A707.1030901_at_extraordinarymachine.nl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Brook,

On 12-09-12 18:34, Brooks Davis wrote:
> <snip>
> Note that some people have been working on external toolchain support.
>
> This would aim to make it possible to do what you were trying, e.g.
> building world using WITHOUT_TOOLCHAIN, which sets both WITHOUT_CLANG
> and WITHOUT_GCC, among others.
>
> However, I am not sure how far these efforts have come by now. :-)
> I've got some patches that aren't quite ready for prime-time that
> allow me to cross build world with an external CLANG.  I'll post them to
> the toolchain@ list when they are closer to ready (hopefully quite soon).
>
> -- Brooks
I'd be interested in those, even if there are some rough edges. (I don't 
mind sub-prime, this time ;)

FWIW: The clang build finished too, but with two hick-ups:
1. - kdump: build reports 4 errors:

===> usr.bin/kdump (depend)
sh /usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/mksubr 
/usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/include >kdump_subr.c
env MACHINE=amd64 CPP="cpp"  sh 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/mkioctls print 
/usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/include > ioctl.c
<stdin>:8:31: error: cam/scsi/scsi_enc.h: No such file or directory
<stdin>:17:33: error: dev/filemon/filemon.h: No such file or directory
<stdin>:35:33: error: fs/nandfs/nandfs_fs.h: No such file or directory
<stdin>:46:24: error: net/netmap.h: No such file or directory

(As a consequence ?) clang doesn't pick up 2 symbols: MFI_CMD32 and 
MFIIO_PASSTHRU32 which are defined if COMPAT_FREEBSD32 is set in 
sys/dev/mfi/mfi_ioctl.h

2. lint calls tmp/usr/cc directly:

buildworld-clang.log:===> usr.bin/xlint/llib (all)
buildworld-clang.log:lint -cghapbx -Cposix 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/xlint/llib/llib-lposix
buildworld-clang.log:lint: cannot exec 
/usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/bin/cc: No such 
file or directory
buildworld-clang.log:Stop in 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/xlint/llib.

A link from cc to clang in the same directory fixes that.

Regards, Ed.

ps: re. 1: the gcc build calls:

===> usr.bin/kdump (depend)
/bin/sh 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/../../sys/kern/makesyscalls.sh 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/../../sys/amd64/linux32/syscalls.master 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/linux_syscalls.conf
sh /usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/mksubr 
/usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/include | sed -n 
's/^\([a-z].*)\)$/void \1;/p' >kdump_subr.h
echo "int nlinux_syscalls = sizeof(linux_syscallnames) / 
sizeof(linux_syscallnames[0]);"  >> linux_syscalls.c
env MACHINE=amd64 CPP="cpp"  sh 
/usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/mkioctls print 
/usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/include > ioctl.c



------------------------------

Message: 23
Date: Thu, 13 Sep 2012 13:30:09 +0200
From: Dimitry Andric <dim_at_FreeBSD.org>
Subject: Re: Building world with clang ToT
To: Edward Meewis <ed_at_extraordinarymachine.nl>
Cc: freebsd-current_at_FreeBSD.org, Brooks Davis <brooks_at_FreeBSD.org>
Message-ID: <5051C3C1.8020802_at_FreeBSD.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2012-09-13 11:27, Edward Meewis wrote:
....
> FWIW: The clang build finished too, but with two hick-ups:
> 1. - kdump: build reports 4 errors:
>
> ===> usr.bin/kdump (depend)
> sh /usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/mksubr
> /usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/include >kdump_subr.c
> env MACHINE=amd64 CPP="cpp"  sh
> /usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/kdump/mkioctls print
> /usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/include > ioctl.c
> <stdin>:8:31: error: cam/scsi/scsi_enc.h: No such file or directory
> <stdin>:17:33: error: dev/filemon/filemon.h: No such file or directory
> <stdin>:35:33: error: fs/nandfs/nandfs_fs.h: No such file or directory
> <stdin>:46:24: error: net/netmap.h: No such file or directory
>
> (As a consequence ?) clang doesn't pick up 2 symbols: MFI_CMD32 and
> MFIIO_PASSTHRU32 which are defined if COMPAT_FREEBSD32 is set in
> sys/dev/mfi/mfi_ioctl.h

I don't think this has anything to do with clang, since you can see
CPP="cpp" in that command line, which usually is GNU cpp.  For clang,
you should set CPP=clang-cpp instead.

What seems to be happening is that certain headers it expects are not
install in ${DESTDIR}, which should be ${WORLDTMP} during buildworld.

It is possible that due to all the WITHOUT_ options you have defined,
some of those headers may not be installed.


> 2. lint calls tmp/usr/cc directly:
>
> buildworld-clang.log:===> usr.bin/xlint/llib (all)
> buildworld-clang.log:lint -cghapbx -Cposix
> /usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/xlint/llib/llib-lposix
> buildworld-clang.log:lint: cannot exec
> /usr/obj/usr/home/emeewis/contrib/FreeBSD-HEAD/tmp/usr/bin/cc: No such
> file or directory
> buildworld-clang.log:Stop in
> /usr/home/emeewis/contrib/FreeBSD-HEAD/usr.bin/xlint/llib.
>
> A link from cc to clang in the same directory fixes that.

Yes, that is a known problem in lint, but I have no great urge to fix
it.  IMHO lint should be axed, the program is simply obsolete.


------------------------------

_______________________________________________
freebsd-current_at_freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

End of freebsd-current Digest, Vol 465, Issue 5
***********************************************
Received on Fri Sep 14 2012 - 23:55:50 UTC

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