public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Allow use of GNU ld on AIX
@ 2011-10-16 13:18 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2011-10-16 13:18 UTC (permalink / raw)
  To: gcc-patches; +Cc: Tristan Gingold

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

Reorder chunks in link.c so that the correct configuration is selected when
compiling with --with-gnu-ld on AIX.
No change in behaviour.

Note that in particular it's important that we use native AIX switches even
when using GNU ld.  This is important with response files as they must be
interpreted by collect2.

2011-10-16  Tristan Gingold  <gingold@adacore.com>

	* link.c (_AIX): Add support for GNU ld.


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 2044 bytes --]

Index: link.c
===================================================================
--- link.c	(revision 179984)
+++ link.c	(working copy)
@@ -152,18 +152,6 @@
 unsigned char __gnat_separate_run_path_options = 0;
 const char *__gnat_default_libgcc_subdir = "lib";
 
-#elif defined (_AIX)
-const char *__gnat_object_file_option = "-Wl,-f,";
-const char *__gnat_run_path_option = "";
-int __gnat_link_max = 15000;
-const unsigned char __gnat_objlist_file_supported = 1;
-char __gnat_shared_libgnat_default = STATIC;
-char __gnat_shared_libgcc_default = STATIC;
-unsigned char __gnat_using_gnu_linker = 0;
-const char *__gnat_object_library_extension = ".a";
-unsigned char __gnat_separate_run_path_options = 0;
-const char *__gnat_default_libgcc_subdir = "lib";
-
 #elif defined (__FreeBSD__)
 const char *__gnat_object_file_option = "";
 const char *__gnat_run_path_option = "-Wl,-rpath,";
@@ -204,12 +192,27 @@
 const char *__gnat_default_libgcc_subdir = "lib";
 #endif
 
+#elif defined (_AIX)
+/* On AIX, even when with GNU ld we use native linker switches.  This is
+   particularly important for '-f' as it should be interpreted by collect2.  */
+
+const char *__gnat_object_file_option = "-Wl,-f,";
+const char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = STATIC;
+char __gnat_shared_libgcc_default = STATIC;
+int __gnat_link_max = 15000;
+const unsigned char __gnat_objlist_file_supported = 1;
+unsigned char __gnat_using_gnu_linker = 0;
+const char *__gnat_object_library_extension = ".a";
+unsigned char __gnat_separate_run_path_options = 0;
+const char *__gnat_default_libgcc_subdir = "lib";
+
 #elif (HAVE_GNU_LD)
 /*  These are the settings for all systems that use gnu ld. GNU style response
     file is supported, the shared library default is STATIC.  */
 
+const char *__gnat_object_file_option = "";
 const char *__gnat_run_path_option = "";
-const char *__gnat_object_file_option = "";
 char __gnat_shared_libgnat_default = STATIC;
 char __gnat_shared_libgcc_default = STATIC;
 int __gnat_link_max = 8192;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-16 12:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-16 13:18 [Ada] Allow use of GNU ld on AIX Arnaud Charlet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).