diff options
author | bde <bde@FreeBSD.org> | 1997-04-11 17:08:56 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-04-11 17:08:56 +0000 |
commit | f160e6fb7ea066c893e41cbcfe28c523076b1ebc (patch) | |
tree | f388ea21ba12fee31ce6d368076a54a3ece645df /gnu | |
parent | 3aa8204279022673e2958fd270d39bc8ab0c277a (diff) | |
download | FreeBSD-src-f160e6fb7ea066c893e41cbcfe28c523076b1ebc.zip FreeBSD-src-f160e6fb7ea066c893e41cbcfe28c523076b1ebc.tar.gz |
Don't print nonexistent library names for `ld -f [-Lfoo] -lbar'. A
dependency on `bar' is very unlikely to be correct.
This is a quick fix for broken dependencies in gdb and many other
places. The dependencies on internal libraries are now missing
instead of wrong when `make depend' is run before the libraries
are created.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/ld/ld.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index fb2baac..a429e26 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)ld.c 6.10 (Berkeley) 5/22/91"; Set, indirect, and warning symbol features added by Randy Smith. */ /* - * $Id: ld.c,v 1.41 1997/02/22 15:46:20 peter Exp $ + * $Id: ld.c,v 1.42 1997/03/22 02:59:40 jdp Exp $ */ /* Define how to initialize system-dependent header fields. */ @@ -3798,7 +3798,15 @@ list_files() error = 1; else close(fd); - printf("%s\n", entry->filename); + + /* + * Print the name even if the file doesn't exist except in + * the -lfoo case. This allows `ld -f' to work as well as + * possible when it is used to generate dependencies before + * the libraries exist. + */ + if (fd >= 0 || !(entry->flags & E_SEARCH_DIRS)) + printf("%s\n", entry->filename); } exit(error); } |