[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2019-08-21 Thread skunk at iskunk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

Daniel Richard G.  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Daniel Richard G.  ---
I have attempted a bootstrap of 9.2.0 on this same system again, and am happy
to report that it now completes successfully, modulo bug #55930. Specifically,

* The libgcc-unwind.map error no longer occurs, despite my use of
--disable-shared;

* The object diffs no longer arise, even though I am continuing to use
/usr/ccs/bin/as and /usr/ccs/bin/ld .

These issues appear to have been fixed by-the-by since this bug was originally
filed, so I am closing accordingly.

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-12 Thread skunk at iskunk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

--- Comment #10 from Daniel Richard G.  ---
(In reply to r...@cebitec.uni-bielefeld.de from comment #9)
> 
> it would be helpful to know a bit more about that system: Solaris 10
> update release (e.g. from /etc/release), versions of as (as -V) and ld
> (ld -V), bootstrap compiler used, version of cmp (and do_compare setting
> in the toplevel Makefile).

Gladly:

$ cat /etc/release 
Oracle Solaris 10 8/11 s10x_u10wos_17b X86
  Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Assembled 23 August 2011

$ as -V
as: SunOS 5.10 119961-13 Patch 08/06/2014
[...]

$ ld -V
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.1505

I am bootstrapping with an earlier build of GCC 7.3.0 (itself compiled via a
non-bootstrapped build, due to this issue).

cmp(1) has no version option; it is simply /usr/bin/cmp:

$ cmp
usage: cmp [-l] [-s] file1 file2 [skip1] [skip2]

$ grep 'do-compare.*=' Makefile
do-compare = cmp $$f1 $$f2 16 16
do-compare3 = $(do-compare)

> To investigate comparison failures, it's usually necessary to have both
> a few of the object pairs failing the comparison and the corresponding
> .s files from -save-temps.  You've to be very careful to rerun the exact
> compiler invocations from exactly the same directories which can be
> tricky due to all the shuffling around due to the different stages.

Is it feasible to re-run the bootstrap with something like
CFLAGS(_FOR_(BUILD|TARGET)) = "-save-temps" ? Recreating the compiler
invocations manually will be quite tricky.

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-12 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #8 from Daniel Richard G.  ---
Hi Daniel,

> I tested this again with GCC 8.2.0 on the same system, using as/ld, and am
> still seeing the object diffs. Would it help if I provided a copy of the
> objects at issue?

it would be helpful to know a bit more about that system: Solaris 10
update release (e.g. from /etc/release), versions of as (as -V) and ld
(ld -V), bootstrap compiler used, version of cmp (and do_compare setting
in the toplevel Makefile).

To investigate comparison failures, it's usually necessary to have both
a few of the object pairs failing the comparison and the corresponding
.s files from -save-temps.  You've to be very careful to rerun the exact
compiler invocations from exactly the same directories which can be
tricky due to all the shuffling around due to the different stages.

Rainer

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-11 Thread skunk at iskunk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

--- Comment #8 from Daniel Richard G.  ---
Hello Rainer,

(In reply to r...@cebitec.uni-bielefeld.de from comment #7)
> That bootstrap (amd64-pc-solaris2.10 with as/ld, --disable-shared
> --with-pic) has now completed as well: in addition to libcc1 (PR
> other/66955) and ada (cf. PR ada/88429), I also had to disable go
> because it uses sendfile without explicitly linking with -lsendfile (in
> the shared case, this works because libgo is linked with libsendfile).
> 
> Anyway, the bootstrap has now finished successfully and make check is
> running: no comparison failures at all.  So unless there's additional
> information how to reproduce this, I'll close the PR as WORKSFORME.

I tested this again with GCC 8.2.0 on the same system, using as/ld, and am
still seeing the object diffs. Would it help if I provided a copy of the
objects at issue?

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-10 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

--- Comment #7 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #6 from Rainer Orth  ---
[...]
>> > 2. stage2 vs. stage3 diffs
[...]
> When trying a mainline bootstrap, I've run into quite a number of issues
> (libcc1 and ada not building), but once I've worked around those, I could
> bootstrap on amd64-pc-solaris2.11 (admittedly) with as/ld without comparison
> failures.  This was without --with-pic, which I'll try next.

That bootstrap (amd64-pc-solaris2.10 with as/ld, --disable-shared
--with-pic) has now completed as well: in addition to libcc1 (PR
other/66955) and ada (cf. PR ada/88429), I also had to disable go
because it uses sendfile without explicitly linking with -lsendfile (in
the shared case, this works because libgo is linked with libsendfile).

Anyway, the bootstrap has now finished successfully and make check is
running: no comparison failures at all.  So unless there's additional
information how to reproduce this, I'll close the PR as WORKSFORME.

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-10 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

Rainer Orth  changed:

   What|Removed |Added

 Status|WAITING |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ro at gcc dot gnu.org

--- Comment #6 from Rainer Orth  ---
(In reply to Fredrik Nyström from comment #3)
> (In reply to Daniel Richard G. from comment #0)
> > 1. Missing libgcc-unwind.map file
> 
> 1. Is caused by LINK_LIBGCC_MAPFILE_SPEC being set in gcc/config/sol2.h even
> if configured with --disable-shared. This has been around since PR
> target/59788.
> 
> I've had success on solaris 10, both sparc and x86 with following fix.
> 
> --- gcc/config/sol2.h.orig  2014-05-28 13:37:50.0 +0200
> +++ gcc/config/sol2.h   2015-09-03 14:23:19.950566000 +0200
> @@ -174,7 +174,7 @@
>  #define RDYNAMIC_SPEC "--export-dynamic"
>  #endif
>  
> -#ifndef USE_GLD
> +#if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC)
>  /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder.
> */
>  #define LINK_LIBGCC_MAPFILE_SPEC \
>"%{shared|shared-libgcc:-M %slibgcc-unwind.map}"

Thanks for the patch. It makes perfect send and I've now installed it on
mainline.

> > 2. stage2 vs. stage3 diffs
> 
> Are you sure you want /usr/ccs/bin/as on solaris x86?
> Have you tried with gnu as?
> --with-gnu-as
> --with-as=/usr/sfw/bin/gas

There's something to be said for using gas, but the Solaris 10 gas is ancient
by today' standards.  That said, I regularly bootstrap gcc on Solaris 10 with
both as and gas, and both work for me.

When trying a mainline bootstrap, I've run into quite a number of issues
(libcc1 and ada not building), but once I've worked around those, I could
bootstrap on amd64-pc-solaris2.11 (admittedly) with as/ld without comparison
failures.  This was without --with-pic, which I'll try next.

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-10 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

--- Comment #5 from Rainer Orth  ---
Author: ro
Date: Mon Dec 10 09:49:02 2018
New Revision: 266946

URL: https://gcc.gnu.org/viewcvs?rev=266946=gcc=rev
Log:
Don't try to use libgcc-unwind.map with --disable-shared (PR bootstrap/65725)

2018-12-10  Fredrik Nyström  

PR bootstrap/65725
* config/sol2.h: Only use libgcc-unwind.map if
ENABLE_SHARED_LIBGCC.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sol2.h

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2018-12-06 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

--- Comment #4 from Eric Gallager  ---
(In reply to Richard Biener from comment #1)
> Please always say how you configured GCC.

Reporter has since done this; does this bug still need to stay in WAITING?

[Bug bootstrap/65725] Bootstrap errors on Solaris 10 x86-64, including object diffs

2015-09-07 Thread fredrik at lysator dot liu.se
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65725

Fredrik Nyström  changed:

   What|Removed |Added

 CC||fredrik at lysator dot liu.se

--- Comment #3 from Fredrik Nyström  ---
(In reply to Daniel Richard G. from comment #0)
> 1. Missing libgcc-unwind.map file

1. Is caused by LINK_LIBGCC_MAPFILE_SPEC being set in gcc/config/sol2.h even if
configured with --disable-shared. This has been around since PR target/59788.

I've had success on solaris 10, both sparc and x86 with following fix.

--- gcc/config/sol2.h.orig  2014-05-28 13:37:50.0 +0200
+++ gcc/config/sol2.h   2015-09-03 14:23:19.950566000 +0200
@@ -174,7 +174,7 @@
 #define RDYNAMIC_SPEC "--export-dynamic"
 #endif

-#ifndef USE_GLD
+#if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC)
 /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder. 
*/
 #define LINK_LIBGCC_MAPFILE_SPEC \
   "%{shared|shared-libgcc:-M %slibgcc-unwind.map}"

Also "--disable-shared --with-pic" is still broken (since 4.7.?), see PR
libstdc++/58638 for suggested patch.


> 2. stage2 vs. stage3 diffs

Are you sure you want /usr/ccs/bin/as on solaris x86?
Have you tried with gnu as?
--with-gnu-as
--with-as=/usr/sfw/bin/gas