This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: breaking cris-elf build with "Re: [RTL] move rtl diagnostics out of toplev.h"


On 1 July 2010 00:05, Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Mon, 28 Jun 2010, Manuel López-Ibáñez wrote:
>> 2010-06-28 ?Manuel López-Ibáñez ?<manu@gcc.gnu.org>
>>
>> ? ? ? * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations
>> ? ? ? to rtl.h.
>> ? ? ? (error_for_asm, warning_for_asm): Move declarations to rtl-error.h.
>> ? ? ? * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations
>> ? ? ? here.
>> ? ? ? * rtl-error.h: New.
>> ? ? ? * regrename.c: Do not include toplev.h. Include rtl-error.h.
>> ? ? ? * rtl-error.c: Likewise.
>> ? ? ? * reload.c: Likewise.
>> ? ? ? * recog.c: ?Likewise.
>> ? ? ? * sel-sched.c: Likewise.
>> ? ? ? * function.c: Likewise.
>> ? ? ? * reg-stack.c: Likewise.
>> ? ? ? * cfgrtl.c: Likewise.
>> ? ? ? * reload1.c: Likewise.
>> ? ? ? * final.c: Include rtl-error.
>>
>
> Looks like this patch broke building cris-elf:
> gcc ? -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE ?-W -Wall
> -Wwrite-strings -Wcast-qual -Wstrict-prototypes
> -Wmissing-prototypes -Wmissing-format-attribute -pedantic
> -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
> -Wold-style-definition -Wc++-compat -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 ?\
> ? ? ? ? ?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
> -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./gmp/.libs
> -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./mpfr/.libs
> -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./mpc/src/.libs -lmpc
> -lmpfr -lgmp -ldl ?-L../zlib -lz -lelf
> libbackend.a(recog.o): In function `constrain_operands':
> /tmp/hpautotest-gcc1/gcc/gcc/recog.c:2616: undefined reference
> to `exact_log2'
> libbackend.a(recog.o): In function `asm_operand_ok':
> /tmp/hpautotest-gcc1/gcc/gcc/recog.c:1756: undefined reference
> to `exact_log2'
> libbackend.a(reload.o): In function `find_reloads':
> /tmp/hpautotest-gcc1/gcc/gcc/reload.c:3363: undefined reference
> to `exact_log2'
> collect2: ld returned 1 exit status
>
> with "warning: implicit declaration of function 'exact_log2'"
> when compiling reload.c and recog.c, probably due to exact_log2
> being used in CONST_OK_FOR_CONSTRAINT_P.
>
> I'm lost in this new scheme of moving includes around, but you
> should know. ?What's the best course of action besides moving to
> constraints.md?

For every file that produces such error, just include toplev.h

#include "toplev.h" /* exact_log2 */

after everything else. I will do it for you if you give me the list of
files affected.

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]