This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: top level config (AIX)


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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]