Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "H . J . Lu" <hjl@lucon.org>
To: DJ Delorie <dj@redhat.com>
Cc: ac131313@cygnus.com, gdb@sources.redhat.com, gcc@gcc.gnu.org
Subject: Re: The canadian cross build is broken
Date: Tue, 26 Mar 2002 13:24:00 -0000	[thread overview]
Message-ID: <20020326132429.A8347@lucon.org> (raw)
In-Reply-To: <200203252214.g2PMEqj02765@greed.delorie.com>; from dj@redhat.com on Mon, Mar 25, 2002 at 05:14:52PM -0500

On Mon, Mar 25, 2002 at 05:14:52PM -0500, DJ Delorie wrote:
> 
> > > > http://sources.redhat.com/ml/binutils/2002-02/msg00169.html
> 
> This is wrong:
> 
> +  if [ "${with_build_subdir}" != "." ] || [ "${with_target_subdir}" != "." ]; then
> 
> One of them will *always* be ""
> 

How about this one?


H.J.
----
2002-03-26  H.J. Lu  (hjl@gnu.org)

	* config.table: Support --with-build-subdir.
	* configure.in: Likewise.
	* configure: Rebuild.

--- binutils-2.12.90.0.3/libiberty/config.table.build	Fri Nov 16 14:05:55 2001
+++ binutils-2.12.90.0.3/libiberty/config.table	Tue Mar 26 12:54:58 2002
@@ -1,3 +1,9 @@
+# Don't build the shared library for build.
+if [ -n "${with_build_subdir}" ]; then
+  enable_shared=no
+fi
+
+frag=
 case "${host}" in
   rs6000-ibm-aix3.1 | rs6000-ibm-aix)
                         frag=mh-aix ;;
@@ -8,7 +14,11 @@ case "${host}" in
   i[345]86-*-windows*)	frag=mh-windows ;;
 esac
 
-frags=$frag
+if [ -n "${frag}" ]; then
+  frags=${libiberty_topdir}/libiberty/config/$frag
+else
+  frags=
+fi
 
 # If they didn't specify --enable-shared, don't generate shared libs.
 case "${enable_shared}" in
@@ -20,30 +30,22 @@ esac
 if [ "${shared}" = "yes" ]; then
   case "${host}" in
     *-*-cygwin*)	;;
-    alpha*-*-linux*)	frags="${frags} ../../config/mh-elfalphapic" ;;
-    arm*-*-*)		frags="${frags} ../../config/mh-armpic" ;;
-    hppa*-*-*)		frags="${frags} ../../config/mh-papic" ;;
-    i[3456]86-*-*)	frags="${frags} ../../config/mh-x86pic" ;;
-    mips*-*-linux*)	frags="${frags} ../../config/mh-mipspic" ;;
+    alpha*-*-linux*)	frag=mh-elfalphapic ;;
+    arm*-*-*)		frag=mh-armpic ;;
+    hppa*-*-*)		frag=mh-papic ;;
+    i[3456]86-*-*)	frag=mh-x86pic ;;
+    mips*-*-linux*)	frag=mh-mipspic ;;
     powerpc*-*-aix*)	;;
-    powerpc*-*-*)	frags="${frags} ../../config/mh-ppcpic" ;;
-    sparc*-*-*)		frags="${frags} ../../config/mh-sparcpic" ;;
-    *-*-*)		frags="${frags} ../../config/mh-${host_cpu}pic" ;;
+    powerpc*-*-*)	frag=mh-ppcpic ;;
+    sparc*-*-*)		frag=mh-sparcpic ;;
+    *)			frag=mh-${host_cpu}pic ;;
   esac
+  frags="${frags} ${libiberty_topdir}/config/${frag}"
 fi
 
 echo "# Warning: this fragment is automatically generated" > temp-frag
 
 for frag in ${frags}; do
-  case ${frag} in
-    ../* )
-      if [ ${srcdir} = . ]; then
-	[ -n "${with_target_subdir}" ] && frag=../${frag}
-	[ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
-      fi
-      ;;
-  esac
-  frag=${srcdir}/${xsrcdir}config/$frag
   if [ -f ${frag} ]; then
     echo "Appending ${frag} to xhost-mkfrag"
     echo "# Following fragment copied from ${frag}" >> temp-frag
--- binutils-2.12.90.0.3/libiberty/configure.in.build	Thu Mar  7 11:52:40 2002
+++ binutils-2.12.90.0.3/libiberty/configure.in	Tue Mar 26 13:04:14 2002
@@ -5,14 +5,19 @@ AC_INIT(pexecute.c)
 
 dnl We use these options to decide which functions to include.
 AC_ARG_WITH(target-subdir,
-[  --with-target-subdir=SUBDIR      Configuring in a subdirectory])
+[  --with-target-subdir=SUBDIR      Configuring in a subdirectory for target])
+AC_ARG_WITH(build-subdir,
+[  --with-build-subdir=SUBDIR       Configuring in a subdirectory for build])
 AC_ARG_WITH(cross-host,
 [  --with-cross-host=HOST           Configuring with a cross compiler])
 AC_ARG_WITH(newlib,
 [  --with-newlib                    Configuring with newlib])
 
 if test "${srcdir}" = "."; then
-  if test -z "${with_target_subdir}"; then
+  if test -n "${with_build_subdir}"; then
+    libiberty_topdir="${srcdir}/../.."
+    with_target_subdir=
+  elif test -z "${with_target_subdir}"; then
     libiberty_topdir="${srcdir}/.."
   else
     if test "${with_target_subdir}" != "."; then
@@ -429,7 +434,7 @@ AC_SUBST(INSTALL_DEST)
 AC_OUTPUT(Makefile testsuite/Makefile,
 [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
 if test -n "$CONFIG_FILES"; then
-  if test -n "${with_target_subdir}"; then
+  if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
     # FIXME: We shouldn't need to set ac_file
     ac_file=Makefile
     . ${libiberty_topdir}/config-ml.in


  reply	other threads:[~2002-03-26 21:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-22 22:52 H . J . Lu
2002-03-23  7:29 ` Andrew Cagney
2002-03-23 10:14   ` H . J . Lu
2002-03-25  9:50     ` DJ Delorie
2002-03-25 14:15     ` DJ Delorie
2002-03-26 13:24       ` H . J . Lu [this message]
2002-03-26 13:35         ` DJ Delorie
2002-03-26 13:42           ` H . J . Lu
2002-03-26 13:49         ` DJ Delorie
2002-03-26 13:53           ` H . J . Lu
2002-03-26 14:00             ` DJ Delorie
2002-03-26 14:36               ` H . J . Lu
2002-03-26 14:49                 ` DJ Delorie
2002-03-26 14:59                   ` H . J . Lu
2002-03-26 15:30                     ` DJ Delorie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020326132429.A8347@lucon.org \
    --to=hjl@lucon.org \
    --cc=ac131313@cygnus.com \
    --cc=dj@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox