public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: h.m.brand@hccnet.nl (H.Merijn Brand)
Cc: gcc@gcc.gnu.org, bug-binutils@gnu.org
Subject: Re: gcc-64 on HP-UX 11.00
Date: Fri, 05 Apr 2002 09:19:00 -0000	[thread overview]
Message-ID: <200204051606.g35G6Muo013807@hiauly1.hia.nrc.ca> (raw)
In-Reply-To: <20020405144639.D6DB.H.M.BRAND@hccnet.nl> from "H.Merijn Brand" at Apr 5, 2002 02:49:27 pm

> > Can you be more specific?  I think that once you get a good set of tools
> > installed you won't have any trouble building 64bit gcc.  This is not to
> 
> Then my tools are probably no good ;)

From your comments below, I would say they are incorrectly installed.

> 
> > say that that there aren't lots of issues with hppa64 but I am not having
> > problems doing builds anymore.
> 
> But you might have /more/ GNU stuff installed in default locations than I h=
> ave.
> For example, in the configuration I'll show shortly, it barfs on unsatisfie=
> d
> symbol '__umoddi3', which can be found in libgcc.a, which I do not have
> installed in a default location, and since I'm building with HPc, it won't
> find it without hints. Now if I set LDFLAGS=3D"-L/usr/local/pa20_64/lib -lg=
> cc"

If you use HP cc, libgcc.a should not be needed.  It gets built in stage1
by ./xgcc and then installed with the compiler.

You need to select a prefix to install your 64-bit tools in (e.g., /opt/gnu64).
The prefix can be anywhere but I keep the 64-bit stuff separate from 32-bit
som stuff.  I build and install my 64-bit binutils tools to the same
directory and have /opt/gnu64/bin as the first component in PATH to ensure
that 64-bit tools are used when I do a 64-bit build.

You should not have to play with LDFLAGS to bootstrap the compiler.

Regarding tools, suggest using GNU make.  You should install a 64-bit
versions of binutils.  It may also be useful to build bash, bison, gawk,
texinfo, perl, sed, and possibly autoconf (2.13).  You can build these
with either the HP compiler or 32-bit gcc.

> where libgcc can be found in my situation, it is put *before* the libs, mak=
> ing
> the needed symbols unfindable, so I commented out LDFLAGS and put in
> LIBS=3D/usr/local/pa20_64/lib/libgcc.a
> 
> FYI when reading on, /usr/local/pa20_64 is a symlink to /wrk/pa20_64 becaus=
> e
>     that LV has more space to play with.
> 
> > > I've got
> > >=20
> > >	The latest HP-UX 11.00 with the latest patches
> > > 	The latest C compiler (B.11.11.04 HP C/ANSI C Compiler)
> > > 	Several ports of gcc
> > > 		3.0.4/32
> > > 		3.0.1/64
> > > 		3.0.2/64
> > > 	binutils-2.11.90/64
> > > 	binutils-2.12/64
> >=20
> > Here are my suggestions.  Use the latest binutils.  It has fixes that
> > affect hppa64.  Don't use 2.11.90.  Build it with the HP ANSI compiler
> > (ie, use "-Ae +DA2.0W" in your CFLAGS).  Gcc may miscompile the
> > linker causing it to dump core linking shared libraries.  Whether
> > this is still a problem, I'm not sure.
> 
> I used
> --8<--- Conf-64
> #!/usr/bin/sh
> 
> export CONFIG_SITE=3D
> export CC=3Dcc

Change this to
export CC="cc -Ae +DA2.0W"

> export CFLAGS=3D"-Ae -O +DA2.0W"
> #export LDFLAGS=3D"-L/usr/local/pa20_64/lib -lgcc"
> export LIBS=3D/usr/local/pa20_64/lib/libgcc.a

Delete these.

> export PATH=3D.
> export PATH=3D$PATH"":/u/usr/merijn/bin/private:/u/usr/merijn/bin
> export PATH=3D$PATH"":/pro/local/bin:/pro/bin
> export PATH=3D$PATH"":/usr/bin:/usr/bin/X11:/opt/ansic/bin
> export PATH=3D$PATH"":/usr/sbin:/etc:/sbin:/usr/lib:/usr/ccs/bin:/opt/langt=
> ools/bin
> export PATH=3D$PATH"":/usr/contrib/bin:/usr/contrib/bin/X11:/opt/imake/bin
> 
> configure \
>     --prefix=3D/wrk/pa20_64 --with-local-prefix=3D/wrk/pa20_64 \
>     --disable-shared \
>     --disable-nls \
>     --enable-multilib \
>     --enable-threads

Use a modification of what I sent.  --with-local-prefix probably isn't
needed.  You don't need --enable-multilib or --enable-threads.  There
isn't any thread support yet and no multilibs.

> -->8---
> 

The patch below is incorrect.  The hppa2.0w-hp-hpux11* target is actually
the 32-bit som target on a 2.0w machine.  It shouldn't be changed to
64-bit.  Same for gcc config.

You want to configure binutils with something like

--host=hppa64-hp-hpux11.11 --prefix=/opt/gnu64 --disable-nls

If you are using a 11.00 system --host should be hppa64-hp-hpux11.00.  You
need to specify --host, or a complete set of --host, --build and --target
to do a 64-bit build.  The default guess is for 32-bit tools.

> But needed the followin patches:
> --8<--- binutils-2.12.diff
> --- binutils-2.12.org/configure.in	2002-03-08 20:45:10.000000000 +0100
> +++ binutils-2.12/configure.in	2002-04-05 13:17:26.000000000 +0200
> @@ -722,8 +722,10 @@
>    hppa*-*-*elf* | \
>    hppa*-*-linux-gnu* | \
>    hppa*-*-lites* | \
> +  hppa*2.0w*-*-* | \
>    hppa*64*-*-*)

[...]

> > These are the gcc configure options that I use:
> >=20
> > --host=3Dhppa64-hp-hpux11.11 --with-gnu-as --with-as=3D/opt/gnu64/bin/as
>  =20
>   That's a HP-UX 11i

Yes.  It works identically to 11.00.

>  =20
> > --with-gnu-ld --with-ld=3D/opt/gnu64/bin/ld --disable-nls --prefix=3D/opt=
> /gnu64
> 
> This is what I went for
> --8<--- Conf-64
> #!/usr/bin/sh
> 
> export CONFIG_SITE=3D
> export CC=3D"cc -Ae +DA2.0W"
> export PATH=3D.:/u/usr/merijn/bin/private:/u/usr/merijn/bin
> export PATH=3D$PATH"":/pro/local/bin:/pro/bin:/usr/bin:/usr/bin/X11
> export PATH=3D$PATH"":/opt/ansic/bin:/usr/ccs/bin:/opt/langtools/bin
> export PATH=3D$PATH"":/usr/lib:/usr/contrib/bin:/usr/contrib/bin/X11:/opt/i=
> make/bin
> export PATH=3D$PATH"":/wrk/pa20_64/bin:/wrk/GNUpro/bin

When you do a 64-bit build, make sure that the 64-bit tools are before
the 32-bit and HP tools.  Some have the same name so you want to be sure
that your using the correct tools.  The HP compiler knows how to find
its tools.

> 
> rm -rf obj
> mkdir obj
> cd obj
> =2E./src/configure \
>     --enable-languages=3Dgcc \
>     --prefix=3D/usr/local/pa20_64 --with-local-prefix=3D/usr/local/pa20_64 =
> \
>     --with-gnu-as \
>     --with-gnu-ld \
>     --disable-shared \
>     --disable-nls \
>     --enable-multilib \
>     --enable-threads \
>     --with-system-zlib
> 
> echo ""
> echo "Now start 'Build-64'"
> -->8---
> 

Again, the patch below is wrong and unnecessary.  You need to specify
--host properly.  I suggest removing --enable-multilib, --enable-threads
and --with-system-zlib.  The system zlib probably has the security bug.

>
> Of course after patchin with
> --8<---
> --- src/configure.in.org	2002-04-05 14:16:10.000000000 +0200
> +++ src/configure.in	2002-04-05 14:16:31.000000000 +0200
> @@ -284,6 +284,7 @@
>  # hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
>  # them automatically.
>  case "${host}" in
> +  hppa*2.0w*-*-hpux11* | \
>    hppa*64*-*-hpux11*)=09

[...]

> The build comes amazingly far, but core dumps like
> 
> echo "int xxy_us_dummy;" >tmp-dum.c
> =2E/xgcc -B./ -B/usr/local/pa20_64/hppa2.0w-hp-hpux11.00/bin/ -isystem /usr=
> /local/pa20_64/hppa2.0w-hp-hpux11.00/include -isystem /usr/local/pa20_64/hp=
> pa2.0w-hp-hpux11.00/sys-include -S tmp-dum.c
> cc1: internal error: Segmentation fault

> No core dump.
> 
> Should I go on?

Retry following my suggestions.  The important points are:

1)  Use a common prefix for your tools (e.g., /usr/local/pa20_64).
2)  Use --host=hppa64-hp-hpux11.00.
3)  Export CC="cc -Ae +DA2.0W" for your initial builds of binutils and gcc.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

  parent reply	other threads:[~2002-04-05 16:06 UTC|newest]

Thread overview: 178+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-04  2:03 H.Merijn Brand
2002-04-04  8:22 ` law
     [not found] ` <200204041958.g34JwTbA011272@hiauly1.hia.nrc.ca>
2002-04-05  4:51   ` H.Merijn Brand
2002-04-05  5:01     ` H.Merijn Brand
2002-04-05  9:19     ` John David Anglin [this message]
2002-04-07  7:26       ` H.Merijn Brand
2002-04-07 12:17         ` John David Anglin
2002-04-10  3:39       ` H.Merijn Brand
2002-04-10 11:21         ` John David Anglin
2002-04-10 11:56           ` H.Merijn Brand
2002-04-10 12:50             ` John David Anglin
2002-04-11  2:19               ` H.Merijn Brand
2002-04-11  8:59                 ` John David Anglin
2002-04-11  9:15                   ` H.Merijn Brand
2002-04-11  9:19                   ` law
2002-04-04 12:02 John David Anglin
     [not found] <20020411221308.416D.H.M.BRAND@hccnet.nl>
     [not found] ` <200204112027.g3BKR6DK001129@hiauly1.hia.nrc.ca>
2002-04-12  3:19   ` H.Merijn Brand
2002-04-12  4:39     ` H.Merijn Brand
2002-04-12  5:08       ` H.Merijn Brand
2002-04-12  9:34       ` John David Anglin
2002-04-13 10:40       ` John David Anglin
2002-04-15  8:45         ` law
2002-04-15  9:46           ` John David Anglin
2002-04-15 10:05             ` law
2002-04-15 11:42               ` John David Anglin
     [not found] <no.id>
1997-09-30  8:09 ` Mini-patch for cccp.c Thomas Koenig
1997-09-30 23:24   ` Jeffrey A Law
1997-10-06  8:25   ` Thomas Koenig
1997-11-16 18:42 ` A new bug in 971114 H.J. Lu
1998-04-20 11:44 ` egcs 1.0.3 on linux/alpha H.J. Lu
1998-07-17 16:48 ` -Wall stops compiling of egcs-1.0.3 Joe Buck
1998-10-30 19:14 ` A bad EH bug H.J. Lu
     [not found] ` <19981218003619.B28066@cerebro.laendle>
     [not found]   ` <19981220010520.A4999@tantalophile.demon.co.uk>
     [not found]     ` <19981220223834.D16580@cerebro.laendle>
1998-12-21  2:53       ` GCC 2.7.2.3 good, EGCS 1.0.3 bad for x86 subtract then test Jamie Lokier
1998-12-23 14:19         ` Richard Henderson
1998-12-23 20:57           ` Jeffrey A Law
1998-12-24  1:11             ` Toshiyasu Morita
1998-12-25 18:17           ` Michael Hayes
1998-12-25 21:57             ` Jeffrey A Law
1998-12-26  2:07               ` Michael Hayes
1998-12-27  0:13                 ` Jeffrey A Law
1998-12-27  0:59                   ` Michael Hayes
2000-12-19 21:48 ` FWIW: VAX fix backport and gcc built on 4.3BSD first time ever! John David Anglin
2000-12-21 14:32   ` John David Anglin
2001-01-01 16:37 ` pa reload problem John David Anglin
2001-01-03 20:57   ` Jeffrey A Law
2001-01-03 22:08     ` John David Anglin
2001-01-04  9:55       ` Jeffrey A Law
2001-01-04 11:12         ` John David Anglin
2001-01-04 11:35         ` John David Anglin
2001-01-04 11:48           ` Alexandre Oliva
2001-01-04 13:06             ` John David Anglin
2001-01-04 13:18               ` Alexandre Oliva
2001-01-04 14:12                 ` John David Anglin
2001-01-12 19:40 ` RFC: Jump to const_int John David Anglin
2001-01-12 21:10   ` Fergus Henderson
2001-04-17 19:11 ` GCC 3.0 Status Report John David Anglin
2001-04-18  0:55   ` Mark Mitchell
2001-04-18  9:00     ` John David Anglin
2001-04-18 13:51     ` John David Anglin
2001-04-20 13:36       ` Mark Mitchell
2001-04-21 19:33 ` C++ Issue on GCC 3.0 branch John David Anglin
2001-04-23  2:18   ` Bernd Schmidt
2001-04-23  7:51     ` law
2001-04-23  7:55       ` Bernd Schmidt
2001-04-23  7:56       ` Bernd Schmidt
2001-04-23  8:14         ` law
2001-04-25 10:26   ` Mark Mitchell
2001-04-25 14:04     ` John David Anglin
2001-04-25 17:31       ` Mark Mitchell
2001-04-26  8:31         ` John David Anglin
2001-04-26 10:25           ` Mark Mitchell
2001-04-26 10:02         ` law
2001-04-23 15:21 ` John David Anglin
2001-04-24 19:21   ` law
2001-04-24 20:23     ` John David Anglin
2001-04-26 16:45       ` law
2001-04-26 17:02         ` Mark Mitchell
2001-04-26 17:29           ` law
2001-04-27 10:43         ` John David Anglin
2001-04-27 15:14         ` John David Anglin
2001-04-28  9:55           ` law
2001-04-30  8:59         ` John David Anglin
2001-05-16 16:22 ` gcc 2.95.2 Joe Buck
2001-06-14  9:58 ` STL warnings recently appeared in the 3.0 branch John David Anglin
2001-06-14 11:34 ` Possible corruption of gcc-3.0-20010614.tar.bz2 John David Anglin
2001-06-14 15:56 ` PATCH: Fix invalid loader fixups from shared libobjc with John David Anglin
2001-08-09 15:12 ` Simple returns are broken in gcc 3.X John David Anglin
2001-08-09 15:48   ` Richard Henderson
2001-12-12  8:49 ` Question regarding ICE in instantiate_virtual_regs_1, at function.c:3880 John David Anglin
2001-12-12 15:58   ` John David Anglin
2001-12-13  1:28     ` Jan Hubicka
2001-12-13 11:57       ` John David Anglin
2001-12-13 12:05         ` Jan Hubicka
2001-12-14 13:26           ` John David Anglin
2002-01-30 17:36 ` condition codes, haifa-sched and virtual-stack-vars Ulrich Weigand
2002-02-21 13:31 ` Help! DW function pointer encoding for PA John David Anglin
2002-02-21 19:28   ` David Edelsohn
2002-04-05 12:45 ` middle-end/6180: Infinite loop in cc1 during dbr pass John David Anglin
2002-04-05 13:54   ` Richard Henderson
2002-04-06 12:58     ` John David Anglin
2002-04-06 14:51       ` Richard Henderson
2002-04-10 15:30 ` gcc-64 on HP-UX 11.00 John David Anglin
2002-04-11 10:25 ` John David Anglin
2002-04-11 10:43   ` H.Merijn Brand
2002-04-11 11:04   ` law
2002-04-15 13:39 ` John David Anglin
2002-04-16 13:14   ` law
2002-04-16 15:25     ` John David Anglin
2002-11-13  3:37   ` gcc-64 20021111 broken " H.Merijn Brand
2002-11-13  5:38     ` H.Merijn Brand
2002-11-13  8:31       ` John David Anglin
2002-11-13 13:12       ` John David Anglin
2002-11-15  9:54         ` H.Merijn Brand
2002-11-13  8:30     ` John David Anglin
2002-04-26 10:43 ` bison 1.33 problem with mainline c-parse.in: yyfree_stacks John David Anglin
2002-05-11 20:28 ` corrections to recent profile-arcs change John David Anglin
2002-06-01 17:01 ` vax double precision broken Joe Buck
2002-07-11  6:34 ` Bootstrapping hppa64? CPP problem John David Anglin
2002-07-16 13:21 ` [parisc-linux] gcc-3.[02] alignment problem John David Anglin
2002-07-16 13:43   ` Randolph Chung
2002-07-16 13:45     ` Matthew Wilcox
2002-07-17  5:26       ` Randolph Chung
2002-07-16 14:26     ` Richard Henderson
2002-07-26 20:16 ` mainline bootstrap failure in bitmap.c on sparcv9-sun-solaris2.8 John David Anglin
2002-07-27 18:50   ` Richard Henderson
2002-07-28  4:50   ` Richard Henderson
2002-07-28 13:08     ` John David Anglin
2002-07-28 21:35     ` John David Anglin
2002-08-01 12:02 ` gcc 3.2's cpp breaks configure scripts John David Anglin
2002-10-08 16:26 ` soft-float support Graeme Peterson
2002-11-13 14:19 ` gcc-64 20021111 broken on HP-UX 11.00 John David Anglin
2002-11-23  0:26 ` HP-UX IA64 Patch to fix earlier patch John David Anglin
2002-12-17  9:52 ` Setting LD tool default to ld breaks configure check for ld used by GCC John David Anglin
2002-12-20 17:39   ` John David Anglin
2003-01-02 17:48 ` Miscompilation of glibc with CVS mainline John David Anglin
2003-01-02 17:54   ` Jakub Jelinek
2003-01-02 18:58     ` John David Anglin
2003-01-02 17:57   ` Daniel Jacobowitz
2003-02-03  5:02 ` hppa-linux regressions and 3.2.2 release John David Anglin
2003-02-03 11:03   ` Gabriel Dos Reis
2003-02-03 16:26   ` John David Anglin
2003-02-03 16:54     ` Gabriel Dos Reis
2003-02-03 18:02       ` John David Anglin
2003-02-11 19:37 ` Bootstrap failure on hppa-unknown-linux-gnu, trunk John David Anglin
2003-02-11 22:37   ` Josef Zlomek
2003-02-11 22:51     ` John David Anglin
2003-03-05 22:03   ` Josef Zlomek
2003-03-05 22:05     ` Josef Zlomek
2003-02-11 19:59 ` Altivec + 16 byte alignment John David Anglin
2003-02-11 21:02   ` Mike Stump
2003-02-12  5:55     ` Fergus Henderson
2003-02-12 16:39       ` John David Anglin
2003-05-07  1:13 ` GCC 3.3 Prelease broken on s390 Ulrich Weigand
2003-05-07  1:27   ` Richard Henderson
2003-05-07  5:53     ` Mark Mitchell
2003-05-07 14:54     ` Ulrich Weigand
2003-05-07 15:53       ` Mark Mitchell
2003-05-07 16:03         ` Joe Buck
2003-05-07 16:13           ` Mark Mitchell
2003-05-07 17:02         ` Ulrich Weigand
2003-05-07 17:09           ` Joe Buck
2003-05-07 17:11           ` Mark Mitchell
2003-05-07 19:39             ` Ulrich Weigand
2003-05-07 19:45               ` Mark Mitchell
2003-05-07 18:19           ` Jonathan Lennox
2003-05-07 18:27             ` Mark Mitchell
2003-05-07 18:30               ` Jonathan Lennox
2003-05-07 18:36                 ` Mark Mitchell
2003-05-07 18:49                 ` Daniel Jacobowitz
2003-05-07 17:51       ` Richard Henderson
2003-05-07 19:42         ` Ulrich Weigand
2003-05-07 19:46           ` Mark Mitchell
2003-07-05 17:01 ` Solaris 8/SPARC bootstrap broken building 64-bit libgcc John David Anglin
2003-10-08  3:11 ` Someone broke bootstrap John David Anglin
2003-10-08  7:25   ` Eric Christopher
2003-10-08 17:26     ` John David Anglin
2004-01-06  0:43 ` autoconf changes break bootstrap on hppa*-*-hpux* John David Anglin
2007-04-15 19:13 ` Call to arms: testsuite failures on various targets John David Anglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200204051606.g35G6Muo013807@hiauly1.hia.nrc.ca \
    --to=dave@hiauly1.hia.nrc.ca \
    --cc=bug-binutils@gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=h.m.brand@hccnet.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).