From patchwork Tue Mar 8 14:33:43 2011
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: PR 47836,
Some Cross Compiler can't build target-libiberty or target-zlib
From: Thomas Klein
X-Patchwork-Id: 85984
Message-Id: <4D763E47.30306@web.de>
To: gcc-patches@gcc.gnu.org
Date: Tue, 08 Mar 2011 14:33:43 +0000
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.