PATCH: ld testsuite failures
H. J. Lu
hjl@lucon.org
Tue May 20 16:35:00 GMT 2003
On Tue, May 20, 2003 at 04:59:33PM +0930, Alan Modra wrote:
> HJ,
> Since your 2003-05-15 ld_simple_link $CC change, I'm seeing failures
> like the following:
>
> /usr/tmp/gas/x86/ld/tmpdir/ld/ld: cannot find -lc
> collect2: ld returned 1 exit status
> FAIL: visibility (hidden) (non PIC, load offset)
> [snip more visibility failures]
>
> /usr/tmp/gas/x86/ld/tmpdir/ld/ld: cannot find -lc
> collect2: ld returned 1 exit status
> FAIL: shared (non PIC, load offset)
>
> The problem is that the failing tests use -T $srcdir/$subdir/elf-offset.ld,
> and elf-offset.ld doesn't specify SEARCH_DIR. On my system, ld.so.conf
> doesn't specify the default dirs of /lib and /usr/lib, and I'm building
> binutils with --prefix=/usr/local
>
How about this? I am not too happy about it since it only covers
native targets, which is sufficient since I only used CC with
default_ld_simple_link on native targets. It won't work CC on cross
targets. Only genscripts.sh knows what directories should be searched.
But I couldn't find a easy way to pass it to Makefile.
H.J.
-------------- next part --------------
ld/
2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.am (check-DEJAGNU): Also pass NATIVE_LIB_DIRS.
* Makefile.in: Regenerated.
ld/testsuite/
2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
* lib/ld-lib.exp (default_ld_simple_link): Add NATIVE_LIB_DIRS
for native targets.
--- ld/Makefile.am.libdir 2003-05-14 16:23:11.000000000 -0700
+++ ld/Makefile.am 2003-05-20 08:04:31.000000000 -0700
@@ -1421,6 +1421,7 @@ check-DEJAGNU: site.exp
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
+ NATIVE_LIB_DIRS="$(NATIVE_LIB_DIRS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
--- ld/testsuite/lib/ld-lib.exp.libdir 2003-05-18 21:48:13.000000000 -0700
+++ ld/testsuite/lib/ld-lib.exp 2003-05-20 08:15:58.000000000 -0700
@@ -167,6 +167,14 @@ proc default_ld_simple_link { ld target
set flags ""
}
+ if [isnative] {
+ global NATIVE_LIB_DIRS
+
+ foreach dir $NATIVE_LIB_DIRS {
+ set flags "-L$dir $flags"
+ }
+ }
+
# If we are compiling with gcc, we want to add gcc_ld_flag to
# flags. Rather than determine this in some complex way, we guess
# based on the name of the compiler.
More information about the Binutils
mailing list