This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cross-compile on linux for HPUX (B.11.00 U 9000/800)


Corrado Giacomini wrote:
> 
> I would like to setup a cross environment on a linux machine to be able to
> cross compile on it for a HP-UX machine.

 If the toolset can be built natively using GNU, both binutils and GCC, there
are good chances that the same can be done as cross-tools. But if either the
native 'as' or 'ld' is obligatory, a full cross-toolset is impossible.

 So 'cross compile' should be 100% possible in the strict meaning, while cross-
assembling and cross-linking are questionable.
 
> I would like to know if some of you in the mailing list ha already
> succeded in doing that
> i if they have some hints or references where i can look for help.

 The binutils for HPUX seem to need to use something called 'som' as/in the object
format, for which the definitions are only in the HPUX-target headers. When binutils
will be built using only the host headers, the host being the same as the target, ie.
when producing native tools, is the easy case. For other hosts the needed definitions
must be extracted from the HPUX-headers...

 If the 'som'-definitions in the HPUX-headers would be the only problem, and extracting
them into some 'host-independent' headers coming with the GNU binutils would succeed
somehow (legally), the situation could be better than it is now... Anyway this has not
been done yet :

-------------------- clip from bfd/som.h -----------------------------
#ifndef _SOM_H
#define _SOM_H

#include "libhppa.h"

#include <a.out.h>
#include <lst.h>
#include <ar.h>

/* The SOM BFD backend doesn't currently use anything from these
   two include files, but it's likely to need them in the future.  */
#ifdef R_DLT_REL
#include <shl.h>
#include <dl.h>
#endif
-------------------- clip --------------------------------------------

 What the HPUX-headers 'lst.h', 'shl.h' and 'dl.h' have and why it hasn't extracted into
some 'somstuff.h' coming with binutils, like something into the 'libhppa.h', is unknown
to me...

 Whether any HPUX-specific libraries will be needed because of some functions to handle
the 'som' format, when producing the executables for GNU binutils, is also unknown...

 So here were the problems in their simpicity, but getting simple answers from the people
using HPUX to the following questions:

 1. Can the definitions from the HPUX-headers be legally extracted and be put into 'free'
    headers coming with the GNU binutils sources somehow ?

 2. Are the extracted definitions enough, or will any HPUX-specific functions be needed
    when building GNU binutils for HPUX ?  (This would make other hosts than HPUX being
    impossible -- they cannot link against or run the needed HPUX-binaries)

has been vain this far... This has been asked on NGs quite often when someone has got the
idea about producing cross-tools for HPUX...

 Anyway the HPUX-headers and libraries must be available, otherwise it will be easiest to
forget the whole project.  Are these available somewhere, like the SGI libs and headers
for IRIX 6.2 - IRIX 6.4 at 'http://www.sgi.com/developers/devtools/apis/idf_idl.htm' ?

> In particular I have a HPUX B.11.00 U 9000/800 machine, I have downloaded
> binutils-2.12.tar.gz and gcc-3.0.4.tar.gz  Ialso tried to configure  and
> compiled them but I am little bet confused about which target and host I should
> provide to the configure script for the kind hpux i have.

 Don't know much about the HPPAs, but it seems there being three CPU-types: 'hppa1.0',
'hppa1.1' and 'hppa2' for the 'cpu'-part of the target name. You must know the one used
in your '9000/800'...

 The 'B.11.00' probably means the 'opsys'-part being 'hpux11.0', so the target name could
be 'hppa1.0-hpux11.0', 'hppa1.1-hpux11.0' or 'hppa2-hpux11.0' depending on the CPU-type...

 It can also be that you have a 64-bit 'hppa64' CPU and a 64-bit HPUX, then all the previous
was vain and using the ELF-format there, all the problems with 'som' can be forgotten...

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]