[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-20 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #268 from The Written Word  
---
(In reply to Larkin Nickle from comment #262)
> Created attachment 51182 [details]
> GCC 11.1 patch to net dwarf2 debugging symbols
> 
> Rebuilding with this patch. Should hopefully net me actual dwarf2 debug
> symbols.

What if you use the GCC --gdwarf-2 option instead of this patch? Does the patch
just set the default DWARF version? Seems like if GCC supports DWARF >2,
--gdwarf-2 should generate just v2 DWARF info.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-20 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #267 from The Written Word  
---
(In reply to Larkin Nickle from comment #266)
> I'll try that 7.9.1 as a last resort; I noticed that 7.3.1 was able to read
> dwarf4 symbols from a previous 4.9.2 build I did so I'm testing building
> 11.1 patched to produce debug symbols similarly.

7.9.1 was the last version that had support for HP-UX.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-20 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #265 from The Written Word  
---
(In reply to Larkin Nickle from comment #264)
> Oh, and I should mention this is what I get with 7.3.1 or 7.5.1:
> 
> Reading symbols from
> /home/larbob/Projects/build-gcc/builds/gcc-11.1.0/.o/prev-gcc/cc1...BFD:
> /home/larbob/Projects/build-gcc/builds/gcc-11.1.0/.o/prev-gcc/cc1 symbol
> number 7214 references nonexistent SHT_SYMTAB_SHNDX section
> Can't read symbols from
> /home/larbob/Projects/build-gcc/builds/gcc-11.1.0/.o/prev-gcc/cc1: File in
> wrong format

There's a GDB 7.9.1 at http://hpux.connect.org.uk/hppd/hpux/Gnu/gdb-7.9.1/.
Does it work better?

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-18 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #253 from The Written Word  
---
(In reply to The Written Word from comment #245)
> (In reply to John Buddery from comment #238)
> > Was your 11.1 build successful ?
> 
> Our rebuild of 11.1.0 completed successfully. I haven't tested it though. I
> am going to try earlier GCC releases and build on 11.23/IA as well.

A build on 11.23/IA worked using similar patches to 11.31/IA.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-17 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #252 from The Written Word  
---
(In reply to Larkin Nickle from comment #249)
> Then, if libcpp's Makefile is patched so that charset.c is built with -O1, I
> eventually run into other errors:
> 
> ../../../../sources/gcc-11.1.0-new/libgcc/libgcov-interface.c: In function
> 'gcov_clear':
> ../../../../sources/gcc-11.1.0-new/libgcc/libgcov-interface.c:143:1:
> internal compiler error: Illegal instruction
>   143 | }
>   | ^
> libbacktrace could not find executable to open 

I tried building 10.3.0 using the same patches as in 11.1.0 and ran into the
above for the 10.3.0 build.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-16 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #248 from The Written Word  
---
(In reply to John Buddery from comment #247)
> For clarification, I assume this is using the HP aCC compiler for binutils
> etc., rather than the bundled /usr/ccs/bin cc ?

Correct.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-16 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #246 from The Written Word  
---
Created attachment 51163
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51163=edit
Build script and patches

Build script for zlib, gmp, mpfr, mpc, binutils 2.25.1, 2.30, 2.32, and GCC
4.4.6, 4.6.4, 4.7.4, 4.8.5, 4.9.5, and 11.1.0. Build instructions for GCC 9.4.0
and 10.3.0 included but not tested yet.

Patches for all of the above included as well.

Work-in-progress.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-16 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #245 from The Written Word  
---
(In reply to John Buddery from comment #238)
> Was your 11.1 build successful ?

Our rebuild of 11.1.0 completed successfully. I haven't tested it though. I am
going to try earlier GCC releases and build on 11.23/IA as well.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-15 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #243 from The Written Word  
---
(In reply to John Buddery from comment #238)
> It seems binutils 2.32 and earlier works fine in 32 bit mode, but 2.33.1 and
> later require a 64 bit build for 64 bit objects to work reliably.

I can build up to and including 2.32 with the HP C compiler. Starting with
2.33.1, they add -std=gnu99. Might be possible to fix this but I might retry
with 2.32.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-15 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #241 from The Written Word  
---
(In reply to John Buddery from comment #240)
> One question about PR66319 - it's marked as resolved, so is this committed
> as a patch in the trunk ?

It's resolved for HP-UX/PA but my HP-UX/IA patch was never committed.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-15 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #239 from The Written Word  
---
(In reply to John Buddery from comment #238)
> Thanks, I'll give it a go.
> 
> It seems binutils 2.32 and earlier works fine in 32 bit mode, but 2.33.1 and
> later require a 64 bit build for 64 bit objects to work reliably.
> 
> Was your 11.1 build successful ?

Ran out of disk space so had to restart :(

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-15 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #237 from The Written Word  
---
(In reply to John Buddery from comment #228)
> gcov-tool.c avoids build errors from ftwbuf differences on HP, apply if you
> hit errors but may need tidying up.

Instead of this patch, try the patch for PR66319 instead.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-14 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #236 from The Written Word  
---
(In reply to John Buddery from comment #235)
> Interesting - that's with a 32 bit gas?

$ file bin/gcc111/ia64-hp-hpux11.31/bin/as
bin/gcc111/ia64-hp-hpux11.31/bin/as:ELF-32 executable object file - IA64
$% bin/gcc111/ia64-hp-hpux11.31/bin/as --version
GNU assembler (GNU Binutils) 2.30
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `ia64-hp-hpux11.31'.

> It could be a change between 2.30 and 2.36 I guess, I might see if I can
> narrow it down.

We prefer to build with HP C and only use GCC when we must. 2.36 didn't build
as easily out-of-the-box with HP C and we haven't tried to fix it so we've
stuck with 2.30 for newer GCC releases.

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-14 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #234 from The Written Word  
---
(In reply to John Buddery from comment #233)
> One additional note - when building the patched binutils 2.36, it must be
> built as 64 bit executables.
> 
> It seems that a 32 bit gas does not produce 64 bit object files properly on
> this platform, causing the linker to crash when making the 64 bit
> libstdc++.so.
> 
> Build binutils as 64 bit, by using a configure something like:
> 
>   CFLAGS="-O2 -mlp64" ./configure -prefix=/usr/local

Odd. We currently have a build of 11.1.0 going with as from binutils-2.30 built
using the HP C compiler and:
$ file ./.o/prev-ia64-hp-hpux11.31/libstdc++-v3/src/.libs/libstdc++.so
./.o/prev-ia64-hp-hpux11.31/hpux64/libstdc++-v3/src/.libs/libstdc++.so
./.o/prev-ia64-hp-hpux11.31/libstdc++-v3/src/.libs/libstdc++.so:ELF-32
shared object file - IA64
./.o/prev-ia64-hp-hpux11.31/hpux64/libstdc++-v3/src/.libs/libstdc++.so: ELF-64
shared object file - IA64

[Bug middle-end/61577] [4.9.0 Regression] can't compile on hp-ux v3 ia64

2021-07-13 Thread bugzilla-gcc at thewrittenword dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #231 from The Written Word  
---
(In reply to John Buddery from comment #228)
> These patches are for 11.1.0, but should work on earlier versions too. With
> this I have a working gcc which I've tested on several large projects.

You don't #undef MAKE_DECL_ONE_ONLY in gcc/config/ia64/hpux.h? If you skip it,
do you skip it on earlier GCC builds as well?