aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter O'Gorman <pogma@thewrittenword.com>2009-09-27 15:19:59 +0000
committerPeter O'Gorman <pogma@gcc.gnu.org>2009-09-27 15:19:59 +0000
commit88febe351918f2cb70edd3527febf3e06f588089 (patch)
treebed31c0e70a9dc44cb819f3ec5c3ce371280265d
parentaa58f943d88dfcb1d0d7609b62079269e318cf1d (diff)
downloadgcc-88febe351918f2cb70edd3527febf3e06f588089.zip
gcc-88febe351918f2cb70edd3527febf3e06f588089.tar.gz
gcc-88febe351918f2cb70edd3527febf3e06f588089.tar.bz2
collect2.c (main): Look for -brtl before adding libraries.
From-SVN: r152219
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/collect2.c29
2 files changed, 20 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b62d1e1..f516f0e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-25 Peter O'Gorman <pogma@thewrittenword.com>
+
+ collect2.c (main): Look for -brtl before adding libraries.
+
2009-09-19 Jonathan Gray <jsg@openbsd.org>
* config.gcc: Update OpenBSD targets.
diff --git a/gcc/collect2.c b/gcc/collect2.c
index b235f2b..82c400b 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -943,6 +943,22 @@ main (int argc, char **argv)
{
if (! strcmp (argv[i], "-debug"))
debug = 1;
+#ifdef COLLECT_EXPORT_LIST
+ /* since -brtl, -bexport, -b64 are not position dependent
+ also check for them here */
+ if ((argv[i][0] == '-') && (argv[i][1] == 'b'))
+ {
+ arg = argv[i];
+ /* We want to disable automatic exports on AIX when user
+ explicitly puts an export list in command line */
+ if (arg[2] == 'E' || strncmp (&arg[2], "export", 6) == 0)
+ export_flag = 1;
+ else if (arg[2] == '6' && arg[3] == '4')
+ aix64_flag = 1;
+ else if (arg[2] == 'r' && arg[3] == 't' && arg[4] == 'l')
+ aixrtl_flag = 1;
+ }
+#endif
}
vflag = debug;
}
@@ -1164,19 +1180,6 @@ main (int argc, char **argv)
{
switch (arg[1])
{
-#ifdef COLLECT_EXPORT_LIST
- /* We want to disable automatic exports on AIX when user
- explicitly puts an export list in command line */
- case 'b':
- if (arg[2] == 'E' || strncmp (&arg[2], "export", 6) == 0)
- export_flag = 1;
- else if (arg[2] == '6' && arg[3] == '4')
- aix64_flag = 1;
- else if (arg[2] == 'r' && arg[3] == 't' && arg[4] == 'l')
- aixrtl_flag = 1;
- break;
-#endif
-
case 'd':
if (!strcmp (arg, "-debug"))
{