Re: svn commit: r220401 - in head: . share/mk tools/build/mk tools/build/options

2011-04-07 Thread Alexander Best
On Wed Apr  6 11, Warner Losh wrote:
 
 On Apr 6, 2011, at 3:41 PM, Alexander Best wrote:
 
  On Wed Apr  6 11, Juli Mallett wrote:
  On Wed, Apr 6, 2011 at 14:04, Alexander Best arun...@freebsd.org wrote:
  On Wed Apr  6 11, Ulrich Spoerlein wrote:
  Author: uqs
  Date: Wed Apr  6 20:08:23 2011
  New Revision: 220401
  URL: http://svn.freebsd.org/changeset/base/220401
  
  Log:
Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
WITHOUT_CLANG.
  
  is there no way to build clang/llvm without CXX support?
  
  Clang and LLVM are written in C++.  Even if their support for
  compiling C++ could be disabled, you'd still need a C++ cross-compiler
  to build them, which ought to be disabled by WITHOUT_CXX, right?
  
  good point. is it even possible to build a world *with* C++ support, if the
  installed world *doesn't* have C++ support? is the C++ part of gcc written 
  in
  C? if that's the case it's possible.
 
 Yes.  We don't need c++ to bootstrap g++ or anything else in the base system. 
  Once we build the compilers, we can build the c++ that's in the tree.

however that means that FreeBSD can never get rid of gcc. so clang can never
become the main and only base compiler.

 
  couldn't we install clang *without* C++ support and then do the following to
  build it *with* C++ support:
  
  1) use gcc to build a bootstrap gcc *with* C++ support
  2) use the bootstrap gcc to build clang
 
 I suppose you could do that, but I'm unsure how much that buys you...
 
 Warner
-- 
a13x
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220401 - in head: . share/mk tools/build/mk tools/build/options

2011-04-07 Thread Ulrich Spoerlein
On Thu, 07.04.2011 at 07:31:14 +, Alexander Best wrote:
 On Wed Apr  6 11, Warner Losh wrote:
  On Apr 6, 2011, at 3:41 PM, Alexander Best wrote:
   On Wed Apr  6 11, Juli Mallett wrote:
   On Wed, Apr 6, 2011 at 14:04, Alexander Best arun...@freebsd.org wrote:
   On Wed Apr  6 11, Ulrich Spoerlein wrote:
   Author: uqs
   Date: Wed Apr  6 20:08:23 2011
   New Revision: 220401
   URL: http://svn.freebsd.org/changeset/base/220401
   
   Log:
 Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
 WITHOUT_CLANG.
   
   is there no way to build clang/llvm without CXX support?
   
   Clang and LLVM are written in C++.  Even if their support for
   compiling C++ could be disabled, you'd still need a C++ cross-compiler
   to build them, which ought to be disabled by WITHOUT_CXX, right?
   
   good point. is it even possible to build a world *with* C++ support, if 
   the
   installed world *doesn't* have C++ support? is the C++ part of gcc 
   written in
   C? if that's the case it's possible.
  
  Yes.  We don't need c++ to bootstrap g++ or anything else in the base 
  system.  Once we build the compilers, we can build the c++ that's in the 
  tree.

While technically true, that c++ (the binary) is not needed, our g++
requires gperf(1) to build, which is written in C++. So we need gperf +
C compiler to bootstrap. How the gperf binary comes into existence on
the host system is someone else's problem :)

 however that means that FreeBSD can never get rid of gcc. so clang can never
 become the main and only base compiler.

Not quite true, right now the host system (whatever that is) needs a
working C compiler plus a whole lot of other stuff. With clang the host
system needs a C++ compiler + lots of other stuff. I haven't tested any
other compilers, but gcc and/or clang might also build with the Sun
compilers, for example.

Cheers,
Uli
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220401 - in head: . share/mk tools/build/mk tools/build/options

2011-04-06 Thread Alexander Best
On Wed Apr  6 11, Ulrich Spoerlein wrote:
 Author: uqs
 Date: Wed Apr  6 20:08:23 2011
 New Revision: 220401
 URL: http://svn.freebsd.org/changeset/base/220401
 
 Log:
   Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
   WITHOUT_CLANG.

is there no way to build clang/llvm without CXX support?

cheers.
alex

   
   Don't build clang bootstrap/build-tools depending on this flag. We also
   keep gperf, devd and libstdc++ around to prevent foot-shooting and to
   make this a two-way street.
 
 Modified:
   head/Makefile.inc1
   head/share/mk/bsd.own.mk
   head/tools/build/mk/OptionalObsoleteFiles.inc
   head/tools/build/options/WITHOUT_CXX
 
 Modified: head/Makefile.inc1
 ==
 --- head/Makefile.inc1Wed Apr  6 19:13:04 2011(r220400)
 +++ head/Makefile.inc1Wed Apr  6 20:08:23 2011(r220401)
 @@ -1127,10 +1127,12 @@ _kgzip=   usr.sbin/kgzip
  .endif
  .endif
  
 +.if ${MK_CLANG} != no
  .if ${CC:T:Mclang} == clang
  _clang=  usr.bin/clang
  _clang_libs= lib/clang
  .endif
 +.endif
  
  cross-tools:
  .for _tool in \
 
 Modified: head/share/mk/bsd.own.mk
 ==
 --- head/share/mk/bsd.own.mk  Wed Apr  6 19:13:04 2011(r220400)
 +++ head/share/mk/bsd.own.mk  Wed Apr  6 20:08:23 2011(r220401)
 @@ -500,6 +500,11 @@ MK_OPENSSH:= no
  MK_KERBEROS:=no
  .endif
  
 +.if ${MK_CXX} == no
 +MK_CLANG:=   no
 +MK_GROFF:=   no
 +.endif
 +
  .if ${MK_IPX} == no
  MK_NCP:= no
  .endif
 
 Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
 ==
 --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Apr  6 19:13:04 
 2011(r220400)
 +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Apr  6 20:08:23 
 2011(r220401)
 @@ -689,9 +689,575 @@ OLD_FILES+=usr/share/man/man5/cvs.5.gz
  OLD_FILES+=usr/share/man/man8/cvsbug.8.gz
  .endif
  
 -#.if ${MK_CXX} == no
 -# to be filled in
 -#.endif
 +# devd(8) and gperf(1) not listed here on purpose
 +.if ${MK_CXX} == no
 +OLD_FILES+=usr/bin/CC
 +OLD_FILES+=usr/bin/c++
 +OLD_FILES+=usr/bin/c++filt
 +OLD_FILES+=usr/bin/g++
 +OLD_FILES+=usr/include/c++/4.2/algorithm
 +OLD_FILES+=usr/include/c++/4.2/backward/algo.h
 +OLD_FILES+=usr/include/c++/4.2/backward/algobase.h
 +OLD_FILES+=usr/include/c++/4.2/backward/alloc.h
 +OLD_FILES+=usr/include/c++/4.2/backward/backward_warning.h
 +OLD_FILES+=usr/include/c++/4.2/backward/bvector.h
 +OLD_FILES+=usr/include/c++/4.2/backward/complex.h
 +OLD_FILES+=usr/include/c++/4.2/backward/defalloc.h
 +OLD_FILES+=usr/include/c++/4.2/backward/deque.h
 +OLD_FILES+=usr/include/c++/4.2/backward/fstream.h
 +OLD_FILES+=usr/include/c++/4.2/backward/function.h
 +OLD_FILES+=usr/include/c++/4.2/backward/hash_map.h
 +OLD_FILES+=usr/include/c++/4.2/backward/hash_set.h
 +OLD_FILES+=usr/include/c++/4.2/backward/hashtable.h
 +OLD_FILES+=usr/include/c++/4.2/backward/heap.h
 +OLD_FILES+=usr/include/c++/4.2/backward/iomanip.h
 +OLD_FILES+=usr/include/c++/4.2/backward/iostream.h
 +OLD_FILES+=usr/include/c++/4.2/backward/istream.h
 +OLD_FILES+=usr/include/c++/4.2/backward/iterator.h
 +OLD_FILES+=usr/include/c++/4.2/backward/list.h
 +OLD_FILES+=usr/include/c++/4.2/backward/map.h
 +OLD_FILES+=usr/include/c++/4.2/backward/multimap.h
 +OLD_FILES+=usr/include/c++/4.2/backward/multiset.h
 +OLD_FILES+=usr/include/c++/4.2/backward/new.h
 +OLD_FILES+=usr/include/c++/4.2/backward/ostream.h
 +OLD_FILES+=usr/include/c++/4.2/backward/pair.h
 +OLD_FILES+=usr/include/c++/4.2/backward/queue.h
 +OLD_FILES+=usr/include/c++/4.2/backward/rope.h
 +OLD_FILES+=usr/include/c++/4.2/backward/set.h
 +OLD_FILES+=usr/include/c++/4.2/backward/slist.h
 +OLD_FILES+=usr/include/c++/4.2/backward/stack.h
 +OLD_FILES+=usr/include/c++/4.2/backward/stream.h
 +OLD_FILES+=usr/include/c++/4.2/backward/streambuf.h
 +OLD_FILES+=usr/include/c++/4.2/backward/strstream
 +OLD_FILES+=usr/include/c++/4.2/backward/tempbuf.h
 +OLD_FILES+=usr/include/c++/4.2/backward/tree.h
 +OLD_FILES+=usr/include/c++/4.2/backward/vector.h
 +OLD_FILES+=usr/include/c++/4.2/bits/allocator.h
 +OLD_FILES+=usr/include/c++/4.2/bits/atomic_word.h
 +OLD_FILES+=usr/include/c++/4.2/bits/basic_file.h
 +OLD_FILES+=usr/include/c++/4.2/bits/basic_ios.h
 +OLD_FILES+=usr/include/c++/4.2/bits/basic_ios.tcc
 +OLD_FILES+=usr/include/c++/4.2/bits/basic_string.h
 +OLD_FILES+=usr/include/c++/4.2/bits/basic_string.tcc
 +OLD_FILES+=usr/include/c++/4.2/bits/boost_concept_check.h
 +OLD_FILES+=usr/include/c++/4.2/bits/c++allocator.h
 +OLD_FILES+=usr/include/c++/4.2/bits/c++config.h
 +OLD_FILES+=usr/include/c++/4.2/bits/c++io.h
 +OLD_FILES+=usr/include/c++/4.2/bits/c++locale.h
 +OLD_FILES+=usr/include/c++/4.2/bits/c++locale_internal.h
 +OLD_FILES+=usr/include/c++/4.2/bits/char_traits.h
 +OLD_FILES+=usr/include/c++/4.2/bits/cmath.tcc
 

Re: svn commit: r220401 - in head: . share/mk tools/build/mk tools/build/options

2011-04-06 Thread Juli Mallett
On Wed, Apr 6, 2011 at 14:04, Alexander Best arun...@freebsd.org wrote:
 On Wed Apr  6 11, Ulrich Spoerlein wrote:
 Author: uqs
 Date: Wed Apr  6 20:08:23 2011
 New Revision: 220401
 URL: http://svn.freebsd.org/changeset/base/220401

 Log:
   Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
   WITHOUT_CLANG.

 is there no way to build clang/llvm without CXX support?

Clang and LLVM are written in C++.  Even if their support for
compiling C++ could be disabled, you'd still need a C++ cross-compiler
to build them, which ought to be disabled by WITHOUT_CXX, right?
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220401 - in head: . share/mk tools/build/mk tools/build/options

2011-04-06 Thread Alexander Best
On Wed Apr  6 11, Juli Mallett wrote:
 On Wed, Apr 6, 2011 at 14:04, Alexander Best arun...@freebsd.org wrote:
  On Wed Apr  6 11, Ulrich Spoerlein wrote:
  Author: uqs
  Date: Wed Apr  6 20:08:23 2011
  New Revision: 220401
  URL: http://svn.freebsd.org/changeset/base/220401
 
  Log:
    Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
    WITHOUT_CLANG.
 
  is there no way to build clang/llvm without CXX support?
 
 Clang and LLVM are written in C++.  Even if their support for
 compiling C++ could be disabled, you'd still need a C++ cross-compiler
 to build them, which ought to be disabled by WITHOUT_CXX, right?

good point. is it even possible to build a world *with* C++ support, if the
installed world *doesn't* have C++ support? is the C++ part of gcc written in
C? if that's the case it's possible.

couldn't we install clang *without* C++ support and then do the following to
build it *with* C++ support:

1) use gcc to build a bootstrap gcc *with* C++ support
2) use the bootstrap gcc to build clang

cheers.
alex

-- 
a13x
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220401 - in head: . share/mk tools/build/mk tools/build/options

2011-04-06 Thread Warner Losh

On Apr 6, 2011, at 3:41 PM, Alexander Best wrote:

 On Wed Apr  6 11, Juli Mallett wrote:
 On Wed, Apr 6, 2011 at 14:04, Alexander Best arun...@freebsd.org wrote:
 On Wed Apr  6 11, Ulrich Spoerlein wrote:
 Author: uqs
 Date: Wed Apr  6 20:08:23 2011
 New Revision: 220401
 URL: http://svn.freebsd.org/changeset/base/220401
 
 Log:
   Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
   WITHOUT_CLANG.
 
 is there no way to build clang/llvm without CXX support?
 
 Clang and LLVM are written in C++.  Even if their support for
 compiling C++ could be disabled, you'd still need a C++ cross-compiler
 to build them, which ought to be disabled by WITHOUT_CXX, right?
 
 good point. is it even possible to build a world *with* C++ support, if the
 installed world *doesn't* have C++ support? is the C++ part of gcc written in
 C? if that's the case it's possible.

Yes.  We don't need c++ to bootstrap g++ or anything else in the base system.  
Once we build the compilers, we can build the c++ that's in the tree.

 couldn't we install clang *without* C++ support and then do the following to
 build it *with* C++ support:
 
 1) use gcc to build a bootstrap gcc *with* C++ support
 2) use the bootstrap gcc to build clang

I suppose you could do that, but I'm unsure how much that buys you...

Warner___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org