Patchwork PR 47836, Some Cross Compiler can't build target-libiberty or target-zlib

login
register
mail settings
Submitter Thomas Klein
Date March 8, 2011, 2:33 p.m.
Message ID <4D763E47.30306@web.de>
Download mbox | patch
Permalink /patch/85984/
State New
Headers show

Comments

Thomas Klein - March 8, 2011, 2:33 p.m.
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.

Patch

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.