On Fri, Aug 23, 2024 at 9:18 AM Gerald Pfeifer <ger...@pfeifer.com> wrote: > > On Thu, 22 Aug 2024, Andrew Pinski wrote: > > With newer ld, the default search library path does not include /usr/lib > > nor /lib but the driver decides to not pass -L down to the link for > > these and then in some/most cases libc is not found. > > This code dates from at least 1992 and it is done in a way which is not > > safe and does not make sense. So let's remove it. > > > > Bootstrapped and tested on x86_64-linux-gnu (which defaults to being a > > multilib). > > Also bootstrapped on x86_64-unknown-freebsd13.3 (this was originally > reported against the earlier x86_64-unknown-freebsd12.1) on a system > where I also ran into this in April.
OK if there are no objections until next week. Thanks, Richard. > > gcc/ChangeLog: > > > > PR driver/104707 > > PR driver/97304 > > > > * gcc.cc (is_directory): Don't not include /usr/lib and /lib > > for library directory pathes. Remove library argument. > > (add_to_obstack): Update call to is_directory. > > (driver_handle_option): Likewise. > > (spec_path): Likewise. > > For the ChangeLog, maybe use "Don't remove /usr/lib and /lib from library > directory paths" similar to the subject? > > (My brain originally "autocorrected" and contracted "Don't not"...) > > > Thank you for tackling this longer standing issue which has been rearing > its head again and again! > > Gerald