From 4f52cde87f955454b2e06e9bdf431306f8f61fe8 Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 13 Sep 1999 15:50:16 +0000 Subject: Merge from ../egcs/gcc/gcc.c rev.1.5: Don't exclude directories that the linker is "known" to search (/lib and /usr/lib) when deciding whether to pass certain paths to the linker. Under FreeBSD, the linker is actually known to never search /lib and to only search /usr/lib in the elf case. Not passing the paths causes at best causes confusing differences for cross compiling. This change is conditional on FREEBSD_NATIVE but should be absolute. --- contrib/gcc/gcc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib') diff --git a/contrib/gcc/gcc.c b/contrib/gcc/gcc.c index 8780ddf..bcf0c4e 100644 --- a/contrib/gcc/gcc.c +++ b/contrib/gcc/gcc.c @@ -21,6 +21,8 @@ Boston, MA 02111-1307, USA. This paragraph is here to try to keep Sun CC from dying. The number of chars here seems crucial!!!! */ +/* $FreeBSD$ */ + /* This program is the user interface to the C compiler and possibly to other compilers. It is used because compilation is a complicated procedure which involves running several programs and passing temporary files between @@ -4680,6 +4682,7 @@ is_directory (path1, path2, linker) *cp++ = '.'; *cp = '\0'; +#ifndef FREEBSD_NATIVE /* Exclude directories that the linker is known to search. */ if (linker && ((cp - path == 6 @@ -4690,6 +4693,7 @@ is_directory (path1, path2, linker) dir_separator_str, "lib", dir_separator_str, ".", NULL_PTR)) == 0))) return 0; +#endif /* FREEBSD_NATIVE */ return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode)); } -- cgit v1.1