From patchwork Sat Jul 7 15:59:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 169601 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 6AE332C020E for ; Sun, 8 Jul 2012 01:59:55 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1342281597; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:From:Date:Message-ID:Subject:To:Cc: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=X8+0U43 fOS3UJ9lXbQrTxQy9tL8=; b=ItHGgAyJbKF0fsdbaRE8pnMgd4aZOssURwrJhlS zMyzXPaaPHhLx0FqYokN41rAgw0xpIPUpv6iLTkHaIRFg2pLnpRkuWrkMwPm4uUn O9Al+hO69l5BdI/BC8J9CYn7kC4YExGFnGNDWGB843Cu8DElE90azfIRQU9rzB6h CR48= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:MIME-Version:Received:From:Date:Message-ID:Subject:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=LVPdOKN19580H3LbCE/1Iiy2gYhnrxUnGQOgCI3J7NqJ3cIbNL8e3JjjpNpnav MMmpTN9Mm6rPITgC8bAiyfhA1v6e+bs/4yHwpiCT4IMJrrGMqwl096X0G+wbnuO4 V1pfVjUEgi5HeUmFzKOHB5ZaAmtNYBv/sJWi0NBVtb7mU=; Received: (qmail 28796 invoked by alias); 7 Jul 2012 15:59:51 -0000 Received: (qmail 28786 invoked by uid 22791); 7 Jul 2012 15:59:49 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Jul 2012 15:59:36 +0000 Received: by lbol5 with SMTP id l5so2298815lbo.20 for ; Sat, 07 Jul 2012 08:59:35 -0700 (PDT) Received: by 10.112.43.67 with SMTP id u3mr15375130lbl.16.1341676775059; Sat, 07 Jul 2012 08:59:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.4.229 with HTTP; Sat, 7 Jul 2012 08:59:14 -0700 (PDT) From: Steven Bosscher Date: Sat, 7 Jul 2012 17:59:14 +0200 Message-ID: Subject: [patch] Define GENERATOR_FILE explicitly for the host gengtype objects To: GCC Patches Cc: Laurynas Biveinis 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 Hello, Since r177358, a host executable gengtype is built so that plugins can use the GTY markers. Even for the host, gengtype is a GENERATOR_FILE, but since the build-% rule doesn't apply to host objects, gengtype was being built without it. So when I removed coretypes.h from double-int.h, my build failed. Fixed by adding -DGENERATOR_FILE explicitly to the host gengtype*.o objects. Bootstrapped on powerpc64-unknown-linux-gnu. OK for trunk? Ciao! Steven * Makefile.in (gengtype-lex.o, gengtype-parse.o, gengtype-state.o, gengtype.o): Add -DGENERATOR_FILE manually for host gengtype objects. Index: Makefile.in =================================================================== --- Makefile.in (revision 189348) +++ Makefile.in (working copy) @@ -3818,23 +3818,40 @@ build/genextract.o : genextract.c $(RTL_BASE_H) $( build/genflags.o : genflags.c $(RTL_BASE_H) $(OBSTACK_H) $(BCONFIG_H) \ $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def + +# The gengtype generator program is special: Two versions are built. +# One is for the build machine, and one is for the host to allow +# plugins to define their types and generate the supporting GGC +# datastructures and routines with GTY markers. +# The host object files depend on CONFIG_H, and the build objects +# on BCONFIG_H. For the build objects, add -DGENERATOR_FILE manually, +# the build-%: rule doesn't apply to them. + gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H) gengtype-lex.o: $(CONFIG_H) +CFLAGS-gengtype-lex.o += -DGENERATOR_FILE build/gengtype-lex.o: $(BCONFIG_H) + gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \ $(SYSTEM_H) gengtype-parse.o: $(CONFIG_H) +CFLAGS-gengtype-parse.o += -DGENERATOR_FILE build/gengtype-parse.o: $(BCONFIG_H) + gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ $(XREGEX_H) gengtype-state.o: $(CONFIG_H) +CFLAGS-gengtype-state.o += -DGENERATOR_FILE build/gengtype-state.o: $(BCONFIG_H) + gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \ rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \ $(OBSTACK_H) $(XREGEX_H) gengtype.o: $(CONFIG_H) +CFLAGS-gengtype.o += -DGENERATOR_FILE build/gengtype.o: $(BCONFIG_H) + build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ errors.h $(READ_MD_H) build/genmodes.o : genmodes.c $(BCONFIG_H) $(SYSTEM_H) errors.h \