public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* right snapshot to use for HP-UX 11?
@ 2000-11-21  9:14 Will Partain
  0 siblings, 0 replies; 2+ messages in thread
From: Will Partain @ 2000-11-21  9:14 UTC (permalink / raw)
  To: gcc-help

Folks, the current GCC docs say:

    GCC 2.95.2 does not support HP-UX 11, and it cannot
    generate 64-bit object files. Current (as of late 2000)
    snapshots and GCC 3.0 do support HP-UX 11.

Can anyone out there supply values for M and N in the
following sentence: "I have been using GCC snapshot M with
binutils snapshot N on HP-UX 11 with some success, including
for C++; YMMV and no warranty expressed or implied... :-)" ?

[Simply grabbing the latest snapshot(s) is probably unwise,
because the recent V3 C++ ABI landing has shaken things up a
bit (as I understand it).]

I will summarize the replies if an "answer"
emerges... Thanks,

Will

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: right snapshot to use for HP-UX 11?
@ 2000-11-22  3:50 Markus Werle
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Werle @ 2000-11-22  3:50 UTC (permalink / raw)
  To: Will Partain, gcc-help

Will Partain wrote:

> Can anyone out there supply values for M and N in the
> following sentence: "I have been using GCC snapshot M with
> binutils snapshot N on HP-UX 11 with some success, including
> for C++; YMMV and no warranty expressed or implied... :-)" ?

I have been using a GCC snapshot fetched on 2000 Nov 17
(seems to be 20001113, see my specs) with
binutils snapshot from the same day or some days later on HP-UX 11
with success for C++.

g++ -v yields:

Reading specs from
/work/markus/opt/egcs-001117/lib/gcc-lib/hppa2.0w-hp-hpux11.00/2.97/specs

Configured with: ../egcs/configure --prefix=/work/markus/opt/egcs-001117
--enable-languages=c++ --with-gnu-as --without-gnu-ld
--disable-libstdcxx-v3
gcc version 2.97 20001113 (experimental)

This means: It is a 32 bit version and relies on the hp-linker /bin/ld
which takes 200 years to link a 50MB binary (sad enough: My project
is compiled faster on a 80686 PC with 128M memory than on a
hp-J7000 with 4 processors (gmake -j8) and 4GB(!) memory)

It was - as we say in german (do not know if this idiom is allowed in
eglish) -
a hard birth. A lot of tears to dry. November 17, 2000 was the first day

since my tries in January 2000 where everything was fine with gcc on
hpux-11.0, even the linker accepted all stuff
(though I heard people say there were versions which did the job before)

If You subscribe to
        binutils-cvs@sourceware.cygnus.com
You will see that they are working on the elf-64bit
version for hpux which has its own linker
(things are getting better from day to day).


Some tricks:

* My bootstrap is 4-fold:
I used a bootstrapped egcs to build egcs again.

* binutils are configured with the same prefix
as egcs, and installed there before bootstrapping egcs
(do not forget to add /your/path/to/egcs/and/binutils/bin to
$PATH *before* configuring)

*Before the second bootstrap I rebuild binutils with
the new egcs and a new prefix /my/opt/egcs-today-2
(adding that one to $PATH again)

*I used gmake-3.79 (I built it myself with cc, if I remember well)

*gmake or Makefiles are broken in such a way that gmake -j <Number>
fails.
    This means the impatient (like me) will not obtain any result with
gmake option -j

The following procedure worked for me
(cvs logins omitted see gcc.gnu.org and sources.redhat.com for details)

alias md=mkdir

md BINUTILS
cd BINUTILS
cvs -z 9 -d :pserver:anoncvs@anoncvs.cygnus.com:/cvs/src checkout
binutils
md build
cd build
../src/configure --prefix=/my/path/to/egcs-1 --with-gnu-as

gmake
gmake install

cd ../..

md GCC
cd GCC
cvs -d :pserver:anoncvs@anoncvs.cygnus.com:/cvs/gcc -z 9 checkout egcs

cd egcs
./contrib/gcc_update
cd ..

md build
cd build
setenv PATH my/path/to/egcs-1/bin:$PATH
../egcs/configure --prefix=/my/path/to/egcs-1 \
--enable-languages=c++ --with-gnu-as --without-gnu-ld \
--disable-libstdcxx-v3

(note: I had bootstrap failures without --disable-libstdcxx-v3,
see my other messages in gcc mailing lists)

gmake bootstrap
gmake all
gmake install

(make sure the new g++ is called, so maybe:)

rehash
which gcc

(now binutils are built using brand new g++
since PATH is already set to the right value)

cd ../../BINUTILS
md build2
cd build2
../src/configure --prefix=/my/path/to/egcs-2 --with-gnu-as
gmake
gmake install

cd ../../GCC
md build2
cd build2
setenv PATH my/path/to/egcs-2/bin:$PATH
../egcs/configure --prefix=/my/path/to/egcs-2\
--enable-languages=c++ --with-gnu-as --without-gnu-ld \
--disable-libstdcxx-v3

gmake bootstrap
gmake all
gmake install

cd /my/test/directory
/my/path/to/egcs-2/bin/g++ HelloWorld.C


You see, it is sooooooooooooo easy to build a new g++ :-)
Maybe You take a look at directory contrib in the egcs tree.
I think I saw a script which may help against wounded fingers
but I did not have the time to examine it.

Do not forget to put
extern "C" {
    #include "Some_C_or_FORTRAN_Project.h"
}
around all headers from libraries with C-linkage
(e.g. compiled with cc)
otherwise the linker will not find the symbols
(--> new ABI in g++)


Good luck,


Markus



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-22  3:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-21  9:14 right snapshot to use for HP-UX 11? Will Partain
2000-11-22  3:50 Markus Werle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).