Fix for using 'link'

Peter Naulls peter at chocky.org
Tue Oct 15 09:11:37 PDT 2002



It seems no one has tried (and reported) setting gcc$linker in a long
time.   ld passes "-quiet" to it, which it gets upset over.  

This also includes a patch to ignore -lpthread as it does -lc and -lm

Fix follows:

Index: riscos-aof/ld/ld.c
===================================================================
RCS file: /usr/local/cvsroot/gccsdk/riscos-aof/ld/ld.c,v
retrieving revision 1.7.2.12
diff -u -r1.7.2.12 ld.c
--- riscos-aof/ld/ld.c	5 Aug 2002 08:53:05 -0000	1.7.2.12
+++ riscos-aof/ld/ld.c	15 Oct 2002 15:57:56 -0000
@@ -1554,7 +1555,8 @@
 {
   llist *list = libraries;
 
-  if (strcmp (library, "m") == 0 || strcmp (library, "c") == 0)
+  if (strcmp (library, "m") == 0 || strcmp (library, "c") == 0 ||
+      strcmp (library, "pthread") == 0)
     {
       if (tlink_verbose >= 2)
 	printf ("Library lib%s was specified. Ignoring it\n", library);
@@ -1901,7 +1903,7 @@
 	}
     }
 
-  if (! (a & 1))
+  if (! (a & 1) && !getenv ("GCC$Linker"))
     add_option ("-quiet");
   if (! (a & 2))
     add_option ("-rescan");



-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 Homepage                     -  http://www.chocky.org/
 RISC OS C Programming        -  http://www.riscos.info/
 Unix Programs on RISC OS     -  http://www.chocky.org/unix/
------------------------------------------------------------------------
AcornSearch - http://www.acornsearch.com/ - Relevant RISC OS searches



More information about the gcc mailing list