File enable-targets.diff of Package binutils

Index: gold/configure
===================================================================
--- gold/configure.orig	2009-11-23 14:02:48.000000000 +0100
+++ gold/configure	2009-11-23 14:03:09.000000000 +0100
@@ -762,6 +762,7 @@ with_sysroot
 enable_threads
 enable_plugins
 enable_targets
+enable_ld_targets
 enable_dependency_tracking
 enable_nls
 enable_werror
@@ -1406,6 +1407,7 @@ Optional Features:
   --enable-threads        multi-threaded linking
   --enable-plugins        linker plugins
   --enable-targets        alternative target configurations
+  --enable-ld-targets      alternative target configurations
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-nls           do not use Native Language Support
@@ -3297,9 +3299,29 @@ else
 fi
 
 
+# Check whether --enable-ld-targets was given.
+if test "${enable_ld_targets+set}" = set; then :
+  enableval=$enable_ld_targets; case "${enableval}" in
+  yes | "")
+    as_fn_error "--enable-ld-targets option must specify target names or 'all'" "$LINENO" 5
+    ;;
+  no)
+    enable_ld_targets=
+    ;;
+  *)
+    enable_ld_targets=$enableval
+    ;;
+esac
+else
+  # For now, enable all targets by default
+ enable_ld_targets=$enable_targets
+
+fi
+
+
 # Canonicalize the enabled targets.
-if test -n "$enable_targets"; then
-  for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
+if test -n "$enable_ld_targets"; then
+  for targ in `echo $enable_ld_targets | sed -e 's/,/ /g'`; do
     result=`$ac_config_sub $targ 2>/dev/null`
     if test -n "$result"; then
       canon_targets="$canon_targets $result"
Index: gold/configure.ac
===================================================================
--- gold/configure.ac.orig	2009-11-23 14:02:48.000000000 +0100
+++ gold/configure.ac	2009-11-23 14:03:09.000000000 +0100
@@ -84,9 +84,26 @@ esac],
  enable_targets=all
 ])
 
+AC_ARG_ENABLE([ld-targets],
+[  --enable-ld-targets      alternative target configurations],
+[case "${enableval}" in
+  yes | "")
+    AC_MSG_ERROR([--enable-ld-targets option must specify target names or 'all'])
+    ;;
+  no)
+    enable_ld_targets=
+    ;;
+  *)
+    enable_ld_targets=$enableval
+    ;;
+esac],
+[# For now, enable all targets by default
+ enable_ld_targets=$enable_targets
+])
+
 # Canonicalize the enabled targets.
-if test -n "$enable_targets"; then
-  for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
+if test -n "$enable_ld_targets"; then
+  for targ in `echo $enable_ld_targets | sed -e 's/,/ /g'`; do
     result=`$ac_config_sub $targ 2>/dev/null`
     if test -n "$result"; then
       canon_targets="$canon_targets $result"
Index: ld/configure
===================================================================
--- ld/configure.orig	2009-11-23 14:02:48.000000000 +0100
+++ ld/configure	2009-11-23 14:03:09.000000000 +0100
@@ -1547,6 +1547,7 @@ Optional Features:
   --enable-maintainer-mode  enable make rules and dependencies not useful
 			  (and sometimes confusing) to the casual installer
   --enable-targets        alternative target configurations
+  --enable-ld-targets     alternative target configurations
   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
   --enable-got=<type>     GOT handling scheme (target, single, negative,
                           multigot)
@@ -12818,7 +12819,7 @@ all_libpath=
 
 rm -f tdirs
 
-for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
+for targ_alias in `echo $target_alias $enable_ld_targets | sed 's/,/ /g'`
 do
   if test "$targ_alias" = "all"; then
     all_targets=true
Index: ld/configure.in
===================================================================
--- ld/configure.in.orig	2009-11-23 14:02:48.000000000 +0100
+++ ld/configure.in	2009-11-23 14:03:09.000000000 +0100
@@ -22,6 +22,14 @@ AC_ARG_ENABLE(targets,
   no)       enable_targets= ;;
   *)        enable_targets=$enableval ;;
 esac])dnl
+AC_ARG_ENABLE(ld-targets,
+[  --enable-ld-targets     alternative target configurations],
+[case "${enableval}" in
+  yes | "") AC_ERROR(enable-ld-targets option must specify target names or 'all')
+            ;;
+  no)       enable_ld_targets= ;;
+  *)        enable_ld_targets=$enableval ;;
+esac], [enable_ld_targets=$enable_targets])dnl
 AC_ARG_ENABLE(64-bit-bfd,
 [  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)],
 [case "${enableval}" in
@@ -190,7 +198,7 @@ dnl not permit literal newlines in an AC
 dnl file.
 rm -f tdirs
 
-for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
+for targ_alias in `echo $target_alias $enable_ld_targets | sed 's/,/ /g'`
 do
   if test "$targ_alias" = "all"; then
     all_targets=true
openSUSE Build Service is sponsored by