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
Cc: binutils@sources.redhat.com, gdb-patches@sources.redhat.com,
	dj@redhat.com
Subject: Patch: top level config (AIX)
Date: Sun, 10 Nov 2002 11:49:00 -0000	[thread overview]
Message-ID: <20021110194858.GA13882@doctormoo> (raw)

This rearranges the top level config of AIX >= 4.3 (as a target).  There 
are some behavioral changes: the extra flags added to NM_FOR_TARGET 
and AR_FOR_TARGET are now added, always, to the values of 
NM_FOR_TARGET or AR_FOR_TARGET found in the usual ways.  This should 
provide more consistent behavior all around.

(There's a marginally easier way to do the same thing but it depends on 
AIX make understanding += assignments, which I didn't want to assume.)

Tested on i686-pc-linux-gnu (to make sure I didn't accidentally break 
anything).  Tested also by configuring a cross to powerpc-unknown-aix5.0 
and by configuring a cross-built native to the same, both of which 
appear to work.  Since I don't actually have an AIX system, that's all 
I can test, really.

For gcc, this is for 3.4 basic-improvements-branch.  For src, this won't 
go in until the gcc branch hits mainline.

This is one of a few system-specific patches which I need to put in before I
can finish normalizing the Makefile.in to be substituted in a purely
autoconf-compatible manner.  So the fact that it slightly complicates the
existing configure/configure.in is irrelevant. :-)

DJ, I'm asking for your blessing as config maintainer.


--Nathanael Nerode
(config)
	* mt-aix43: Remove.

(top level)
	* configure: Add support for extra required flags for ar or nm.
	* configure.in (aix4.3+): Use above support for target-specific 
	issues, rather than using config/mt-aix43

Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/configure,v
retrieving revision 1.46.6.2
diff -u -r1.46.6.2 configure
--- configure	9 Nov 2002 22:10:17 -0000	1.46.6.2
+++ configure	10 Nov 2002 19:37:42 -0000
@@ -936,6 +936,7 @@
 
   AR=${AR-${host_alias}-ar}
   AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
+  AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
   AS=${AS-${host_alias}-as}
   AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
   BISON=${BISON-bison}
@@ -957,6 +958,7 @@
   MAKEINFO=${MAKEINFO-makeinfo}
   NM=${NM-${host_alias}-nm}
   NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
+  NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
   RANLIB=${RANLIB-${host_alias}-ranlib}
   RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
   WINDRES=${WINDRES-${host_alias}-windres}
@@ -1032,6 +1034,7 @@
 
   AR=ar
   AR_FOR_TARGET='\$(USUAL_AR_FOR_TARGET)'
+  AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
   AS=as
   AS_FOR_TARGET='\$(USUAL_AS_FOR_TARGET)'
   BISON='$(USUAL_BISON)'
@@ -1046,6 +1049,7 @@
   MAKEINFO='\$(USUAL_MAKEINFO)'
   NM=nm
   NM_FOR_TARGET='\$(USUAL_NM_FOR_TARGET)'
+  NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
   RANLIB_FOR_TARGET='\$(USUAL_RANLIB_FOR_TARGET)'
   WINDRES=windres
   WINDRES_FOR_TARGET='\$(USUAL_WINDRES_FOR_TARGET)'
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.177.4.4
diff -u -r1.177.4.4 configure.in
--- configure.in	5 Nov 2002 19:11:43 -0000	1.177.4.4
+++ configure.in	10 Nov 2002 19:37:45 -0000
@@ -1118,6 +1118,8 @@
   host_makefile_frag=mh-frag
 fi
 
+extra_arflags_for_target=
+extra_nmflags_for_target=
 case "${target}" in
   v810*)
     target_makefile_frag="config/mt-v810"
@@ -1132,7 +1134,11 @@
     target_makefile_frag="config/mt-linux"
     ;;
   *-*-aix4.[3456789]* | *-*-aix[56789].*)
-    target_makefile_frag="config/mt-aix43"
+    # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm 
+    # commands to handle both 32-bit and 64-bit objects.  These flags are
+    # harmless if we're using GNU nm or ar.
+    extra_arflags_for_target=" -X32_64"
+    extra_nmflags_for_target=" -B -X32_64"
     ;;
   mips*-*-pe | sh*-*-pe | *arm-wince-pe)
     target_makefile_frag="config/mt-wince"


             reply	other threads:[~2002-11-10 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-10 11:49 Nathanael Nerode [this message]
2002-11-10 12:36 ` 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=20021110194858.GA13882@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