Print this page
7319 Need a way to turn off ld "multiple inclusion" warnings
Reviewed by: Martin Bochnig <opensxce@mail.ru>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

@@ -23,10 +23,11 @@
  *      Copyright (c) 1988 AT&T
  *        All Rights Reserved
  *
  * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ * Copyright 2016 RackTop Systems.
  */
 
 /*
  * Processing of relocatable objects and shared objects.
  */

@@ -3238,12 +3239,13 @@
                                  * relocatable objects, and is true for shared
                                  * objects when they weren't specified via -l or
                                  * were dragged in as an implicit dependency),
                                  * then warn the user.
                                  */
-                                if ((flags & FLG_IF_CMDLINE) ||
-                                    (ifl->ifl_flags & FLG_IF_CMDLINE)) {
+                                if (((flags & FLG_IF_CMDLINE) ||
+                                    (ifl->ifl_flags & FLG_IF_CMDLINE)) &&
+                                    !(ofl->ofl_flags & FLG_OF_MULINCL)) {
                                         const char      *errmsg;
 
                                         /*
                                          * Determine whether this is the same
                                          * file name as originally encountered