Bug 65910 - r222473 breaks x86_64 darwin bootstrap
Summary: r222473 breaks x86_64 darwin bootstrap
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-28 04:15 UTC by Jack Howarth
Modified: 2015-04-28 17:18 UTC (History)
3 users (show)

See Also:
Host: x86_64-apple-darwin14
Target: x86_64-apple-darwin14, powerpc-ibm-aix*
Build: x86_64-apple-darwin14
Known to work:
Known to fail:
Last reconfirmed: 2015-04-28 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2015-04-28 04:15:05 UTC
The commit...

------------------------------------------------------------------------
r222473 | ctice | 2015-04-27 12:44:35 -0400 (Mon, 27 Apr 2015) | 17 lines

Give proper type and size to named cold partitions.

2015-04-27  Caroline Tice  <cmtice@google.com>

        * final.c (final_scan_insn):  Output cold_function_nmae as function
        type.
        * varasm.c (cold_function_name):  Make gloval.
        (assemble_start_function):  Re-set cold_function_name.
        (assemble_end_function): Output cold partition size.
        * varasm.h (cold_fun ction_name):  Declare global.

2015-04-27  Caroline Tice  <cmtice@google.com>

        * gcc.dg/tree-prof/cold_partition_label.c (main): Check for cold
        partition size.


breaks the bootstrap of gcc trunk on x86_64-apple-darwin using the clang compilers from Xcode 6.3. The previous commit r222472 bootstraps fine. The bootstrap failure appears as...

g++ -c   -g  -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-6-20150427/gcc -I../../gcc-6-20150427/gcc/. -I../../gcc-6-20150427/gcc/../include -I../../gcc-6-20150427/gcc/../libcpp/include -I/sw/include -I/sw/include  -I../../gcc-6-20150427/gcc/../libdecnumber -I../../gcc-6-20150427/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-6-20150427/gcc/../libbacktrace -I/sw/include -I/sw/include -o varasm.o -MT varasm.o -MMD -MP -MF ./.deps/varasm.TPo ../../gcc-6-20150427/gcc/varasm.c
...
../../gcc-6-20150427/gcc/varasm.c:1868:2: error: use of undeclared identifier 'ASM_DECLARE_FUNCTION_SIZE'
        ASM_DECLARE_FUNCTION_SIZE (asm_out_file,
        ^
Comment 1 Jack Howarth 2015-04-28 04:16:28 UTC
This is from a bootstrap on darwin14 with the command...

% ../gcc-6-20150427/configure --prefix=/Users/howarth/dist -enable-languages=c,c++ --with-gmp=/sw --with-libiconv-prefix=/sw --with-isl=/sw --with-mpc=/sw --with-system-zlib --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib --with-build-config=bootstrap-debug
Comment 2 Dominique d'Humieres 2015-04-28 05:52:18 UTC
I have fixed it with the patch

--- ../_clean/gcc/varasm.c	2015-04-27 20:19:05.000000000 +0200
+++ gcc/varasm.c	2015-04-27 21:34:14.000000000 +0200
@@ -1864,10 +1864,12 @@ assemble_end_function (tree decl, const 
 
       save_text_section = in_section;
       switch_to_section (unlikely_text_section ());
+#ifdef ASM_DECLARE_FUNCTION_SIZE
       if (cold_function_name != NULL_TREE)
 	ASM_DECLARE_FUNCTION_SIZE (asm_out_file,
 				   IDENTIFIER_POINTER (cold_function_name),
 				   decl);
+#endif
       ASM_OUTPUT_LABEL (asm_out_file, crtl->subsections.cold_section_end_label);
       if (first_function_block_is_cold)
 	switch_to_section (text_section);
Comment 3 Richard Biener 2015-04-28 09:37:38 UTC
Looks obvious to me.
Comment 4 Caroline Tice 2015-04-28 16:52:45 UTC
Has anyone actually committed this fix?  I'm not seeing it in my tree yet....
Comment 5 David Edelsohn 2015-04-28 17:16:50 UTC
Author: dje
Date: Tue Apr 28 17:16:19 2015
New Revision: 222535

URL: https://gcc.gnu.org/viewcvs?rev=222535&root=gcc&view=rev
Log:
2015-04-28  Dominique d'Humieres  <dominiq@lps.ens.fr>

        PR bootstrap/65910
        * varasm.c (assemble_end_function): Guard ASM_DECLARE_FUNCTION_SIZE.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/varasm.c
Comment 6 David Edelsohn 2015-04-28 17:18:37 UTC
Patch committed.