Bug 44512 - --enable-build-with-cxx bootstrap fails in revision 160669
Summary: --enable-build-with-cxx bootstrap fails in revision 160669
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: patch
Depends on:
Blocks: 44566 44433 44637 44670
  Show dependency treegraph
 
Reported: 2010-06-13 11:40 UTC by Jorn Wolfgang Rennecke
Modified: 2018-07-08 22:14 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-06-30 20:17:15


Attachments
Patch for unspec{,v}_strings definition (247 bytes, patch)
2010-06-13 12:29 UTC, Richard Sandiford
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2010-06-13 11:40:10 UTC
Bootstrap fails on i686-pc-linux-gnu with:

g++ -c  -g -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual  -fno-common  -DHAVE_CONFIG_H -I. -Ic-family -I../../gcc/gcc -I../../gcc/gcc/c-family -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber  -DCLOOG_PPL_BACKEND  -I/usr/include/libelf  \
                -DBASEVER="\"4.6.0\"" ../../gcc/gcc/c-family/c-cppbuiltin.c -o c-family/c-cppbuiltin.o

...

../../gcc/gcc/c-family/c-cppbuiltin.c: In function ‘void builtin_define_with_hex_fp_value(const char*, tree_node*, int, const char*, const char*, const char*)’:
../../gcc/gcc/c-family/c-cppbuiltin.c:1023: error: invalid conversion from ‘int’ to ‘cpp_builtin_type’
make[3]: *** [c-family/c-cppbuiltin.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/bin/sh ../../gcc/gcc/../move-if-change tmp-attrtab.c insn-attrtab.c
echo timestamp > s-attrtab
rm gcov.pod gfdl.pod cpp.pod fsf-funding.pod gcc.pod
make[3]: Leaving directory `/user/inria/fsf/bldxx-20100613/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/user/inria/fsf/bldxx-20100613'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/user/inria/fsf/bldxx-20100613'
make: *** [bootstrap] Error 2

The code that causes the error was introduced in revision 160626:

2010-06-10  Jakub Jelinek  <jakub@redhat.com>

        * c-family/c-cppbuiltin.c: Include cpp-id-data.h.
        (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
        (lazy_hex_fp_value): New function.
        (builtin_define_with_hex_fp_value): Provide definitions lazily.
        * Makefile.in (c-family/c-cppbuiltin.o): Depend on $(CPP_ID_DATA_H).
Comment 1 Dominique d'Humieres 2010-06-13 11:46:51 UTC
Could it be a duplicate of pr44509?
Comment 2 Jorn Wolfgang Rennecke 2010-06-13 12:04:10 UTC
When I add a cast to the offending line in c-cppbuiltin.c, the bootstrap
shows another failure:

g++  -g -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o i386-c.o \
          dummy-checksum.o main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -lcloog  -lppl_c -lppl -lgmpxx -lmpc -lmpfr -lgmp -rdynamic -ldl  -L../zlib -lz -lelf
g++  -g -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -o cc1plus-dummy \
              cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o incpath.o prefix.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o i386-c.o dummy-checksum.o main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -lcloog  -lppl_c -lppl -lgmpxx -lmpc -lmpfr -lgmp -rdynamic -ldl  -L../zlib -lz -lelf
libbackend.a(print-rtl.o): In function `print_rtx':
/user/inria/fsf/bldxx-20100613-2/gcc/../../gcc/gcc/print-rtl.c:419: undefined reference to `unspecv_strings'
/user/inria/fsf/bldxx-20100613-2/gcc/../../gcc/gcc/print-rtl.c:427: undefined reference to `unspec_strings'
collect2: ld returned 1 exit status
make[3]: *** [cc1-dummy] Error 1
make[3]: *** Waiting for unfinished jobs....
libbackend.a(print-rtl.o): In function `print_rtx':
/user/inria/fsf/bldxx-20100613-2/gcc/../../gcc/gcc/print-rtl.c:419: undefined reference to `unspecv_strings'
/user/inria/fsf/bldxx-20100613-2/gcc/../../gcc/gcc/print-rtl.c:427: undefined reference to `unspec_strings'
collect2: ld returned 1 exit status
make[3]: *** [cc1plus-dummy] Error 1
rm gcov.pod gfdl.pod cpp.pod fsf-funding.pod gcc.pod
make[3]: Leaving directory `/user/inria/fsf/bldxx-20100613-2/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/user/inria/fsf/bldxx-20100613-2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/user/inria/fsf/bldxx-20100613-2'
make: *** [bootstrap] Error 2

[amylaar@laria bldxx-20100613-2]$ nm gcc/insn-enums.o
000007e0 r _ZL14unspec_strings
00000ba0 r _ZL15unspecv_strings
[amylaar@laria bldxx-20100613-2]$ nm gcc/print-rtl.o|grep unspec
         U unspec_strings
         U unspecv_strings

That was presumably introduced in revision 160582:

2010-06-10  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * doc/md.texi: Document the "unspec" and "unspecv" enum names.
        * Makefile.in (OBJS-common): Include insn-enums.o.
        (insn-enums.o): New rule.
        (simple_generated_c): Add insn-enums.c.
        (build/genenums.o): New rule.
        (genprogmd): Add "enums".
        * genconstants.c (print_enum_type): Declare a C string array
        for each enum.
        * genenums.c: New file.
        * print-rtl.c (print_rtx): If defined, use the "unspecv" enum
        for UNSPEC_VOLATILE.  If defined, use the "unspec" enum for both
        UNSPEC and (as a fallback) for UNSPEC_VOLATILE.
Comment 3 Richard Sandiford 2010-06-13 12:29:48 UTC
Created attachment 20902 [details]
Patch for unspec{,v}_strings definition

One fix would be to make insn-enums.c include insn-constants.h,
but I prefer the attached, because it reduces the number of
dependencies.
Comment 4 Jorn Wolfgang Rennecke 2010-06-13 16:56:43 UTC
Subject: Bug 44512

Author: amylaar
Date: Sun Jun 13 16:56:23 2010
New Revision: 160685

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160685
Log:
gcc:
	PR bootstrap/44512
	* genenums.c (main): Output include of insn-constants.h
	* Makefile.in (insn-enums.o): Depend on insn-constants.h.

gcc/c-family:
	PR bootstrap/44512
	* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
	for C++ standard compliance.

Modified:
    branches/multi-target-20100613-branch/gcc/ChangeLog
    branches/multi-target-20100613-branch/gcc/Makefile.in
    branches/multi-target-20100613-branch/gcc/c-family/ChangeLog
    branches/multi-target-20100613-branch/gcc/c-family/c-cppbuiltin.c
    branches/multi-target-20100613-branch/gcc/genenums.c

Comment 6 Jorn Wolfgang Rennecke 2010-06-17 15:20:36 UTC
Subject: Bug 44512

Author: amylaar
Date: Thu Jun 17 15:20:20 2010
New Revision: 160922

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160922
Log:
        PR bootstrap/44512
        * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
        for C++ standard compliance.

Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-cppbuiltin.c

Comment 7 Jorn Wolfgang Rennecke 2010-06-22 18:06:39 UTC
Subject: Bug 44512

Author: amylaar
Date: Tue Jun 22 18:06:11 2010
New Revision: 161220

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161220
Log:
	PR bootstrap/44512
	* genenums.c (main): Output include of insn-constants.h
	* Makefile.in (insn-enums.o): Depend on insn-constants.h.

Modified:
    branches/multi-target-20100622-branch/gcc/ChangeLog
    branches/multi-target-20100622-branch/gcc/Makefile.in
    branches/multi-target-20100622-branch/gcc/genenums.c

Comment 8 Jorn Wolfgang Rennecke 2010-06-25 18:39:16 UTC
Subject: Bug 44512

Author: amylaar
Date: Fri Jun 25 18:38:47 2010
New Revision: 161399

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161399
Log:
        PR bootstrap/44512
        * genenums.c (main): Output include of insn-constants.h
        * Makefile.in (insn-enums.o): Depend on insn-constants.h.

Modified:
    branches/multi-target-20100625-branch/gcc/ChangeLog
    branches/multi-target-20100625-branch/gcc/Makefile.in
    branches/multi-target-20100625-branch/gcc/genenums.c

Comment 9 Jorn Wolfgang Rennecke 2010-07-05 20:18:30 UTC
Subject: Bug 44512

Author: amylaar
Date: Mon Jul  5 20:18:07 2010
New Revision: 161853

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161853
Log:
	PR bootstrap/44512
	* genenums.c (main): Output include of insn-constants.h
	* Makefile.in (insn-enums.o): Depend on insn-constants.h.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/genenums.c

Comment 10 Jorn Wolfgang Rennecke 2010-07-10 05:07:43 UTC
Fix checked in trunk revision 161853.
The current problem is tracked as PR44832.