Re: GSoC: Making ports work with clang

2010-05-30 Thread Andrius Morkūnas

On Sun, 30 May 2010 16:36:45 +0300, Erik Cederstrand  
wrote:

Andrius, would it make sense to create e.g. a wiki page tracking the status and 
current known problems with compiling ports with clang? Just like there's a 
wiki page ClangBSD status.

http://wiki.freebsd.org/PortsAndClang
It doesn't have all the known problems, just some of them.


I think it would make it easier for lurkers to jump in and test things, and 
help whittle away at the problems.

We will probably put some info there how we compile ports with
clang in the near future.

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-30 Thread Erik Cederstrand

Den 30/05/2010 kl. 14.51 skrev Andrius Morkūnas:

> On Sun, 30 May 2010 14:58:05 +0300, Volodymyr Kostyrko  
> wrote:
>> 1. __dso not found after link. Some symbols seems to be omitted from
>> libraries and linking of plugins fails badly.
> Known problem with known fix.
> 
>> 2. Assembler errors. Xorg has some in x11-servers/xorg-server
>> x11-drivers/xf86-video-vesa x11-drivers/xf86-video-ati, everything else
>> compiles and works.
> Assembler errors often aren't similar to each other, so fixing them may
> be very easy or difficult. Hopefully we will fix them for big stuff like
> xorg (not really as part of this GSoC project).
> 
>> 3. Big bunch of compile errors or config errors. This means incorrectly
>> written code, like not correctly declaring variables. This also means
>> some automake stupidities like testing c++ compiler with c style code -
>> for example clang++ refuses to compile "int main(void) {}".
> $ cat main.cc
> int main(void) {}
> $ clang main.cc -o test && ./test && echo "No, it works."
> No, it works.
> 
> Other than that, yes, many problems are related to insane configure
> scripts.
> 
>> 4. Some ports specify that thay need at least gcc 3.3.
> This is another of those insane configure scripts, testing for specific
> version of specific compiler, rather than testing if it can compile
> anything.
> 
>> 5. Some ports needs --dumpspecs.
> It's a bit uglier than "some ports":
> $ grep dumpspecs /usr/ports/Mk/bsd.gecko.mk
> GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 
> 's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE}
> 
>> audio/libmad - distorted sound
>> lang/python26 - compiling any gir dumps core
>> textproc/expat2 - dbus dumps core at launch
> Python and expat shout i386 in my face, clang/llvm tends to not like
> i386 too much. But I think few miscompilations were fixed recently,
> so some of these may already be working fine.
> 
>> And this all data is not current. It's one month old. Since then
>> dumpspecs was implemented. And maybe some other problems begone - I just
>> have not enough time to look at this thoroughly.
> Some problems from a month ago are definitely gone, but I don't think
> dumpspecs is one of them.

Andrius, would it make sense to create e.g. a wiki page tracking the status and 
current known problems with compiling ports with clang? Just like there's a 
wiki page ClangBSD status.

I think it would make it easier for lurkers to jump in and test things, and 
help whittle away at the problems.

Thanks,
Erik

Re: GSoC: Making ports work with clang

2010-05-30 Thread Andrius Morkūnas

On Sun, 30 May 2010 14:58:05 +0300, Volodymyr Kostyrko  
wrote:

1. __dso not found after link. Some symbols seems to be omitted from
libraries and linking of plugins fails badly.

Known problem with known fix.


2. Assembler errors. Xorg has some in x11-servers/xorg-server
x11-drivers/xf86-video-vesa x11-drivers/xf86-video-ati, everything else
compiles and works.

Assembler errors often aren't similar to each other, so fixing them may
be very easy or difficult. Hopefully we will fix them for big stuff like
xorg (not really as part of this GSoC project).


3. Big bunch of compile errors or config errors. This means incorrectly
written code, like not correctly declaring variables. This also means
some automake stupidities like testing c++ compiler with c style code -
for example clang++ refuses to compile "int main(void) {}".

$ cat main.cc
int main(void) {}
$ clang main.cc -o test && ./test && echo "No, it works."
No, it works.

Other than that, yes, many problems are related to insane configure
scripts.


4. Some ports specify that thay need at least gcc 3.3.

This is another of those insane configure scripts, testing for specific
version of specific compiler, rather than testing if it can compile
anything.


5. Some ports needs --dumpspecs.

It's a bit uglier than "some ports":
$ grep dumpspecs /usr/ports/Mk/bsd.gecko.mk
GECKO_PTHREAD_LIBS!=${CC} -dumpspecs | ${GREP} -m 1 pthread: | ${SED} -e 
's|^.*%{\!pg: %{pthread:|| ; s|}.*$$||' || ${TRUE}


audio/libmad - distorted sound
lang/python26 - compiling any gir dumps core
textproc/expat2 - dbus dumps core at launch

Python and expat shout i386 in my face, clang/llvm tends to not like
i386 too much. But I think few miscompilations were fixed recently,
so some of these may already be working fine.


And this all data is not current. It's one month old. Since then
dumpspecs was implemented. And maybe some other problems begone - I just
have not enough time to look at this thoroughly.

Some problems from a month ago are definitely gone, but I don't think
dumpspecs is one of them.

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-30 Thread Volodymyr Kostyrko

02.05.2010 10:25, Yuri wrote:


Having tried clang++ I have a feeling that it's not quite ready to be a
generic c++ compiler.
It crashes a lot, fails on many quite simple c++ patterns. Very immature.
Don't you feel it's too early to start project like you are going to
given the state of clang with c++?


This is just a question of time. Two month ago was the time after three 
month ago. And clang proceeds rapidly.



You will just keep stumbling upon various problems with various ports
and maybe will make 30% of c++ ports build with it at best.


Let me spit out my own stats on ports. I have 574 ports installed, E17, 
xfce, postgresql etc.


1. 23% of _my_ ports doesn't require any compiler. They are fonts, 
script, meta-ports etc.

2. 60% of _my_ ports compiles and works with current devel/clang.

This means I have only something like 17% ports to deal with.

Above this ports major breakages were:

1. __dso not found after link. Some symbols seems to be omitted from 
libraries and linking of plugins fails badly.
2. Assembler errors. Xorg has some in x11-servers/xorg-server 
x11-drivers/xf86-video-vesa x11-drivers/xf86-video-ati, everything else 
compiles and works.
3. Big bunch of compile errors or config errors. This means incorrectly 
written code, like not correctly declaring variables. This also means 
some automake stupidities like testing c++ compiler with c style code - 
for example clang++ refuses to compile "int main(void) {}".

4. Some ports specify that thay need at least gcc 3.3.
5. Some ports needs --dumpspecs.

And only small number of ports really require some real investigations.

audio/libmad - distorted sound
lang/python26 - compiling any gir dumps core
textproc/expat2 - dbus dumps core at launch

I think there are more. For example on clang-compiled ports gtk apps 
have problems with rendering final frame, but this is not a gtk failure, 
rather some lib gtk depends on.


And this all data is not current. It's one month old. Since then 
dumpspecs was implemented. And maybe some other problems begone - I just 
have not enough time to look at this thoroughly.


--
Sphinx of black quartz judge my vow.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Peter Jeremy
On 2010-May-03 16:33:19 +0300, Andrius Morkūnas  wrote:
>I wasn't talking about any specific port. What I meant is that new hardware
>won't stop coming out just because FreeBSD decided not to update their gcc.
>New CPUs may have new instructions and other things that are different from
>their predecessors in one way or another.

As an example of an increasingly common CPU that gcc 4.2 doen't
support, consider the Intel Atom.  It supports the 'Core' (ie up to
SSSE3) instructions but only does in-order execution (like the
Pentium 1).

-- 
Peter Jeremy


pgpKNqqUkjeJl.pgp
Description: PGP signature


Re: GSoC: Making ports work with clang

2010-05-03 Thread Andrius Morkūnas

On Mon, 03 May 2010 15:34:43 +0300, C. Bergström  
wrote:

What fancy stuff is in the ports tree which clang will take advantage of?

I wasn't talking about any specific port. What I meant is that new hardware
won't stop coming out just because FreeBSD decided not to update their gcc.
New CPUs may have new instructions and other things that are different from
their predecessors in one way or another. While llvm will continue to chase
the hardware and implement new optimizations, gcc in base will not be aware
of those changes, continuing to produce code that runs, but may may be
missing potential optimizations on those CPUs.
I hope this makes sense.


I can't say the gentoo/arch approach is correct, but it may not be a bad
idea to steal whatever they have have done correctly.

Maybe, but to steal something, I'd have to know what is "gentoo/arch
approach" first.


I'd be more than happy to help or work with you if it's feasible to add
another compiler to this project.

Hopefully, when I finish the project it will be relatively easy to add
support for other compilers.

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Dimitry Andric
On 2010-05-03 13:19, "C. Bergström" wrote:
>> Of course it does.  It forces you to make your software portable.
>>   
> and your point is?
> 
> Are you trying to say that s/building/porting/ between compilers is 
> going to magically make the software (have less bugs, more performance 
> or better robustness)

No, it gives you the choice of which compiler to use.


> Porting could be a means-to-an-end, but still 
> it's not an end goal.. I'm digging at what's the end goal.. After it's 
> all ported what magically happens?

You can then switch compilers freely, or at least, without too much
effort.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread C. Bergström

Andrius Morkūnas wrote:
On Mon, 03 May 2010 13:38:07 +0300, C. Bergström 
 wrote:

I can understand from a commercial perspective why having a permissive
licensed production compiler could be good.. I can understand why many
people don't like gcc or fsf, but what does the BSD community get?

1) Performance?
2) Robustness?
3) ... ?

Seeing how often I see this question, maybe I'll write (or force
rdivacky@ to do it) an explanation why clang/llvm is good for FreeBSD.
Anyway, for now, very short version:
1) Performance - in the long run, yes. gcc 4.2 in base will not be
   updated anymore. llvm on the other hand is actively developed
   and includes fancy stuff that new CPUs have. Clang also compiles
   stuff faster than gcc.

What fancy stuff is in the ports tree which clang will take advantage of?

2) Robustness - not yet. It's still too early to rely on stability of
   clang/llvm, but eventually it will get better.
I wish someone would just buy and open source EDG.. It would be 
a lot faster and less expensive

3) BSD-like license, C99 and eventually C++0x support.
I'm too lazy to think about this right now.


What's really the goal here?

To quote myself: "make clang and ports to be friendly with each other".
My goals are stated in the initial email and the wiki. I'll update the
wiki with some clarification on what are and what are not my goals when
I have more time.


What problem are you working to solve?

The problem is that ports tree is full of assumptions that compiler is
gcc. At the moment, there is no way to use alternative compiler without
breaking too many things.
This is something I can clearly relate to and would see as beneficial.  
I can't say the gentoo/arch approach is correct, but it may not be a bad 
idea to steal whatever they have have done correctly.  I'd be more than 
happy to help or work with you if it's feasible to add another compiler 
to this project.



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Andrius Morkūnas

On Mon, 03 May 2010 14:27:52 +0300, Kostik Belousov  wrote:

For me, the project that makes sense is exactly "making freebsd ports
work with clang", instead of what many have read "making applications
ported to freebsd and compiled with clang work". Please note the subtle
but very important difference.

Even more, I do think that making our ports work with exactly clang does
not give us any useful bits, except putting the port _infrastructure_
into shape where it can use non-base compilers, as easy as changing
two or three variables. Being able to decouple base and port compilers,
and give the port system the freedom to use whatever compiler the port
masters find suitable is very important. It is important both for ports,
to not need to make a rush run to fix after base changes, and it is
important for base to not hold on ports much to make a change.

Other then that, I mostly share your refusal to drink the Kool-Aid.


Finally, someone who understands the benefits of my project and what
I'm trying to do!
Of course it's my own fault for not explaining my goals clearly enough,
but now I know where to point when I try to explain what I'm doing or
why it's good for FreeBSD.

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Dominic Fandrey
On 03/05/2010 12:38, "C. Bergström" wrote:
> What's really the goal here?

In my opinion it's about staying away from the GPLv3. According
to my understanding of the situation, GPLv3 code is not accepted
into the project and that means we're stuck with gcc 4.2, which
has already reached its EOL.

The way I see it we /desperately/ need a new compiler for the base
system. Having GPLv3 stuff in Ports is all right, so getting the
base system to compile was the most important step. Now that it
does I think the change should be made as soon as all the
supported architectures work with clang.

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Andrius Morkūnas

On Mon, 03 May 2010 13:38:07 +0300, C. Bergström  
wrote:

I can understand from a commercial perspective why having a permissive
licensed production compiler could be good.. I can understand why many
people don't like gcc or fsf, but what does the BSD community get?

1) Performance?
2) Robustness?
3) ... ?

Seeing how often I see this question, maybe I'll write (or force
rdivacky@ to do it) an explanation why clang/llvm is good for FreeBSD.
Anyway, for now, very short version:
1) Performance - in the long run, yes. gcc 4.2 in base will not be
   updated anymore. llvm on the other hand is actively developed
   and includes fancy stuff that new CPUs have. Clang also compiles
   stuff faster than gcc.
2) Robustness - not yet. It's still too early to rely on stability of
   clang/llvm, but eventually it will get better.
3) BSD-like license, C99 and eventually C++0x support.
I'm too lazy to think about this right now.


What's really the goal here?

To quote myself: "make clang and ports to be friendly with each other".
My goals are stated in the initial email and the wiki. I'll update the
wiki with some clarification on what are and what are not my goals when
I have more time.


What problem are you working to solve?

The problem is that ports tree is full of assumptions that compiler is
gcc. At the moment, there is no way to use alternative compiler without
breaking too many things.


May I humbly say that building software with a different compiler in
itself doesn't really accomplish anything.

I prefer to think that compiling software with clang is making world a
better place. More seriously - clang is much more strict than gcc. It
forces people to write better, standard C/C++ code and not some random
walls of incomprehensible text that remotely resemble C or C++, but
can't even be compiled by later versions of gcc itself. I've already
seen a lot of things being fixed because clang found a bug that gcc
missed, or application relied on some weird gcc-specific behaviour
and clang refused to compile it.


Starting early can give valuable feedback , but without actually having
the resources to follow-up it's wasted effort.

Well it's my effort that's wasted, I don't see how that's bad for
anyone else. And I don't plan to waste anything, I've mentioned that
some of the things I'm going to do over summer (and have been doing
till now) aren't clang-specific. It will also help compile ports with
new versions of gcc (or any other standard C/C++ compiler), and I
don't think I need to explain why newer versions of software are
usually better.


Is llvm at the point where it can self host BSD?

You obviously aren't subscribed to freebsd-current@, are you?
http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016648.html


If not why not start there?

It's been started some time ago, by other people. The reason I'm
doing this as a GSoC project is because the person currently working
on ClangBSD suggested me to do it.


Maybe identify the most used applications..

Not sure if you're talking about base system or ports here. I've
mentioned that I want to get commonly used ports to work, and I've
been doing something like that for some time now.
If you're talking about base system, the problem isn't identifying
most used applications, it's to fix whatever is still broken. Most
of FreeBSD base system works with clang without problems.

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Kostik Belousov
On Mon, May 03, 2010 at 06:19:48PM +0700, "C. Bergstr??m" wrote:
> Dimitry Andric wrote:
> >On 2010-05-03 12:38, "C. Bergstr??m" wrote:
> >  
> >>What's really the goal here?  What problem are you working to solve?  
> >>May I humbly say that building software with a different compiler in 
> >>itself doesn't really accomplish anything.
> >>
> >
> >Of course it does.  It forces you to make your software portable.
> >  
> and your point is?
> 
> Are you trying to say that s/building/porting/ between compilers is 
> going to magically make the software (have less bugs, more performance 
> or better robustness)  Porting could be a means-to-an-end, but still 
> it's not an end goal.. I'm digging at what's the end goal.. After it's 
> all ported what magically happens?

For me, the project that makes sense is exactly "making freebsd ports
work with clang", instead of what many have read "making applications
ported to freebsd and compiled with clang work". Please note the subtle
but very important difference.

Even more, I do think that making our ports work with exactly clang does
not give us any useful bits, except putting the port _infrastructure_
into shape where it can use non-base compilers, as easy as changing
two or three variables. Being able to decouple base and port compilers,
and give the port system the freedom to use whatever compiler the port
masters find suitable is very important. It is important both for ports,
to not need to make a rush run to fix after base changes, and it is
important for base to not hold on ports much to make a change.

Other then that, I mostly share your refusal to drink the Kool-Aid.


pgpRBbwAsfij1.pgp
Description: PGP signature


Re: GSoC: Making ports work with clang

2010-05-03 Thread C. Bergström

Dimitry Andric wrote:

On 2010-05-03 12:38, "C. Bergström" wrote:
  
What's really the goal here?  What problem are you working to solve?  
May I humbly say that building software with a different compiler in 
itself doesn't really accomplish anything.



Of course it does.  It forces you to make your software portable.
  

and your point is?

Are you trying to say that s/building/porting/ between compilers is 
going to magically make the software (have less bugs, more performance 
or better robustness)  Porting could be a means-to-an-end, but still 
it's not an end goal.. I'm digging at what's the end goal.. After it's 
all ported what magically happens?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Daniel Gerzo

On 3.5.2010 12:38, "C. Bergström" wrote:

the resources to follow-up it's wasted effort. Is llvm at the point
where it can self host BSD? If not why not start there? Maybe identify
the most used applications..


http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016648.html

--
S pozdravom / Best regards
  Daniel Gerzo, FreeBSD committer
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Dimitry Andric
On 2010-05-03 12:38, "C. Bergström" wrote:
> What's really the goal here?  What problem are you working to solve?  
> May I humbly say that building software with a different compiler in 
> itself doesn't really accomplish anything.

Of course it does.  It forces you to make your software portable.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread C. Bergström

Peter Pentchev wrote:

On Sun, May 02, 2010 at 11:51:52PM +0300, Andrius Mork??nas wrote:
  

On Sun, 02 May 2010 10:25:22 +0300, Yuri  wrote:


Having tried clang++ I have a feeling that it's not quite ready to be a
generic c++ compiler.
  

[snip]
  

Very immature.
  

Many problems that C++ ports have with clang is not related to it being
immature, they're related to the fact that clang isn't gcc and that
those ports aren't written in standard C++.



Too true.
  
I can understand from a commercial perspective why having a permissive 
licensed production compiler could be good.. I can understand why many 
people don't like gcc or fsf, but what does the BSD community get?


1) Performance?
2) Robustness?
3) ... ?

What's really the goal here?  What problem are you working to solve?  
May I humbly say that building software with a different compiler in 
itself doesn't really accomplish anything.


Starting early can give valuable feedback , but without actually having 
the resources to follow-up it's wasted effort.  Is llvm at the point 
where it can self host BSD?  If not why not start there?  Maybe identify 
the most used applications..


I don't waste time on front-end work though so this is of course my 
humble opinion..


./C
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-03 Thread Peter Pentchev
On Sun, May 02, 2010 at 11:51:52PM +0300, Andrius Mork??nas wrote:
> On Sun, 02 May 2010 10:25:22 +0300, Yuri  wrote:
> > Having tried clang++ I have a feeling that it's not quite ready to be a
> > generic c++ compiler.
[snip]
> > Very immature.
> 
> Many problems that C++ ports have with clang is not related to it being
> immature, they're related to the fact that clang isn't gcc and that
> those ports aren't written in standard C++.

Too true.

[snip]
> > You will just keep stumbling upon various problems with various ports
> 
> I've mentioned that I've been involved with ports+clang since last
> October. "Stumbling upon various problems" is what I do. I'm still here,
> even doing a GSoC project, so it doesn't look like "various problems"
> will scare me off. And as I've mentioned above, just because some ports
> don't compile, it doesn't affect this project too much.

Well said, well meant.  Kudos.  Thanks for your work so far, and thanks
for taking up that GSoC project.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.netr...@space.bgr...@freebsd.org
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
I am the meaning of this sentence.


pgpoRO1eWZrzy.pgp
Description: PGP signature


Re: GSoC: Making ports work with clang

2010-05-02 Thread Charlie Kester

On Sun 02 May 2010 at 14:03:06 PDT Andrius Mork??nas wrote:

On Sun, 02 May 2010 23:17:00 +0300, Eitan Adler  
wrote:

Good - and those 30% of ports will help improve clang++ even more.

Some probably will, we submit a lot of bug reports for clang/llvm.


Hopefully over time that number will increase to 100% and we will be
able to say goodbye to gcc for good.

That won't happen, at least not anytime soon and not until we get rid of
[old] poorly written ports from the ports tree. Another problem is ports
using horrible or less horrible GNU extensions for C or C++, clang will
not support all of them. So we will still need gcc for some things, just
like we need USE_GCC=whatever now, because some ports don't compile with
gcc42 from base. I just hope we can get the majority of ports working
with clang and keep the number of ports that need gcc as low as possible.



As things stand today, we don't know exactly which ports have the kind
of dependency on gcc that you describe. If this project gets us closer
to that list, it will have been worthwhile. 


Once we know which ports are unavoidably dependent on gcc, we can start
exploring alternatives to them.  More projects for GSOC and others
looking for ways to contribute!  Sounds like fun!
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-02 Thread Andrius Morkūnas

On Sun, 02 May 2010 23:17:00 +0300, Eitan Adler  
wrote:

Good - and those 30% of ports will help improve clang++ even more.

Some probably will, we submit a lot of bug reports for clang/llvm.


Hopefully over time that number will increase to 100% and we will be
able to say goodbye to gcc for good.

That won't happen, at least not anytime soon and not until we get rid of
[old] poorly written ports from the ports tree. Another problem is ports
using horrible or less horrible GNU extensions for C or C++, clang will
not support all of them. So we will still need gcc for some things, just
like we need USE_GCC=whatever now, because some ports don't compile with
gcc42 from base. I just hope we can get the majority of ports working
with clang and keep the number of ports that need gcc as low as possible.

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-02 Thread Andrius Morkūnas

On Sun, 02 May 2010 10:25:22 +0300, Yuri  wrote:

Having tried clang++ I have a feeling that it's not quite ready to be a
generic c++ compiler.
It crashes a lot, fails on many quite simple c++ patterns.


The current state of clang doesn't bother me too much. I'm aware of its
limitations, but I'm also aware of the pace of clang/llvm development.
Trying clang at any given time is quite different than actually seeing
it get better and better every week, for months. When llvm 2.6 was
released, clang didn't compile C++ at all, and compared to that, what
we have now is definitely better. I'm sure that by the end of the summer
I'm going to call current version of clang/llvm "horribly outdated", just
like I've been calling any clang version which is over a month old.
It will get better.



Very immature.


Many problems that C++ ports have with clang is not related to it being
immature, they're related to the fact that clang isn't gcc and that
those ports aren't written in standard C++.



Don't you feel it's too early to start project like you are going to
given the state of clang with c++?


No I don't. My project doesn't rely on clang supporting all of C++. I
just want to prepare ports tree for clang. I don't intend to make
21645+ ports work with clang over the summer, that may be slightly too
much work even for me. So if I can't get KDE working, too bad, but let's
wait until clang supports all the fancy C++ KDE needs and I'll just get
it working then, even if that's after the summer is long over. You could
say that the goal of this project is to make fixing ports+clang easier
in the future.



You will just keep stumbling upon various problems with various ports


I've mentioned that I've been involved with ports+clang since last
October. "Stumbling upon various problems" is what I do. I'm still here,
even doing a GSoC project, so it doesn't look like "various problems"
will scare me off. And as I've mentioned above, just because some ports
don't compile, it doesn't affect this project too much.



and maybe will make 30% of c++ ports build with it at best.

[citation needed]

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-02 Thread Eitan Adler
> Having tried clang++ I have a feeling that it's not quite ready to be a
> generic c++ compiler.
> It crashes a lot, fails on many quite simple c++ patterns. Very immature.
> Don't you feel it's too early to start project like you are going to given
> the state of clang with c++?
> You will just keep stumbling upon various problems with various ports and
> maybe will make 30% of c++ ports build with it at best.
Good - and those 30% of ports will help improve clang++ even more.
Hopefully over time that number will increase to 100% and we will be
able to say goodbye to gcc for good.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-02 Thread Yuri

Andrius Morkūnas wrote:

Hi,

I'm Andrius Morkūnas from Lithuania. My Summer of Code proposal was 
accepted
this year and be working on my project, which is to make clang and 
ports to

be friendly with each other.
My main goals are:
* Create an easy way to set ports compiler to either clang or gcc (and 
no,

  CC=clang is not a good way to do that).
* Write a tool to detect common problems with individual ports not 
respecting
  environment variables like CC/CXX or doing other horrible things 
that break

  compilation with clang.
* Make Gnome, KDE, Xorg and other widely used things to work with clang.


Having tried clang++ I have a feeling that it's not quite ready to be a 
generic c++ compiler.

It crashes a lot, fails on many quite simple c++ patterns. Very immature.
Don't you feel it's too early to start project like you are going to 
given the state of clang with c++?
You will just keep stumbling upon various problems with various ports 
and maybe will make 30% of c++ ports build with it at best.


Yuri
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: GSoC: Making ports work with clang

2010-05-01 Thread Dominic Fandrey
Hello,

On 01/05/2010 13:04, Andrius Morkūnas wrote:
> I'm Andrius Morkūnas from Lithuania. My Summer of Code proposal was
> accepted
> this year and be working on my project, which is to make clang and ports to
> be friendly with each other.

I'm the maintainer of games/ioquake3 and games/ioquake3-devel. I'm
currently working on getting ioquake3 clang compatible. It already
compiles (the modding tools, which I intended to add to the port
are still broken), but there are some rendering issues that are my
top priority to solve at the moment.

Any way, if you need feedback, consider me an interested party.

Regards

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


GSoC: Making ports work with clang

2010-05-01 Thread Andrius Morkūnas

Hi,

I'm Andrius Morkūnas from Lithuania. My Summer of Code proposal was accepted
this year and be working on my project, which is to make clang and ports to
be friendly with each other.
My main goals are:
* Create an easy way to set ports compiler to either clang or gcc (and no,
  CC=clang is not a good way to do that).
* Write a tool to detect common problems with individual ports not respecting
  environment variables like CC/CXX or doing other horrible things that break
  compilation with clang.
* Make Gnome, KDE, Xorg and other widely used things to work with clang.

I've been patching ports to work with clang since last October, so I know my
way around the ports tree by now. What's different in GSoC project, compared
to what I usually do is that I have specific goals to achieve now, rather
than fixing random things when I feel like it.

More information will be available on FreeBSD wiki[1] later (some is already
there).

I've seen a lot of people interested in building ports with clang, especially
now, that rdivacky@ has finally announced ClangBSD testing[2]. However,
ClangBSD and ports compiled with clang are two completely different things,
so I don't recommend trying to use clang for ports just yet. I've even posted
a mail to freebsd-current@ recently, asking people not to do it[3].

However I intend to write a howto in FreeBSD wiki sometime soon explaining
how to build ports with clang more safely, what to expect and what not to
expect. It will also include some information for those who want to help us
with clang and/or ports, explaining what help we do or don't want. At some
point during summer I'll probably ask people to start testing stuff, and
report problems, so stay tuned.

If you have any questions, suggestions, or some other feedback, feel free to
mail me on or off list.


[1] http://wiki.freebsd.org/SOC2010AndriusMorkunas
[2] http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016648.html
[3] http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016990.html

--
Andrius
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"