From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31284 invoked by alias); 10 Nov 2002 19:49:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31226 invoked from network); 10 Nov 2002 19:49:11 -0000 Received: from unknown (HELO mailout5-0.nyroc.rr.com) (24.92.226.169) by sources.redhat.com with SMTP; 10 Nov 2002 19:49:11 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout5-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gAAJn4F25768; Sun, 10 Nov 2002 14:49:04 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18Ay4p-0003bx-00; Sun, 10 Nov 2002 14:48:59 -0500 Date: Sun, 10 Nov 2002 11:49:00 -0000 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) Message-ID: <20021110194858.GA13882@doctormoo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-11/txt/msg00292.txt.bz2 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"