[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2018-03-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #33 from Richard Biener  ---
The summary is now misleading as well.  IMHO the bug shouldn't have been
overloaded with the fallout of the original fix.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2018-02-11 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

Eric Gallager  changed:

   What|Removed |Added

   Priority|P1  |P2

--- Comment #32 from Eric Gallager  ---
(In reply to Dominique d'Humieres from comment #31)
> > Any progress on this?
> > Or shall we just disable completely hot/cold function partitioning
> > on darwin till then?
> 
> IMO it would be better to set the priority to P2.

OK, done

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2018-02-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #31 from Dominique d'Humieres  ---
> Any progress on this?
> Or shall we just disable completely hot/cold function partitioning
> on darwin till then?

IMO it would be better to set the priority to P2.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2018-01-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #30 from Jakub Jelinek  ---
Any progress on this?
Or shall we just disable completely hot/cold function partitioning on darwin
till then?

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-11-25 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #29 from Iain Sandoe  ---
(In reply to Dominique d'Humieres from comment #28)
> Bootstrap is fixed, but the fix did not please to Iain Sandoe.

The fix allows bootstrap to proceed, but doesn't solve the underlying problem
(which is that there are cases where the linker [ld64] is not able to determine
correct atom boundaries from the output we currently produce from GCC).

I will hopefully have some cycles for Darwin over the next month to address
this and other issues.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-11-19 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #28 from Dominique d'Humieres  ---
Bootstrap is fixed, but the fix did not please to Iain Sandoe.

Dominique

> Le 19 nov. 2017 à 17:40, hubicka at gcc dot gnu.org 
>  a écrit :
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033
> 
> --- Comment #27 from Jan Hubicka  ---
> Is this fixed now?
> 
> -- 
> You are receiving this mail because:
> You reported the bug.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-11-19 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #27 from Jan Hubicka  ---
Is this fixed now?

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-09-15 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

Eric Gallager  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED
 CC||egallager at gcc dot gnu.org

--- Comment #26 from Eric Gallager  ---
Changing status to ASSIGNED since Iain made himself the assignee.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-31 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #25 from Dominique d'Humieres  ---
I have posted the results on darwin for r250610 at
https://gcc.gnu.org/ml/gcc-testresults/2017-07/msg02582.html. I see 646
failures compared to 318 with r249104.

I am planning to open new Pos for the most offending problems.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-11 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #24 from Jan Hubicka  ---
I think the patch still need to be updated to correctly handle the symbols
whose names are parethetised which was mentioned on the IRC (weird thing that
seems to be used in objC++ API).  That should fix good part of the fallout too.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #23 from Dominique d'Humieres  ---
> Fixed.

Nope! Revision r249926 has several fall out for which I have to file relevant
PRs. In addition Jan Hubicka asked me on IRC to back port the fix. Please let
me manage this PR without interfering.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-09 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #22 from Andrew Pinski  ---
Fixed.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-09 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #21 from simon at pushface dot org ---
Actually, r249930 was the last related revision (cleans up spaces).

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-09 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #20 from simon at pushface dot org ---
r249926

See https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00121.html

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-09 Thread d25fe0be at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #19 from d25fe0be@  ---
Bootstrap seems to work for me now.

Not sure which revision brings it back to normal though.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-05 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #18 from Eric Gallager  ---
(In reply to Dominique d'Humieres from comment #10)
> The last patch in comment 8 exposes another problem: buf[128] is too small.
> 
> The following patch which uses the trick proposed in IRC by Richi to split
> assemble_name_raw seems to work
> 
> --- ../_clean/gcc/config/darwin.c 2017-01-01 17:39:06.0 +0100
> +++ gcc/config/darwin.c   2017-07-03 14:21:19.0 +0200
> @@ -3683,11 +3683,9 @@ default_function_sections:
>  void
>  darwin_function_switched_text_sections (FILE *fp, tree decl, bool
> new_is_cold)
>  {
> -  char buf[128];
> -  snprintf (buf, 128, "%s%s",new_is_cold?"__cold_sect_of_":"__hot_sect_of_",
> - IDENTIFIER_POINTER (DECL_NAME (decl)));
>/* Make sure we pick up all the relevant quotes etc.  */
> -  assemble_name_raw (fp, (const char *) buf);
> +  assemble_name_raw (fp, new_is_cold?"__cold_sect_of_":"__hot_sect_of_");
> +  assemble_name_raw (fp, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
>fputs (":\n", fp);
>  }

I successfully bootstrapped with this patch; the test results produced by it
can be found here: https://gcc.gnu.org/ml/gcc-testresults/2017-07/msg00365.html

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-04 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #17 from simon at pushface dot org ---
I applied your patches (comment 12, comment 13) to the gcc-8-20170702 snapshot.
Building on darwin 16.6.0 with gcc-7.1.0 as the stage1 compiler was successful
(languages=c,c++,ada).

make check-c:

=== gcc Summary ===

# of expected passes41267
# of unexpected failures28
# of expected failures  120
# of unresolved testcases   4
# of unsupported tests  1049

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #16 from Dominique d'Humieres  ---
Created attachment 41677
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41677=edit
assembly with the fixes before r249930

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #15 from Dominique d'Humieres  ---
Created attachment 41676
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41676=edit
Assembly with the patch for r249930

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #14 from Dominique d'Humieres  ---
Revision r249930 breaks some objc tests:

% /opt/gcc/gcc8p-249834p3/bin/g++
/opt/gcc/work/gcc/testsuite/objc.dg/torture/forward-1.m
-L/opt/gcc/build_w/x86_64-apple-darwin16.6.0/libobjc/.libs -lobjc -O2
-fgnu-runtime
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr0gn/T//ccQHrZR1.s:100:38: error:
unexpected token in argument list
___cold_sect_of_"-[Receiver display]":
 ^
I'll attach the assembly with/without the patch for r249930.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #13 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Mon Jul  3 17:42:54 2017
New Revision: 249930

URL: https://gcc.gnu.org/viewcvs?rev=249930=gcc=rev
Log:
2017-07-03  Dominique d'Humieres  

PR target/81033
* config/darwin.c (darwin_function_switched_text_sections):
Fix spaces.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin.c

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #12 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Mon Jul  3 15:53:56 2017
New Revision: 249926

URL: https://gcc.gnu.org/viewcvs?rev=249926=gcc=rev
Log:
2017-07-03  Dominique d'Humieres  

PR target/81033
* config/darwin.c (darwin_function_switched_text_sections):
Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
in two pieces, and suppress the use of buf.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin.c

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread simon at pushface dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

simon at pushface dot org changed:

   What|Removed |Added

 CC||simon at pushface dot org

--- Comment #11 from simon at pushface dot org ---
(In reply to Jan Hubicka from comment #8)

> Looking into the error I suppose problem is:
> ___cold_sect_of_allocate:
> __ZN9__gnu_cxx16bitmap_allocatorIcE8allocateEmPKv.cold.42:
> 
> and bit later
> 
> ___cold_sect_of_allocate:
> __ZN9__gnu_cxx16bitmap_allocatorIwE8allocateEm.cold.47:
> 
> So perhaps the following fix it?
> Index: darwin.c
> ===
> --- darwin.c  (revision 249872)
> +++ darwin.c  (working copy)
> @@ -3685,7 +3665,7 @@
>  {
>char buf[128];
>snprintf (buf, 128, "%s%s",new_is_cold?"__cold_sect_of_":"__hot_sect_of_",
> - IDENTIFIER_POINTER (DECL_NAME (decl)));
> + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
>/* Make sure we pick up all the relevant quotes etc.  */
>assemble_name_raw (fp, (const char *) buf);
>fputs (":\n", fp);

No; bootstrapping from 7.1.0,

/var/folders/_q/fvnxz46903z9hjh38fz0lyhmgs/T//ccCIgbl7.s:34470:1: error:
invalid symbol redefinition
___cold_sect_of__ZNKSt7__cxx119money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE6do_getES4_S4_bRSt8ios_baseRSt12_Ios_Iost:
^
make[6]: *** [cxx11-locale-inst.lo] Error 1
make[6]: *** Waiting for unfinished jobs
/var/folders/_q/fvnxz46903z9hjh38fz0lyhmgs/T//cc6MyXXO.s:33909:1: error:
invalid symbol redefinition
___cold_sect_of__ZNKSt7__cxx119money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE6do_getES4_S4_bRSt8ios_baseRSt12_Ios_Iost:
^
make[6]: *** [cxx11-wlocale-inst.lo] Error 1

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #10 from Dominique d'Humieres  ---
The last patch in comment 8 exposes another problem: buf[128] is too small.

The following patch which uses the trick proposed in IRC by Richi to split
assemble_name_raw seems to work

--- ../_clean/gcc/config/darwin.c   2017-01-01 17:39:06.0 +0100
+++ gcc/config/darwin.c 2017-07-03 14:21:19.0 +0200
@@ -3683,11 +3683,9 @@ default_function_sections:
 void
 darwin_function_switched_text_sections (FILE *fp, tree decl, bool new_is_cold)
 {
-  char buf[128];
-  snprintf (buf, 128, "%s%s",new_is_cold?"__cold_sect_of_":"__hot_sect_of_",
-   IDENTIFIER_POINTER (DECL_NAME (decl)));
   /* Make sure we pick up all the relevant quotes etc.  */
-  assemble_name_raw (fp, (const char *) buf);
+  assemble_name_raw (fp, new_is_cold?"__cold_sect_of_":"__hot_sect_of_");
+  assemble_name_raw (fp, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
   fputs (":\n", fp);
 }

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #9 from Eric Gallager  ---
(In reply to Jan Hubicka from comment #8)
> 
> 
> Looking into the error I suppose problem is:
> ___cold_sect_of_allocate:
> __ZN9__gnu_cxx16bitmap_allocatorIcE8allocateEmPKv.cold.42:
> 
> and bit later
> 
> ___cold_sect_of_allocate:
> __ZN9__gnu_cxx16bitmap_allocatorIwE8allocateEm.cold.47:
> 
> So perhaps the following fix it?
> Index: darwin.c
> ===
> --- darwin.c  (revision 249872)
> +++ darwin.c  (working copy)
> @@ -3685,7 +3665,7 @@
>  {
>char buf[128];
>snprintf (buf, 128, "%s%s",new_is_cold?"__cold_sect_of_":"__hot_sect_of_",
> - IDENTIFIER_POINTER (DECL_NAME (decl)));
> + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
>/* Make sure we pick up all the relevant quotes etc.  */
>assemble_name_raw (fp, (const char *) buf);
>fputs (":\n", fp);

I tried this patch; bootstrap still fails for me, albeit on a different file
now. New error message is:

/private/var/root/gcc-git/my_oddly_named_builddir/./prev-gcc/xg++
-B/private/var/root/gcc-git/my_oddly_named_builddir/./prev-gcc/
-B/usr/local/i386-apple-darwin9.8.0/bin/ -nostdinc++
-B/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/src/.libs
-B/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs

-I/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/include/i386-apple-darwin9.8.0

-I/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/include
 -I/private/var/root/gcc-git/libstdc++-v3/libsupc++
-L/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/src/.libs
-L/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs
-fno-PIE -c   -g -O2 -mdynamic-no-pic  -gtoggle -DIN_GCC -fPIC   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/../include -I../../gcc/../libcpp/include
-I/private/var/root/gcc-git/my_oddly_named_builddir/./gmp
-I/private/var/root/gcc-git/gmp
-I/private/var/root/gcc-git/my_oddly_named_builddir/./mpfr/src
-I/private/var/root/gcc-git/mpfr/src -I/private/var/root/gcc-git/mpc/src 
-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/../libbacktrace
-I/private/var/root/gcc-git/my_oddly_named_builddir/./isl/include
-I/private/var/root/gcc-git/isl/include -I/usr/local/include -o
gimple-ssa-store-merging.o -MT gimple-ssa-store-merging.o -MMD -MP -MF
./.deps/gimple-ssa-store-merging.TPo ../../gcc/gimple-ssa-store-merging.c
cc1plus: warning: ‘-mdynamic-no-pic’ overrides ‘-fpic’, ‘-fPIC’, ‘-fpie’ or
‘-fPIE’
/var/tmp//cc2wwOg4.s:2529:FATAL:Symbol
___cold_sect_of__ZN10hash_tableIN8hash_mapI17tree_operand_hashPN12_GLOBAL__N_120imm_store_chain_infoE21simple_hashmap_traitsI19d
already defined.
make[3]: *** [gimple-ssa-store-merging.o] Error 1
make[3]: Leaving directory
`/private/var/root/gcc-git/my_oddly_named_builddir/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/private/var/root/gcc-git/my_oddly_named_builddir'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/private/var/root/gcc-git/my_oddly_named_builddir'
make: *** [all] Error 2

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-03 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #8 from Jan Hubicka  ---
We discussed this on IRC some time ago. The problem is that bb partitioning
seems broken on Darwin. Until the mentioned revision only -fprofile-use enabled
it and thus the bug probably went unnoticed because no-one tests
profiledbootstrap on darwin.

bb-partitioning was developed by apple years ago, so it used to work on Darwin.
it would be useful to figure out what broke and if we can fix it.  Without any
further analysis we would need to simply disable it as follows:

Index: darwin.c
===
--- darwin.c(revision 249872)
+++ darwin.c(working copy)
@@ -3146,29 +3146,9 @@
   && !TARGET_64BIT)
 global_options.x_flag_asynchronous_unwind_tables = 0;

-   /* Disable -freorder-blocks-and-partition when unwind tables are being
-  emitted for Darwin < 9 (OSX 10.5).
-  The strategy is, "Unless the User has specifically set/unset an unwind
-  flag we will switch off -freorder-blocks-and-partition when unwind
tables
-  will be generated".  If the User specifically sets flags... we assume
-  (s)he knows why...  */
-   if (generating_for_darwin_version < 9
-   && global_options_set.x_flag_reorder_blocks_and_partition
-   && ((global_options.x_flag_exceptions   /* User, c++, java */
-   && !global_options_set.x_flag_exceptions)   /* User specified... */
-  || (global_options.x_flag_unwind_tables
-  && !global_options_set.x_flag_unwind_tables)
-  || (global_options.x_flag_non_call_exceptions
-  && !global_options_set.x_flag_non_call_exceptions)
-  || (global_options.x_flag_asynchronous_unwind_tables
-  && !global_options_set.x_flag_asynchronous_unwind_tables)))
-{
-  inform (input_location,
- "-freorder-blocks-and-partition does not work with exceptions "
- "on this architecture");
-  flag_reorder_blocks_and_partition = 0;
-  flag_reorder_blocks = 1;
-}
+  /* Disable flag_reorder_blocks_and_partition as it is broken on Darwin.
+ See PR 81033.  */
+  flag_reorder_blocks_and_partition = 0;

 /* FIXME: flag_objc_sjlj_exceptions is no longer needed since there is
only
one valid choice of exception scheme for each runtime.  */


Looking into the error I suppose problem is:
___cold_sect_of_allocate:
__ZN9__gnu_cxx16bitmap_allocatorIcE8allocateEmPKv.cold.42:

and bit later

___cold_sect_of_allocate:
__ZN9__gnu_cxx16bitmap_allocatorIwE8allocateEm.cold.47:

So perhaps the following fix it?
Index: darwin.c
===
--- darwin.c(revision 249872)
+++ darwin.c(working copy)
@@ -3685,7 +3665,7 @@
 {
   char buf[128];
   snprintf (buf, 128, "%s%s",new_is_cold?"__cold_sect_of_":"__hot_sect_of_",
-   IDENTIFIER_POINTER (DECL_NAME (decl)));
+   IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
   /* Make sure we pick up all the relevant quotes etc.  */
   assemble_name_raw (fp, (const char *) buf);
   fputs (":\n", fp);

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-07-02 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #7 from Eric Gallager  ---
For me the error is:

/private/var/root/gcc-git/my_oddly_named_builddir/./prev-gcc/xg++
-B/private/var/root/gcc-git/my_oddly_named_builddir/./prev-gcc/
-B/usr/local/i386-apple-darwin9.8.0/bin/ -nostdinc++
-B/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/src/.libs
-B/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs

-I/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/include/i386-apple-darwin9.8.0

-I/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/include
 -I/private/var/root/gcc-git/libstdc++-v3/libsupc++
-L/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/src/.libs
-L/private/var/root/gcc-git/my_oddly_named_builddir/prev-i386-apple-darwin9.8.0/libstdc++-v3/libsupc++/.libs
-c   -g -O2 -mdynamic-no-pic  -gtoggle -DIN_GCC -fPIC-fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common 
-DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc
-I../../gcc/build -I../../gcc/../include  -I../../gcc/../libcpp/include
-I/usr/local/include \
-o build/genmatch.o ../../gcc/genmatch.c
/var/tmp//cciuyI6t.s:4862:FATAL:Symbol ___cold_sect_of_gen_transform already
defined.
make[3]: *** [build/genmatch.o] Error 1
make[3]: Leaving directory
`/private/var/root/gcc-git/my_oddly_named_builddir/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/private/var/root/gcc-git/my_oddly_named_builddir'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/private/var/root/gcc-git/my_oddly_named_builddir'
make: *** [all] Error 2

...which I think is the same thing since it's an assembler error that mentions
a ___cold_sect_of_* symbol. I'm on i386-apple-darwin9.8.0 compiling trunk
checked out as of r249881.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-06-14 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #6 from Rainer Orth  ---
Jan,

can you *please* have a look at this bug?  Darwin bootstrap is broken for
almost
a week with no signs of activity to fix this!

Thanks.
  Rainer

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-06-11 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

--- Comment #5 from Dominique d'Humieres  ---
Revision r249105 breaks bootstrap again, even with the patch in comment 4.

[Bug bootstrap/81033] [8 Regression] Revision r249019 breaks bootstrap on darwin

2017-06-10 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033

Dominique d'Humieres  changed:

   What|Removed |Added

Summary|[8 Regression] Bootstrap|[8 Regression] Revision
   |broken on darwin|r249019 breaks bootstrap on
   ||darwin

--- Comment #4 from Dominique d'Humieres  ---
I bootstrap again if I revert revision r249019.

The following patch 

--- ../_clean/gcc/config/darwin.c   2017-01-01 17:39:06.0 +0100
+++ gcc/config/darwin.c 2017-06-10 17:19:31.0 +0200
@@ -3170,6 +3170,16 @@ darwin_override_options (void)
   flag_reorder_blocks = 1;
 }

+  /* Disable -freorder-blocks-and-partition when -fprofile-use is not in
+ effect. Function splitting was not actually being performed in that case,
+ as probably_never_executed_bb_p does not distinguish any basic blocks as
+ being cold vs hot when there is no profile data. Leaving it enabled,
+ however, causes the assembly code generator to create (empty) cold
+ sections and labels, leading to unnecessary size overhead.  */
+  if (global_options_set.x_flag_reorder_blocks_and_partition
+  && !global_options_set.x_flag_profile_use)
+flag_reorder_blocks_and_partition = 0;
+
 /* FIXME: flag_objc_sjlj_exceptions is no longer needed since there is
only
one valid choice of exception scheme for each runtime.  */
 if (!global_options_set.x_flag_objc_sjlj_exceptions)

fixes bootstrap.