Gold was hard-coded to search "/lib" and "/usr/lib" directories at a
minimum. The "/lib" directory was removed and a prefix was passed
via CFLAGS to use a different default library path for the cross-tool
version.
Local modifications applied to following files:
binutils/arlex.1
bfd/bfdver.h (new)
+ gold/options.cc
gold/options.h
ld/ldlex.l
}
else if (!this->nostdlib())
{
- // Even if they don't specify it, we add -L /lib and -L /usr/lib.
- // FIXME: We should only do this when configured in native mode.
- this->add_to_library_path_with_sysroot("/lib");
- this->add_to_library_path_with_sysroot("/usr/lib");
+ this->add_to_library_path_with_sysroot(USRDATA_PREFIX "/usr/lib");
}
// Parse the contents of -retain-symbols-file into a set.
CFLAGS+= -DGOLD_DEFAULT_SIZE=${GOLD_DEFAULT_SIZE}
CFLAGS+= -DBINDIR="\"${TOOLS_PREFIX}${BINDIR}\""
CFLAGS+= -DTOOLBINDIR="\"${TOOLS_PREFIX}${BINDIR}\""
+CFLAGS+= -DUSRDATA_PREFIX="\"${USRDATA_PREFIX}\""
CFLAGS+= -I. -I${.CURDIR}
CFLAGS+= -I${SRCDIR}/gold
CFLAGS+= -I${SRCDIR}/include -I${SRCDIR}/elfcpp