[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU definition of C_WEAKEXT does not match AIX definition
From: |
Nick Clifton |
Subject: |
Re: GNU definition of C_WEAKEXT does not match AIX definition |
Date: |
Tue, 02 Dec 2003 16:07:34 +0000 |
User-agent: |
Gnus/5.1001 (Gnus v5.10.1) Emacs/21.2 (gnu/linux) |
Hi Ian,
>> > The attached patch defines C_WEAKEXT to be 111 on AIX 5.2, and
>> > leaves the GNU extension in on earlier versions. It may be
>> > necessary to a bit more coding and handle both cases, I only need to
>> > work with standard AIX objects, so that's all I fixed.
>>
>> Thanks for submitting this patch. I have applied it with one small
>> change. I changed the the "#if defined" to this:
>>
>> #if defined _AIX52 || defined AIX_WEAK_SUPPORT
>
> Isn't this going to break cross-compilers hosted on AIX 5.2?
Hmm - yes I had not thought of that. I guess we are going to have to
restrict this new value to AIX 5.2 targeted toolchains only.
Maybe something like this ?
Cheers
Nick
Index: include/coff/internal.h
===================================================================
RCS file: /cvs/src/src/include/coff/internal.h,v
retrieving revision 1.13
diff -c -3 -p -r1.13 internal.h
*** include/coff/internal.h 2 Dec 2003 10:49:14 -0000 1.13
--- include/coff/internal.h 2 Dec 2003 16:09:47 -0000
*************** struct internal_aouthdr
*** 235,241 ****
#define C_ALIAS 105 /* duplicate tag */
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
! #if defined _AIX52 || defined AIX_WEAK_SUPPORT
#define C_WEAKEXT 111 /* weak symbol -- AIX standard. */
#else
#define C_WEAKEXT 127 /* weak symbol -- GNU extension. */
--- 235,241 ----
#define C_ALIAS 105 /* duplicate tag */
#define C_HIDDEN 106 /* ext symbol in dmert public lib */
! #if defined AIX_WEAK_SUPPORT
#define C_WEAKEXT 111 /* weak symbol -- AIX standard. */
#else
#define C_WEAKEXT 127 /* weak symbol -- GNU extension. */
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.148
diff -c -3 -p -r1.148 config.bfd
*** bfd/config.bfd 30 Oct 2003 09:05:14 -0000 1.148
--- bfd/config.bfd 2 Dec 2003 16:09:17 -0000
*************** case "${targ}" in
*** 884,896 ****
--- 884,910 ----
targ_selvecs="bfd_elf32_pjl_vec bfd_elf32_pj_vec bfd_elf32_i386_vec"
;;
+ powerpc-*-aix5.[01])
+ targ_defvec=rs6000coff_vec
+ targ_selvecs="aix5coff64_vec"
+ want64=true
+ ;;
+ #ifdef BFD64
+ powerpc64-*-aix5.[01])
+ targ_defvec=aix5coff64_vec
+ targ_selvecs="rs6000coff_vec"
+ want64=true
+ ;;
+ #endif
powerpc-*-aix5*)
+ targ_cflags=-DAIX_WEAK_SUPPORT
targ_defvec=rs6000coff_vec
targ_selvecs="aix5coff64_vec"
want64=true
;;
#ifdef BFD64
powerpc64-*-aix5*)
+ targ_cflags=-DAIX_WEAK_SUPPORT
targ_defvec=aix5coff64_vec
targ_selvecs="rs6000coff_vec"
want64=true
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.144
diff -c -3 -p -r1.144 configure.in
*** gas/configure.in 11 Nov 2003 12:05:08 -0000 1.144
--- gas/configure.in 2 Dec 2003 16:09:16 -0000
*************** changequote([,])dnl
*** 404,410 ****
ppc-*-pe | ppc-*-cygwin*) fmt=coff em=pe ;;
ppc-*-winnt*) fmt=coff em=pe ;;
! ppc-*-aix5*) fmt=coff em=aix5 ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
--- 404,416 ----
ppc-*-pe | ppc-*-cygwin*) fmt=coff em=pe ;;
ppc-*-winnt*) fmt=coff em=pe ;;
! changequote(,)dnl
! ppc-*-aix5.[01]) fmt=coff em=aix5 ;;
! changequote([,])dnl
! ppc-*-aix5.*) fmt=coff em=aix5
! AC_DEFINE(AIX_WEAK_SUPPORT, 1,
! [Define if using AIX 5.2 value for C_WEAKEXT.])
! ;;
ppc-*-aix*) fmt=coff ;;
ppc-*-beos*) fmt=coff ;;
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
Index: binutils/configure.in
===================================================================
RCS file: /cvs/src/src/binutils/configure.in,v
retrieving revision 1.42
diff -c -3 -p -r1.42 configure.in
*** binutils/configure.in 16 May 2003 16:30:26 -0000 1.42
--- binutils/configure.in 2 Dec 2003 16:09:16 -0000
*************** changequote([,])dnl
*** 262,267 ****
--- 262,274 ----
BUILD_DLLTOOL='$(DLLTOOL_PROG)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
;;
+ changequote(,)dnl
+ powerpc*-aix5.[01])
+ changequote([,])dnl
+ ;;
+ powerpc*-aix5.*)
+ OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
+ ;;
powerpc*-*-pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"