diff mbox

Removing target-libiberty (was: Re: Libiberty: POSIXify psignal definition)

Message ID 201106221816.p5MIGmai032688@ignucius.se.axis.com
State New
Headers show

Commit Message

Hans-Peter Nilsson June 22, 2011, 6:16 p.m. UTC
> Date: Mon, 20 Jun 2011 16:58:41 +0000 (UTC)
> From: "Joseph S. Myers" <joseph@codesourcery.com>

> On Mon, 20 Jun 2011, Hans-Peter Nilsson wrote:
> 
> > It seems none in approval capacity have any objection to
> > (figuratively) s/target-libiberty//g in toplevel/configure.ac on
> > all branches.  Is an --enable-target-libiberty or
> > --with-target-libiberty needed?  (I'd just rather not.)
> 
> There should be no such option.  It should just be a matter of removing 
> "target_modules = { module= libiberty; };" and everything that references 
> target-libiberty.

Here we go, pretty straightforward.  For lack of other
suggestions, tested as I suggested: native
x86_64-unknown-linux-gnu, cross to cris-axis-elf, both with old
and new ("breaking") newlib.  Note that I didn't (have to)
change libiberty; after this patch there'll be dead code for
target-libiberty ripe for cleanup.  There's a rationale in
<http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01311.html> for
where Joseph mentions some of the bogus dependencies; Looking at
winsup ISTM it's the same (not a *target* dependency, but a
*host* dependency; like a cross-compiler it's built using host
tools and libraries, not using the newly built target tools and
libraries).

Ok for trunk?  Patch for branches will look slightly different;
the code in configure.ac was a single chunk thanks to Joseph
breaking it out earlier.  (Pre-approvals welcome. :)

	PR47836
	PR23656
	PR47733
	PR49247
	* configure.ac (target_libraries): Remove target-libiberty.
	Remove case-statement setting skipdirs=target-libiberty for
	multiple targets.  Remove checking target_configdirs and
	removing target-libiberty but keeping target-libgcc if
	otherwise empty.
	* Makefile.def (target_modules): Don't add libiberty.
	(dependencies): Remove all traces of target-libiberty.
	* configure, Makefile.in: Regenerate.


brgds, H-P

Comments

DJ Delorie June 22, 2011, 7:16 p.m. UTC | #1
> Ok for trunk?

Ok with me.  I'll let the branch maintainers decide if they want it
for their branches.
diff mbox

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 175272)
+++ configure.ac	(working copy)
@@ -149,9 +149,8 @@  libgcj="target-libffi \
 
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
-#
+# Note that libiberty is not a target library.
 target_libraries="target-libgcc \
-		target-libiberty \
 		target-libgloss \
 		target-newlib \
 		target-libgomp \
@@ -490,51 +489,6 @@  case "${target}" in
     ;;
 esac
 
-# Disable target libiberty for some systems.
-case "${target}" in
-  *-*-kaos*)
-    # Remove unsupported stuff on all kaOS configurations.
-    skipdirs="target-libiberty"
-    ;;
-  *-*-netbsd*)
-    # Skip some stuff on all NetBSD configurations.
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  *-*-netware*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  *-*-rtems*)
-    skipdirs="${skipdirs} target-libiberty"
-    ;;
-  *-*-tpf*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  *-*-vxworks*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  arm*-*-symbianelf*|arm*-*-linux-androideabi)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  avr-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  picochip-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-  mips*-sde-elf*)
-    skipdirs="$skipdirs target-libiberty"
-    ;;
-  ip2k-*-*)
-    noconfigdirs="$noconfigdirs target-libiberty"
-    ;;
-esac
-
 # Disable libstdc++-v3 for some systems.
 case "${target}" in
   *-*-vxworks*)
@@ -1965,27 +1919,6 @@  for dir in . $skipdirs $noconfigdirs ; d
   fi
 done
 
-# Sometimes the tools are distributed with libiberty but with no other
-# libraries.  In that case, we don't want to build target-libiberty.
-# Don't let libgcc imply libiberty either.
-if test -n "${target_configdirs}" ; then
-  libgcc=
-  others=
-  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
-    if test "$i" = "libgcc"; then
-      libgcc=target-libgcc
-    elif test "$i" != "libiberty" ; then
-      if test -r $srcdir/$i/configure ; then
-	others=yes;
-	break;
-      fi
-    fi
-  done
-  if test -z "${others}" ; then
-    target_configdirs=$libgcc
-  fi
-fi
-
 # Quietly strip out all directories which aren't configurable in this tree.
 # This relies on all configurable subdirectories being autoconfiscated, which
 # is now the case.
Index: Makefile.def
===================================================================
--- Makefile.def	(revision 175272)
+++ Makefile.def	(working copy)
@@ -131,7 +131,6 @@  target_modules = { module= libtermcap; n
                    missing=maintainer-clean; };
 target_modules = { module= winsup; };
 target_modules = { module= libgloss; no_check=true; };
-target_modules = { module= libiberty; };
 target_modules = { module= libffi; };
 target_modules = { module= libjava; raw_cxx=true; };
 target_modules = { module= zlib; };
@@ -481,7 +480,6 @@  lang_env_dependencies = { module=libiber
 dependencies = { module=configure-target-boehm-gc; on=all-target-libstdc++-v3; };
 dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
 dependencies = { module=all-target-fastjar; on=all-target-zlib; };
-dependencies = { module=all-target-fastjar; on=all-target-libiberty; };
 dependencies = { module=configure-target-libgo; on=configure-target-libffi; };
 dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
 dependencies = { module=all-target-libgo; on=all-target-libffi; };
@@ -493,9 +491,7 @@  dependencies = { module=all-target-libja
 dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
 dependencies = { module=all-target-libjava; on=all-target-libffi; };
 dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
-dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
 dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
-dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
 dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
 // parallel_list.o and parallel_settings.o depend on omp.h, which is
 // generated by the libgomp configure.  Unfortunately, due to the use of
@@ -508,10 +504,7 @@  lang_env_dependencies = { module=rda; };
 lang_env_dependencies = { module=winsup; };
 
 dependencies = { module=all-target-libgloss; on=all-target-newlib; };
-dependencies = { module=all-target-winsup; on=all-target-libiberty; };
 dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
-dependencies = { module=configure-target-libiberty; on=all-binutils; };
-dependencies = { module=configure-target-libiberty; on=all-ld; };
 dependencies = { module=configure-target-newlib; on=all-binutils; };
 dependencies = { module=configure-target-newlib; on=all-ld; };
 dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; };