From patchwork Wed Jun 30 23:17:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= X-Patchwork-Id: 57459 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C86511007D5 for ; Thu, 1 Jul 2010 09:18:29 +1000 (EST) Received: (qmail 22613 invoked by alias); 30 Jun 2010 23:18:28 -0000 Received: (qmail 22605 invoked by uid 22791); 30 Jun 2010 23:18:27 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jun 2010 23:18:23 +0000 Received: by wwf26 with SMTP id 26so313230wwf.8 for ; Wed, 30 Jun 2010 16:18:20 -0700 (PDT) Received: by 10.216.161.14 with SMTP id v14mr142523wek.37.1277939900545; Wed, 30 Jun 2010 16:18:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.28.76 with HTTP; Wed, 30 Jun 2010 16:17:59 -0700 (PDT) In-Reply-To: References: From: =?ISO-8859-1?Q?Manuel_L=F3pez=2DIb=E1=F1ez?= Date: Thu, 1 Jul 2010 01:17:59 +0200 Message-ID: Subject: Re: breaking cris-elf build with "Re: [RTL] move rtl diagnostics out of toplev.h" To: Hans-Peter Nilsson Cc: Gcc Patch List , Richard Guenther X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 1 July 2010 01:07, Hans-Peter Nilsson wrote: > On Thu, 1 Jul 2010, Manuel López-Ibáñez wrote: >> On 1 July 2010 00:05, Hans-Peter Nilsson wrote: >> > 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. > > Thanks, the list seen in the quoted buildlog above is complete. > > brgds, H-P Richard, can I commit the following patch to fix the breakage or you want me to wait until the merge is over? 2010-06-30 Manuel López-Ibáñez * reload.c: Include toplev.h. * recog.c: Likewise. * Makefile.in: Adjust dependencies. BTW, is there a rule against targets including the headers that they need. Can .md files include headers? Manuel. Index: gcc/recog.c =================================================================== --- gcc/recog.c (revision 161633) +++ gcc/recog.c (working copy) @@ -42,6 +42,7 @@ #include "timevar.h" #include "tree-pass.h" #include "df.h" +#include "toplev.h" /* exact_log2 may be used by targets */ #ifndef STACK_PUSH_CODE #ifdef STACK_GROWS_DOWNWARD Index: gcc/reload.c =================================================================== --- gcc/reload.c (revision 161633) +++ gcc/reload.c (working copy) @@ -111,6 +111,7 @@ #include "params.h" #include "target.h" #include "ira.h" +#include "toplev.h" /* exact_log2 may be used by targets */ /* True if X is a constant that can be forced into the constant pool. */ #define CONST_POOL_OK_P(X) \ Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 161633) +++ gcc/Makefile.in (working copy) @@ -3269,7 +3269,7 @@ reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(FLAGS_H) output.h $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) \ hard-reg-set.h insn-config.h $(REGS_H) $(FUNCTION_H) real.h \ - addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h + addresses.h $(TM_P_H) $(PARAMS_H) $(TARGET_H) $(DF_H) ira.h $(TOPLEV_H) reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_ERROR_H) \ $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \ $(BASIC_BLOCK_H) $(RECOG_H) output.h $(FUNCTION_H) $(TM_P_H) \ @@ -3409,7 +3409,7 @@ $(FUNCTION_H) $(BASIC_BLOCK_H) $(REGS_H) $(RECOG_H) $(EXPR_H) \ $(FLAGS_H) insn-config.h $(INSN_ATTR_H) output.h reload.h \ addresses.h $(TM_P_H) $(TIMEVAR_H) $(TREE_PASS_H) hard-reg-set.h \ - $(DF_H) $(DBGCNT_H) $(TARGET_H) + $(DF_H) $(DBGCNT_H) $(TARGET_H) $(TOPLEV_H) reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_ERROR_H) $(TREE_H) $(RECOG_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) \ insn-config.h reload.h $(FUNCTION_H) $(TM_P_H) $(GGC_H) \