Re: Split up toplevel library-disabling cases

2011-04-01 Thread Joerg Wunsch
As Weddington, Eric wrote:

  Target maintainers: I'd like to understand why it is necessary to
  disable libssp for AVR, AIX and Microblaze, and libstdc++-v3 for AVR
  (and what use C++ is on AVR without libstdc++-v3 - do you use another
  C++ library?). [...]

 Regarding the AVR port, AFAIK, it's just historical. At one point
 libssp didn't build for the avr, and we ended up just disabling it
 so users could build out of the box.

IIRC, the entire SSP feature wants to write to a file, so it obviously
requires full stdio file support, including fopen() and fclose().

As the AVR port does not imply any kind of operating system (the
library is just bare metal, sitting on top of the CPU with no
assumptions about the controller's peripherals whatsoever), there is
no file system support in avr-libc.

 Yes, we can an do build the c++ compiler for the avr target, and we
 do have users using it (with an increasing number of c++
 users). Again, AFAIK, libstc++-v3 has never been able to be built
 for the avr target, and no, we are not using another c++ library.

Last time I've been looking into it (which has been many years ago),
it somehow broke when compiling exception support, supposedly lacking
some kind of target-specific default exception handling
implementation.  That could probably be done though.  I simply stopped
then when realizing that a Hello world! with (faked) exception
support ended up with approximately 30 KiB of code, which was about a
quarter of the flash ROM size of the biggest AVR microcontroller
available by that time ;-), assuming nobody in AVR-land would really
want to use exceptions under those circumstances anyway.

It's possibler there's another couple of minor stumbling blocks here
as well, though I think it's nothing impossible to fix.

-- 
cheers, Jorg   .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


Re: Split up toplevel library-disabling cases

2011-04-01 Thread Michael Eager

Joseph S. Myers wrote:

This patch, relative to a tree with
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02027.html (pending
review) applied, continues toplevel configure cleanup by splitting the
disabling of some libraries into separate case statements for those
libraries.  Separating the logic like this brings things closer to the
desired state of this configuration being in fragments in
subdirectories rather than hardcoded directly in the toplevel
configure script, as well as making it easier to clean up this logic
where the directory disabling is not in fact appropriate.


This sounds like a good idea.


Target maintainers: I'd like to understand why it is necessary to
disable libssp for AVR, AIX and Microblaze


I believe that at some time in the past libssp failed to build for
MicroBlaze, but I don't recall the details.  It currently builds
without error, so disabling it for MicroBlaze is no longer needed.

--
Michael Eagerea...@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


Re: Split up toplevel library-disabling cases

2011-04-01 Thread Joseph S. Myers
On Fri, 1 Apr 2011, Michael Eager wrote:

  Target maintainers: I'd like to understand why it is necessary to
  disable libssp for AVR, AIX and Microblaze
 
 I believe that at some time in the past libssp failed to build for
 MicroBlaze, but I don't recall the details.  It currently builds
 without error, so disabling it for MicroBlaze is no longer needed.

Thanks.  I've applied this patch to remove that disabling and add a 
comment about why it's disabled for AVR.

Index: configure.ac
===
--- configure.ac(revision 171847)
+++ configure.ac(working copy)
@@ -483,14 +483,12 @@
 # Disable libssp for some systems.
 case ${target} in
   avr-*-*)
+# No hosted I/O support.
 noconfigdirs=$noconfigdirs target-libssp
 ;;
   powerpc-*-aix* | rs6000-*-aix*)
 noconfigdirs=$noconfigdirs target-libssp
 ;;
-  microblaze*)
-noconfigdirs=$noconfigdirs target-libssp
-;;
 esac
 
 # Disable target libiberty for some systems.
Index: ChangeLog
===
--- ChangeLog   (revision 171847)
+++ ChangeLog   (working copy)
@@ -1,5 +1,11 @@
 2011-04-01  Joseph Myers  jos...@codesourcery.com
 
+   * configure.ac (avr-*-*): Add comment about why libssp is disabled.
+   (microblaze*): Don't disable libssp.
+   * configure: Regenerate.
+
+2011-04-01  Joseph Myers  jos...@codesourcery.com
+
* configure.ac: Remove code setting CONFIG_SHELL, config_shell and
moveifchange.
* configure: Regenerate.
Index: configure
===
--- configure   (revision 171847)
+++ configure   (working copy)
@@ -3036,14 +3036,12 @@
 # Disable libssp for some systems.
 case ${target} in
   avr-*-*)
+# No hosted I/O support.
 noconfigdirs=$noconfigdirs target-libssp
 ;;
   powerpc-*-aix* | rs6000-*-aix*)
 noconfigdirs=$noconfigdirs target-libssp
 ;;
-  microblaze*)
-noconfigdirs=$noconfigdirs target-libssp
-;;
 esac
 
 # Disable target libiberty for some systems.

-- 
Joseph S. Myers
jos...@codesourcery.com


Split up toplevel library-disabling cases

2011-03-31 Thread Joseph S. Myers
This patch, relative to a tree with
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02027.html (pending
review) applied, continues toplevel configure cleanup by splitting the
disabling of some libraries into separate case statements for those
libraries.  Separating the logic like this brings things closer to the
desired state of this configuration being in fragments in
subdirectories rather than hardcoded directly in the toplevel
configure script, as well as making it easier to clean up this logic
where the directory disabling is not in fact appropriate.

Specifically, this separates out code for target-libssp,
target-libiberty, target-libstdc++-v3 and Fortran, so covering all GCC
target-library or language disabling except that related to Java
(which is most in need of cleanup, but also the most complicated and
so best dealt with separately).

The logic for what is disabled where is kept unchanged - including the
peculiar logic for target-libiberty (sometimes skipdirs is set or
appended to, sometimes noconfigdirs) - where I think the right fix
will end up being removing target-libiberty support completely, but
don't plan to work on that.  The only changes to what would be
disabled where are: two cases, for ip2k-*-* and picochip-*-*, that
disable target-libiberty are moved completely to the separate case
statement (rather than leaving empty cases behind), so in the general
case statement those targets will now fall through to *-*-* and
disable libgcj, which is OK since ip2k-*-* has no GCC support at all
and picochip has no libffi port so can't actually build Java; in the
libstdc++-v3 case statement, the target pattern for disabling
libstdc++-v3 on WinCE was adjusted to match exactly GCC's supported
targets for CE.

OK to commit (both the previous patch this is based on, and this one)?

Target maintainers: I'd like to understand why it is necessary to
disable libssp for AVR, AIX and Microblaze, and libstdc++-v3 for AVR
(and what use C++ is on AVR without libstdc++-v3 - do you use another
C++ library?).  Note that changing libstdc++-v3/acinclude.m4 to build
only freestanding libraries for a target may be an alternative to
disabling libstdc++-v3 completely for that system.  If the libraries
don't need disabling, they shouldn't be disabled, to keep down the
amount of ad hoc tests for particular targets at toplevel.  If they do
need disabling, there should be comments to explain why.

2011-03-31  Joseph Myers  jos...@codesourcery.com

* configure.ac: Separate cases disabling target-libssp,
target-libiberty, target-libstdc++-v3 and Fortran from general
case over targets.

--- configure.ac2011-03-29 20:32:56.0 +
+++ configure.ac.new2011-03-31 23:21:51.0 +
@@ -516,6 +516,87 @@
 esac
 fi
 
+# Disable libssp for some systems.
+case ${target} in
+  avr-*-*)
+noconfigdirs=$noconfigdirs target-libssp
+;;
+  powerpc-*-aix* | rs6000-*-aix*)
+noconfigdirs=$noconfigdirs target-libssp
+;;
+  microblaze*)
+noconfigdirs=$noconfigdirs target-libssp
+;;
+esac
+
+# Disable target libiberty for some systems.
+case ${target} in
+  *-*-kaos*)
+# Remove unsupported stuff on all kaOS configurations.
+skipdirs=target-libiberty
+;;
+  *-*-netbsd*)
+# Skip some stuff on all NetBSD configurations.
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  *-*-netware*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  *-*-rtems*)
+skipdirs=${skipdirs} target-libiberty
+;;
+  *-*-tpf*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  *-*-vxworks*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  arm*-*-symbianelf*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  avr-*-*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  picochip-*-*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+  mips*-sde-elf*)
+skipdirs=$skipdirs target-libiberty
+;;
+  ip2k-*-*)
+noconfigdirs=$noconfigdirs target-libiberty
+;;
+esac
+
+# Disable libstdc++-v3 for some systems.
+case ${target} in
+  *-*-vxworks*)
+# VxWorks uses the Dinkumware C++ library.
+noconfigdirs=$noconfigdirs target-libstdc++-v3
+;;
+  arm*-wince-pe*)
+# the C++ libraries don't build on top of CE's C libraries
+noconfigdirs=$noconfigdirs target-libstdc++-v3
+;;
+  avr-*-*)
+noconfigdirs=$noconfigdirs target-libstdc++-v3
+;;
+esac
+
+# Disable Fortran for some systems.
+case ${target} in
+  mmix-*-*)
+# See http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html.
+unsupported_languages=$unsupported_languages fortran
+;;
+esac
+
 # Default libgloss CPU subdirectory.
 libgloss_dir=$target_cpu
 
@@ -562,12 +643,11 @@
 ;;
   *-*-kaos*)
 # Remove unsupported stuff 

Re: Split up toplevel library-disabling cases

2011-03-31 Thread Ralf Wildenhues
* Joseph S. Myers wrote on Fri, Apr 01, 2011 at 01:40:47AM CEST:
 OK to commit (both the previous patch this is based on, and this one)?

Build system aspects of the patch are fine with me.

Thanks for pursuing this,
Ralf

 2011-03-31  Joseph Myers  jos...@codesourcery.com
 
   * configure.ac: Separate cases disabling target-libssp,
   target-libiberty, target-libstdc++-v3 and Fortran from general
   case over targets.