From patchwork Thu Mar 31 23:40:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 89153 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9830CB6F87 for ; Fri, 1 Apr 2011 10:41:00 +1100 (EST) Received: (qmail 17836 invoked by alias); 31 Mar 2011 23:40:58 -0000 Received: (qmail 17823 invoked by uid 22791); 31 Mar 2011 23:40:57 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_BF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 23:40:51 +0000 Received: (qmail 1446 invoked from network); 31 Mar 2011 23:40:49 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 Mar 2011 23:40:49 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1Q5RTr-0003si-TO; Thu, 31 Mar 2011 23:40:47 +0000 Date: Thu, 31 Mar 2011 23:40:47 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: bonzini@gnu.org, dj@redhat.com, neroden@gcc.gnu.org, aoliva@redhat.com, Ralf.Wildenhues@gmx.de, chertykov@gmail.com, aesok@post.ru, eric.weddington@atmel.com, dje.gcc@gmail.com, eager@eagercon.com Subject: Split up toplevel library-disabling cases In-Reply-To: Message-ID: References: MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch, relative to a tree with (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 * configure.ac: Separate cases disabling target-libssp, target-libiberty, target-libstdc++-v3 and Fortran from general case over targets. --- configure.ac 2011-03-29 20:32:56.000000000 +0000 +++ configure.ac.new 2011-03-31 23:21:51.000000000 +0000 @@ -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 . + unsupported_languages="$unsupported_languages fortran" + ;; +esac + # Default libgloss CPU subdirectory. libgloss_dir="$target_cpu" @@ -562,12 +643,11 @@ ;; *-*-kaos*) # Remove unsupported stuff on all kaOS configurations. - skipdirs="target-libiberty" noconfigdirs="$noconfigdirs target-libgloss" ;; *-*-netbsd*) # Skip some stuff on all NetBSD configurations. - noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss" + noconfigdirs="$noconfigdirs target-newlib target-libgloss" # Skip some stuff that's unsupported on some NetBSD configurations. case "${target}" in @@ -579,21 +659,20 @@ esac ;; *-*-netware*) - noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj}" + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; *-*-rtems*) - skipdirs="${skipdirs} target-libiberty" noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;; # The tpf target doesn't support gdb yet. *-*-tpf*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} gdb tcl tk libgui itcl" + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj} gdb tcl tk libgui itcl" ;; *-*-uclinux*) noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}" ;; *-*-vxworks*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}" + noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; alpha*-dec-osf*) # ld works, but does not support shared libraries. @@ -620,10 +699,7 @@ ;; sh*-*-pe|mips*-*-pe|*arm-wince-pe) noconfigdirs="$noconfigdirs ${libgcj}" - noconfigdirs="$noconfigdirs target-libiberty" noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" - # the C++ libraries don't build on top of CE's C libraries - noconfigdirs="$noconfigdirs target-libstdc++-v3" noconfigdirs="$noconfigdirs target-newlib" libgloss_dir=wince ;; @@ -644,7 +720,7 @@ libgloss_dir=arm ;; arm*-*-symbianelf*) - noconfigdirs="$noconfigdirs ${libgcj} target-libiberty" + noconfigdirs="$noconfigdirs ${libgcj}" libgloss_dir=arm ;; arm-*-pe*) @@ -654,7 +730,7 @@ noconfigdirs="$noconfigdirs ld target-libgloss" ;; avr-*-*) - noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj} target-libssp" + noconfigdirs="$noconfigdirs ${libgcj}" ;; bfin-*-*) unsupported_languages="$unsupported_languages java" @@ -808,7 +884,6 @@ noconfigdirs="$noconfigdirs ${libgcj}" ;; m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) - noconfigdirs="$noconfigdirs target-libiberty" libgloss_dir=m68hc11 ;; m68k-*-elf*) @@ -819,17 +894,14 @@ ;; mmix-*-*) noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb" - unsupported_languages="$unsupported_languages fortran java" + unsupported_languages="$unsupported_languages java" ;; mt-*-*) noconfigdirs="$noconfigdirs sim" ;; - picochip-*-*) - noconfigdirs="$noconfigdirs target-libiberty" - ;; powerpc-*-aix*) # copied from rs6000-*-* entry - noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-newlib ${libgcj}" + noconfigdirs="$noconfigdirs gprof target-libgloss target-newlib ${libgcj}" ;; powerpc*-*-winnt* | powerpc*-*-pe*) target_configdirs="$target_configdirs target-winsup" @@ -856,7 +928,7 @@ noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}" ;; rs6000-*-aix*) - noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp target-newlib ${libgcj}" + noconfigdirs="$noconfigdirs gprof target-libgloss target-newlib ${libgcj}" ;; rs6000-*-*) noconfigdirs="$noconfigdirs gprof ${libgcj}" @@ -865,10 +937,9 @@ noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss" ;; microblaze*) - noconfigdirs="$noconfigdirs gprof target-libssp ${libgcj}" + noconfigdirs="$noconfigdirs gprof ${libgcj}" ;; mips*-sde-elf*) - skipdirs="$skipdirs target-libiberty" noconfigdirs="$noconfigdirs ${libgcj}" if test x$with_newlib = xyes; then noconfigdirs="$noconfigdirs gprof" @@ -934,9 +1005,6 @@ vax-*-*) noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}" ;; - ip2k-*-*) - noconfigdirs="$noconfigdirs target-libiberty" - ;; *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) noconfigdirs="$noconfigdirs target-newlib target-libgloss" ;;