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

2020-07-26 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Jul 26, 2020 at 4:02 AM Andreas Schwab wrote: > > On Jul 25 2020, Fāng-ruì Sòng wrote: > > > On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab > > wrote: > >> > >> On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > >> > >> > This is to mimick nearly lines. collect2 should filter out opt

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

2020-07-26 Thread Andreas Schwab
On Jul 25 2020, Fāng-ruì Sòng wrote: > On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab wrote: >> >> On Jul 24 2020, Fangrui Song via Gcc-patches wrote: >> >> > This is to mimick nearly lines. collect2 should filter out options like >> > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are ha

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

2020-07-25 Thread Fāng-ruì Sòng via Gcc-patches
On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab wrote: > > On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > > > This is to mimick nearly lines. collect2 should filter out options like > > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are handled by case > > 'f'. --ld-path needs its o

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

2020-07-25 Thread Andreas Schwab
On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > This is to mimick nearly lines. collect2 should filter out options like > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are handled by case 'f'. > --ld-path needs its own `else if`. If you handle --ld-path as -fld-path then you don't

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

2020-07-24 Thread Fangrui Song via Gcc-patches
4 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1077,7 +1077,7 @@ proper position among the other output files. */ LINK_PLUGIN_SPEC \ "%{flto|flto=*:%max_errors = value; break; +case OPT__ld_path_: case OPT_fuse_ld_bfd: case OPT_fuse_ld_gold: case OPT_fuse_ld_lld: >