aboutsummaryrefslogtreecommitdiff
path: root/gcc/collect2.c
diff options
context:
space:
mode:
authorRichard Sandiford <r.sandiford@uk.ibm.com>2009-06-02 19:06:56 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2009-06-02 19:06:56 +0000
commitdfb636dcd052f5f68ba6abf5b9041c3c63562438 (patch)
tree866fc7cba54f627d859513db2f05cc0ceeb96db2 /gcc/collect2.c
parent51136ae8188c4849ae4fb9451c26ef51f9801d7a (diff)
downloadgcc-dfb636dcd052f5f68ba6abf5b9041c3c63562438.zip
gcc-dfb636dcd052f5f68ba6abf5b9041c3c63562438.tar.gz
gcc-dfb636dcd052f5f68ba6abf5b9041c3c63562438.tar.bz2
Makefile.in (COLLECT2_OBJS): Add collect2-aix.o.
gcc/ * Makefile.in (COLLECT2_OBJS): Add collect2-aix.o. (collect2.o): Depend on collect2-aix.h. (collect2-aix.o): New rule. * collect2-aix.h: New file. * collect2-aix.c: Likewise. * collect2.c: Include collect2-aix.h. Don't undefine OBJECT_FORMAT_COFF if CROSS_AIX_SUPPORT is defined. Guard native includes with #ifndef CROSS_DIRECTORY_STRUCTURE. Use TARGET_AIX_VERSION instead of _AIX51. * config/rs6000/aix43.h (TARGET_AIX_VERSION): Define. * config/rs6000/aix51.h (TARGET_AIX_VERSION): Likewise. * config/rs6000/aix52.h (TARGET_AIX_VERSION): Likewise. * config/rs6000/aix53.h (TARGET_AIX_VERSION): Likewise. * config/rs6000/aix61.h (TARGET_AIX_VERSION): Likewise. From-SVN: r148096
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r--gcc/collect2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c
index a500147..660664d 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#define COLLECT
#include "collect2.h"
+#include "collect2-aix.h"
#include "demangle.h"
#include "obstack.h"
#include "intl.h"
@@ -54,7 +55,9 @@ along with GCC; see the file COPYING3. If not see
cross-versions are in the proper directories. */
#ifdef CROSS_DIRECTORY_STRUCTURE
+#ifndef CROSS_AIX_SUPPORT
#undef OBJECT_FORMAT_COFF
+#endif
#undef MD_EXEC_PREFIX
#undef REAL_LD_FILE_NAME
#undef REAL_NM_FILE_NAME
@@ -72,6 +75,7 @@ along with GCC; see the file COPYING3. If not see
#ifdef OBJECT_FORMAT_COFF
+#ifndef CROSS_DIRECTORY_STRUCTURE
#include <a.out.h>
#include <ar.h>
@@ -86,6 +90,7 @@ along with GCC; see the file COPYING3. If not see
#endif
#include <ldfcn.h>
+#endif
/* Some systems have an ISCOFF macro, but others do not. In some cases
the macro may be wrong. MY_ISCOFF is defined in tm.h files for machines
@@ -2409,7 +2414,7 @@ scan_libraries (const char *prog_name)
# define GCC_SYMZERO(X) 0
/* 0757 = U803XTOCMAGIC (AIX 4.3) and 0767 = U64_TOCMAGIC (AIX V5) */
-#ifdef _AIX51
+#if TARGET_AIX_VERSION >= 51
# define GCC_CHECK_HDR(X) \
((HEADER (X).f_magic == U802TOCMAGIC && ! aix64_flag) \
|| (HEADER (X).f_magic == 0767 && aix64_flag))