[gnu.g++.bug] ld++ only looks for libg++.a in /lib, /usr/lib, and /usr/local/lib

jim@cs.odu.edu (Jim Duncan) (11/03/88)

Making test0 failed because ld++ couldn't find libg++.a.  In ld.c, one can
add to the list of searched directories by defining DEFAULT_SEARCH_PREFIX.

> #ifndef DEFAULT_SEARCH_PREFIX
> #define DEFAULT_SEARCH_PREFIX
> #endif
> 
> /* Standard directories to search for files specified by -l.  */
> char *standard_search_dirs[] = {"/lib", "/usr/lib", "/usr/local/lib",
> DEFAULT_SEARCH_PREFIX};

The following change to the Makefile causes ld++ to know where to look for
libg++.a :

*** 111,117
  
  ld.o: ld.c
  #	uncomment the following line for Sun 3's
! #	$(CC) -Dmc68020 -DSUN3=3 -DTARGET=SUN3 -c $(PROFILE) $(CFLAGS) ld.c
  #	uncomment the following line for Sun 2's
  #	$(CC) -Dmc68010 -c $(PROFILE) $(CFLAGS) ld.c
  #	uncomment the following line for Sun 4's

--- 111,117 -----
  
  ld.o: ld.c
  #	uncomment the following line for Sun 3's
! 	$(CC) -Dmc68020 -DSUN3=3 -DTARGET=SUN3 -DDEFAULT_SEARCH_PREFIX=\"$(libdir)\" -c $(PROFILE) $(CFLAGS) ld.c
  #	uncomment the following line for Sun 2's
  #	$(CC) -Dmc68010 -c $(PROFILE) $(CFLAGS) ld.c
  #	uncomment the following line for Sun 4's
***************

 Jim Duncan, Computer Science Dept, Old Dominion Univ, Norfolk VA 23529-0162
       (804)683-3915     INET: jim@cs.odu.edu    UUCP: ..!uunet!xanth!jim
	    "This could be good or bad."  Who said it?  Which RFC?