This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.1 PATCH: Silence Tru64 UNIX ld warnings


As Roger Sayle kindly pointed out, passing -S to the Tru64 UNIX ld early in
the command line disables the obnoxious `weak symbol multiply defined'
warnings.

The following patch implements this.

Bootstrapped without regressions on alpha-dec-osf5.1.  This fixed

-FAIL: g++.dg/special/conpr-3.C (test for excess errors)
-FAIL: g++.dg/special/conpr-3.C (test for excess errors)
-FAIL: g++.pt/instantiate5.C (test for excess errors)
-FAIL: gcc.dg/struct-by-value-1.c (test for excess errors)

The only remaining instances of this warning during the build stem from an
explicit ld -r invocation by libtool to create intermediate relocatable
object files while constructing libgcj.so.

Ok for branch and mainline?

	Rainer


Wed Mar 27 20:00:42 2002  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* config/alpha/osf.h (LINK_SPEC): Pass -S to silence ld warnings.

Index: gcc/config/alpha/osf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/osf.h,v
retrieving revision 1.22.14.1
diff -u -p -r1.22.14.1 osf.h
--- osf.h	2002/03/22 22:49:39	1.22.14.1
+++ osf.h	2002/03/27 19:29:04
@@ -57,12 +57,13 @@ Boston, MA 02111-1307, USA.  */
  %{threads: -lpthreads} %{pthread|threads: -lpthread -lmach -lexc} -lc"
 
 /* Pass "-G 8" to ld because Alpha's CC does.  Pass -O3 if we are
-   optimizing, -O1 if we are not.  Pass -shared, -non_shared or
+   optimizing, -O1 if we are not.  Pass -S to silence `weak symbol
+   multiply defined' warnings.  Pass -shared, -non_shared or
    -call_shared as appropriate.  Pass -hidden_symbol so that our
    constructor and call-frame data structures are not accidentally
    overridden.  */
 #define LINK_SPEC  \
-  "-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \
+  "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
    %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \
    %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}"
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]