Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com,
	binutils@sources.redhat.com, dj@redhat.com
Subject: (toplevel) Support for host subconfigure in Makefile, configure.in part
Date: Sun, 01 Dec 2002 04:40:00 -0000	[thread overview]
Message-ID: <20021201123941.GA4636@doctormoo> (raw)

This is my fourth outstanding patch.  Tested on i686-pc-linux-gnu.  This
adds all the machinery needed on the configure side for host subconfigures
in the Makefile.  (And mostly doesn't use it.)

	* configure.in: Separate subconfigure options added by this file from
	options given by the user.  Add machinery to put args for host
	subconfigures into the Makefile.

--- configure.in.temporary	2002-12-01 07:26:02.000000000 -0500
+++ configure.in	2002-12-01 07:34:06.000000000 -0500
@@ -33,6 +33,7 @@
 
 ##############################################################################
 
+extra_host_args=
 # Define the trigger file to make sure configure will re-run whenever
 # the gcc version number changes.
 if [ "${with_gcc_version_trigger+set}" = set ]; then
@@ -47,11 +48,12 @@
 	  *--with-gcc-version-trigger=$gcc_version_trigger* )
 	    ;;
 	  * )
-	    # Make sure configure.in knows about this.
+	    # Add to all subconfigure arguments: build, host, and target.
 	    arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
 	    ;;
 	esac
-	withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
+	# This will be redundant when we start all subconfigures from the Makefile.
+	extra_host_args="--with-gcc-version-trigger=$gcc_version_trigger $extra_host_args"
     fi
 fi
 
@@ -1208,21 +1210,21 @@
 if test x${use_gnu_as} = x &&
    echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
   with_gnu_as=yes
-  withoptions="$withoptions --with-gnu-as"
+  extra_host_args="$extra_host_args --with-gnu-as"
 fi
 
 if test x${use_gnu_ld} = x &&
    echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
   with_gnu_ld=yes
-  withoptions="$withoptions --with-gnu-ld"
+  extra_host_args="$extra_host_args --with-gnu-ld"
 fi
 
-# If using newlib, add --with-newlib to the withoptions so that gcc/configure
+# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
 # can detect this case.
 
 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
   with_newlib=yes
-  withoptions="$withoptions --with-newlib"
+  extra_host_args="$extra_host_args --with-newlib"
 fi
 
 # We default to --with-shared on platforms where -fpic is meaningless.
@@ -1249,13 +1251,13 @@
   case "${target}" in
   mips*-*-irix6*o32)
     with_stabs=yes;
-    withoptions="${withoptions} --with-stabs"
+    extra_host_args="${extra_host_args} --with-stabs"
     ;;
   mips*-*-irix6*)
     ;;
   mips*-*-* | alpha*-*-osf*)
     with_stabs=yes;
-    withoptions="${withoptions} --with-stabs"
+    extra_host_args="${extra_host_args} --with-stabs"
     ;;
   esac
 fi
@@ -1264,10 +1266,13 @@
 # them automatically.
 case "${host}" in
   hppa*64*-*-hpux11*)	
-    withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
+    extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
     ;;
 esac
 
+# This will go away when we start subconfigures from the Makefile.
+withoptions="${withoptions} ${extra_host_args}"
+
 # If we aren't going to be using gcc, see if we can extract a definition
 # of CC from the fragment.
 # Actually, use the 'pre-extracted' version above.
@@ -1441,6 +1446,18 @@
 # desired.
 buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
 
+# For host modules, accept cache file option, or specification as blank.
+case "${cache_file}" in
+"") # empty
+  cache_file_option="" ;;
+/* | [A-Za-z]:[\\/]* ) # absolute path
+  cache_file_option="--cache-file=${cache_file}" ;;
+*) # relative path
+  cache_file_option="--cache-file=../${cache_file}" ;;
+esac
+
+hostargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+
 targargs=${baseargs}
 
 # Passing a --with-cross-host argument lets the target libraries know
@@ -1658,6 +1675,7 @@
 s%@build_subdir@%${build_subdir}%
 s%@build_configargs@%${buildargs}%
 s%@gxx_include_dir@%${gxx_include_dir}%
+s%@host_configargs@%${hostargs}%
 EOF
 sed -f $sedtemp Makefile > Makefile.tem
 rm -f Makefile $sedtemp


             reply	other threads:[~2002-12-01 12:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-01  4:40 Nathanael Nerode [this message]
2002-12-02 12:28 ` 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=20021201123941.GA4636@doctormoo \
    --to=neroden@twcny.rr.com \
    --cc=binutils@sources.redhat.com \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@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