This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Add to default SEARCH_DIR paths (For a .o, not a .so)
- From: Michael Darling <darlingm at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 21 May 2015 20:57:19 -0400
- Subject: Add to default SEARCH_DIR paths (For a .o, not a .so)
- Authentication-results: sourceware.org; auth=none
When using ld 2.24 binary or 2.25.51.20150521 (binutils-gdb.git), I am
getting this error when compiling using gcc 6.0.0 20150521 (git
master):
/..//bin/ld: cannot find crtbeginS.o: No such file or directory
crtbeginS.o exists at
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/crtbeginS.o
(installed from GCC git master)
Tried adding that directory to ldconfig, but it didn't pick up any
additional libraries. (Thinking since it's a .o rather than .so)
Running ld --verbose | grep SEARCH_DIR shows:
SEARCH_DIR("/usr/local/x86_64-unknown-linux-gnu/lib64");
SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64");
SEARCH_DIR("/usr/lib64");
SEARCH_DIR("/usr/local/x86_64-unknown-linux-gnu/lib");
SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib");
SEARCH_DIR("/usr/lib");
The directory above where crtbeginS.o exists is not listed here.
How do I add it to show up as a default, so I don't have to give -L to
everything I ever build?
gcc -print-search-dirs | grep x86 does show the
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/ directory