aboutsummaryrefslogtreecommitdiff
path: root/gcc/collect2.c
diff options
context:
space:
mode:
authorPeter O'Gorman <pogma@thewrittenword.com>2009-09-27 15:19:59 +0000
committerPeter O'Gorman <pogma@thewrittenword.com>2009-09-27 15:19:59 +0000
commitcbc3487948d7821670b064ab32e9cdb85462ddfb (patch)
treebed31c0e70a9dc44cb819f3ec5c3ce371280265d /gcc/collect2.c
parent165e30503f7e7a91bbf03dbedd4eb627c227884a (diff)
collect2.c (main): Look for -brtl before adding libraries.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@152219 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r--gcc/collect2.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c
index b235f2bda84..82c400bbaaf 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"))
{