]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR go/61496 (Many Go tests FAIL with ld warning about go$zerovalue)
authorIan Lance Taylor <iant@google.com>
Fri, 13 Jun 2014 22:30:47 +0000 (22:30 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 13 Jun 2014 22:30:47 +0000 (22:30 +0000)
PR go/61496
* gospec.c (lang_specific_driver): On Solaris, when not using GNU
ld, add -t option to avoid warning about common symbol changing
size.

From-SVN: r211658

gcc/go/ChangeLog
gcc/go/gospec.c

index 16d13409cde4f7b28f336e996dde443cd3d2a3d4..6b535851d6d834c205435d793a66d4310fc115a4 100644 (file)
@@ -1,3 +1,10 @@
+2014-06-13  Ian Lance Taylor  <iant@google.com>
+
+       PR go/61496
+       * gospec.c (lang_specific_driver): On Solaris, when not using GNU
+       ld, add -t option to avoid warning about common symbol changing
+       size.
+
 2014-06-10  Jan Hubicka  <hubicka@ucw.cz>
 
        * go/go-gcc.cc (Gcc_backend::global_variable_set_init): Use
index 02d5842352f594b0b53fff0dd28b823871ae289e..8b2d8afda72d119906b62fd0f077ef6872f9d83c 100644 (file)
@@ -395,6 +395,15 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
     }
 #endif
 
+#if defined(TARGET_SOLARIS) && !defined(USE_GLD)
+  /* We use a common symbol for go$zerovalue.  On Solaris, when not
+     using the GNU linker, the Solaris linker needs an option to not
+     warn about this.  Everything works without this option, but you
+     get unsightly warnings at link time.  */
+  generate_option (OPT_Wl_, "-t", 1, CL_DRIVER, &new_decoded_options[j]);
+  j++;
+#endif
+
   *in_decoded_options_count = j;
   *in_decoded_options = new_decoded_options;
   *in_added_libraries = added_libraries;