Comment 4 for bug 923779

Revision history for this message
Wookey (wookey) wrote :

Before this path the default linker script had:
armel:
SEARCH_DIR("/usr/arm-linux-gnueabi/lib");
amd64:
SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/local/lib64"); S$

with this patch the search dir is:
armel:
SEARCH_DIR("/usr/arm-linux-gnueabi/lib"); SEARCH_DIR("/lib/arm-linux-gnueabi"); SEARCH_DIR("/usr/lib/arm-linux-gnueabi");
amd64:
SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/local/lib64"); S$

I think the correct search path should be:
 SEARCH_DIR("/lib/arm-linux-gnueabi"); SEARCH_DIR("/usr/lib/arm-linux-gnueabi");SEARCH_DIR("/usr/arm-linux-gnueabi/lib");
(i.e so multiarch dirs are searched before the 'classic cross-build' path.

This solves the immediate problem that native and cross behaviour are different, but I'm concerned that in fact neither of them are doing it right.

If main has symbols in libhi and libhi has symbols in liblo, but main does not have symbols in liblo, then libhi is a build-dep of main but liblo is not. Liblo is a build-dep of libhi. And binutils should be able to link main without liblo being present.

So far as I can see that's not currently happenning. Unless I am misunderstanding something.