[PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

Martin Liška mliska@suse.cz
Mon May 25 09:57:34 GMT 2020


On 5/22/20 6:42 AM, Fangrui Song wrote:
> but I can't fix this one because joining two lines will break the 80-column rule.

What about this:

diff --git a/gcc/collect2.c b/gcc/collect2.c
index cc57a20e08b..e5b54b080f7 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1138,8 +1138,8 @@ main (int argc, char **argv)
        /* Search the ordinary system bin directories
  	 for `ld' (if native linking) or `TARGET-ld' (if cross).  */
        if (ld_file_name == 0)
-	ld_file_name =
-	  find_a_file (&path, full_ld_suffixes[selected_linker], X_OK);
+	ld_file_name
+	  = find_a_file (&path, full_ld_suffixes[selected_linker], X_OK);
      }
  
  #ifdef REAL_NM_FILE_NAME

Apart from that, the patch is fine.

Martin


More information about the Gcc-patches mailing list