Kai Ruottu wrote:
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

/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'...

... or as a workaround the 'milli.a' being renamed to 'libmilli.a' in
the copied libraries for a cross GCC, after which its handling would
be just like usual 'lib*.a' stuff. The spec then being:

 #define LINK_GCC_C_SEQUENCE_SPEC "\
   %G %L %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}\
   -lmilli}}"

for a crosscompiler. The separate case choices:

#ifndef CROSS_DIRECTORY_STRUCTURE
...
#else
...
#endif

then being necessary. Weird name for a library, 'milli.a' in any case...

Reply via email to