This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR 47836, Some Cross Compiler can't build target-libiberty or target-zlib


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<th.r.klein@web.de>

	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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]