From patchwork Tue Mar 8 14:33:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Klein X-Patchwork-Id: 85984 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 8FE98B70B3 for ; Wed, 9 Mar 2011 00:36:46 +1100 (EST) Received: (qmail 21161 invoked by alias); 8 Mar 2011 13:36:44 -0000 Received: (qmail 21073 invoked by uid 22791); 8 Mar 2011 13:36:43 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from fmmailgate01.web.de (HELO fmmailgate01.web.de) (217.72.192.221) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 13:36:36 +0000 Received: from smtp05.web.de ( [172.20.4.166]) by fmmailgate01.web.de (Postfix) with ESMTP id 65B3A18AA812A for ; Tue, 8 Mar 2011 14:36:34 +0100 (CET) Received: from [80.138.235.100] (helo=[80.138.235.100]) by smtp05.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1Pwx5W-0007Gu-00 for gcc-patches@gcc.gnu.org; Tue, 08 Mar 2011 14:36:34 +0100 Message-ID: <4D763E47.30306@web.de> Date: Tue, 08 Mar 2011 14:33:43 +0000 From: Thomas Klein User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; de-DE; rv:1.9.1.15) Gecko/20101101 Thunderbird/3.0.10 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [PATCH] PR 47836, Some Cross Compiler can't build target-libiberty or target-zlib X-Sender: th.r.klein@web.de 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 Hello This is more generalized way to give a user the ability to override the generation of target libraries, that are enabled per default. For example with the configure switch --disable-target-zlib, target-zlib is added to the script variable noconfigdirs and this target library will not be built. regards Thomas PS. If it helps. I've already done copyright assignment for future changes. But, not explicit for the configure scripts. Also I don't have write permission, (nor I'm requesting for this). 2011-03-08 Thomas Klein PR 47836 * configure.ac: accept --disable-target-.. from user * configure: Regenerate. Index: configure.ac =================================================================== --- configure.ac (revision 170774) +++ configure.ac (working copy) @@ -2081,6 +2081,28 @@ case ,${enable_languages},:${enable_objc_gc} in ;; esac +# a user forced "--disable-target-.." was given +# add this to the ingnore list if not already present +for target_lib_var in $target_libraries +do + var=`$as_echo "$target_lib_var" | sed 's/[[-+.]]/_/g'` + eval is_enabled=\$enable_$var + if test x$is_enabled = xno ; then + append_var=yes + for var in $noconfigdirs $skipdirs + do + if test x$var = x$target_lib_var ; then + append_var=no + break + fi + done + if test x$append_var = xyes ; then + noconfigdirs="$noconfigdirs $target_lib_var" + echo "add $target_lib_var to noconfigdirs" + fi + fi +done + # Remove the entries in $skipdirs and $noconfigdirs from $configdirs, # $build_configdirs and $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. Index: configure =================================================================== --- configure (revision 170774) +++ configure (working copy) @@ -6546,6 +6546,28 @@ case ,${enable_languages},:${enable_objc_gc} in ;; esac +# a user forced "--disable-target-.." was given +# add this to the ingnore list if not already present +for target_lib_var in $target_libraries +do + var=`$as_echo "$target_lib_var" | sed 's/[-+.]/_/g'` + eval is_enabled=\$enable_$var + if test x$is_enabled = xno ; then + append_var=yes + for var in $noconfigdirs $skipdirs + do + if test x$var = x$target_lib_var ; then + append_var=no + break + fi + done + if test x$append_var = xyes ; then + noconfigdirs="$noconfigdirs $target_lib_var" + echo "add $target_lib_var to noconfigdirs" + fi + fi +done + # Remove the entries in $skipdirs and $noconfigdirs from $configdirs, # $build_configdirs and $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp.