Rainer Emrich wrote:
I try to build a cross compiler host x86_64-unknown-linux-gnu -> target
hppa64-hp-hpux11.00 using gcc trunk.
I run into the next issue.
/usr/lib/pa20_64/milli.a is tried to be linked directly instead be searched in
the sysroot.
- --with-sysroot=/opt/tec/setup/sys-root/HP-UX/hppa64-hp-hpux11.00/B.1100
#include <...> search starts here:
/SCRATCH/tmp.ZgrMRs8582/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/gcc-4.4.0/gcc-4.4.0/./gcc/include
/SCRATCH/tmp.ZgrMRs8582/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/gcc-4.4.0/gcc-4.4.0/./gcc/include-fixed
/opt/tec/setup/sys-root/HP-UX/hppa64-hp-hpux11.00/B.11.00/usr/include
End of search list.
/SCRATCH/tmp.ZgrMRs8582/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/gcc-4.4.0/gcc-4.4.0/./gcc/collect2
- --sysroot=/opt/tec/setup/sys-root/HP-UX/hppa64-hp-hpux11.00/B.11.00 -E -u main
- -u __cxa_finalize
/opt/tec/setup/sys-root/HP-UX/hppa64-hp-hpux11.00/B.11.00/usr/lib/pa20_64/crt0.o
/SCRATCH/tmp.ZgrMRs8582/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/gcc-4.4.0/gcc-4.4.0/./gcc/crtbegin.o
-
-L/SCRATCH/tmp.ZgrMRs8582/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/gcc-4.4.0/gcc-4.4.0/./gcc
-
-L/opt/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/cross/HP-UX/hppa64-hp-hpux11.00/B.11.00/gcc-4.4.0/hppa64-hp-hpux11.00/bin
-
-L/opt/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/cross/HP-UX/hppa64-hp-hpux11.00/B.11.00/gcc-4.4.0/hppa64-hp-hpux11.00/lib
- -L/opt/tec/setup/sys-root/HP-UX/hppa64-hp-hpux11.00/B.11.00/lib/pa20_64
- -L/opt/tec/setup/sys-root/HP-UX/hppa64-hp-hpux11.00/B.11.00/usr/lib/pa20_64
/tmp/ccMHuJkh.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lgcc_stub
/usr/lib/pa20_64/milli.a
/SCRATCH/tmp.ZgrMRs8582/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/gcc-4.4.0/gcc-4.4.0/./gcc/crtend.o
/opt/gnu/cross-gcc/Linux/x86_64-unknown-linux-gnu/openSUSE_10.3/cross/HP-UX/hppa64-hp-hpux11.00/B.11.00/gcc-4.4.0/bin/hppa64-hp-hpux11.00-ld:
/usr/lib/pa20_64/milli.a: No such file: No such file or directory
collect2: ld returned 1 exit status
The target config header 'gcc/config/pa/pa64-hpux.h' (in gcc-4.3.2)
has :
/* The libgcc_stub.a and milli.a libraries need to come last. */
#undef LINK_GCC_C_SEQUENCE_SPEC
#define LINK_GCC_C_SEQUENCE_SPEC "\
%G %L %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}\
/usr/lib/pa20_64/milli.a}}"
so this absolute pathname will be given to the linker and it should
interpret it as '$sysroot/usr/lib/pa20_64/milli.a' I think... But
should the '--with-sysroot=$sysroot' do this? Or only with usual
things like the 'crt*.o', the libraries etc ? Maybe putting only
the bare 'milli.a' there, assuming a '-L/usr/lib/pa20_64' in the
native case and a '-L$sysroot/usr/lib/pa20_64' in the cross case,
on the link command line, could be the required 'fix'...