From patchwork Mon Dec 24 21:09:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 30830 Received: (qmail 111017 invoked by alias); 24 Dec 2018 21:10:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 111007 invoked by uid 89); 24 Dec 2018 21:10:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=lang, LANG, anchored X-HELO: gateway34.websitewelcome.com Received: from gateway34.websitewelcome.com (HELO gateway34.websitewelcome.com) (192.185.148.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Dec 2018 21:10:25 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway34.websitewelcome.com (Postfix) with ESMTP id E43A81CBD00 for ; Mon, 24 Dec 2018 15:09:29 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id bXTdg9Vcz2qH7bXTdgrL6j; Mon, 24 Dec 2018 15:09:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DNwy5ueqAKsATIY0tvpOlOQLUtODm9X+YehwDGtlogw=; b=yOTT+6mrrJDV/f66C4Agehh2iB +vHirqi6zCGPSzgICar2xswWkjSnZSf1L3VaZ2Tcpd/2//numInHMyuXquRasr6t+ZqHsI9nQPQI2 hT0V5XqvllS985XUttM31igoe; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:38044 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gbXTd-002qYm-Nc; Mon, 24 Dec 2018 15:09:29 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/3] Remove gdbtypes special case from init.c rule Date: Mon, 24 Dec 2018 14:09:25 -0700 Message-Id: <20181224210927.16741-2-tom@tromey.com> In-Reply-To: <20181224210927.16741-1-tom@tromey.com> References: <20181224210927.16741-1-tom@tromey.com> The rule to make init.c has a special case for gdbtypes, with a long explanatory comment. All of this is obsolete, as the globals referred to by the comment no longer exist. This patch simplifies the rule. gdb/ChangeLog 2018-12-24 Tom Tromey * Makefile.in (stamp-init): Remove gdbtypes special case. --- gdb/ChangeLog | 4 ++++ gdb/Makefile.in | 16 +--------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index a2cf02e1a9..38d00b0632 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1836,18 +1836,6 @@ test-cp-name-parser$(EXEEXT): test-cp-name-parser.o $(LIBIBERTY) # FIXME: There is a problem with this approach - init.c may force # unnecessary files to be linked in. -# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that -# the first call is to _initialize_gdbtypes (implemented by explicitly -# putting that function's name first in the init.l-tmp file). This is -# a hack to ensure that all the architecture dependant global -# builtin_type_* variables are initialized before anything else -# (per-architecture code is called in the same order that it is -# registered). The ``correct fix'' is to have all the builtin types -# made part of the architecture and initialize them on-demand (using -# gdbarch_data) just like everything else. The catch is that other -# modules still take the address of these builtin types forcing them -# to be variables, sigh! - # NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is # anchored on the first column and excludes the ``/'' character so # that it doesn't add the $(srcdir) prefix to any file that already @@ -1861,13 +1849,11 @@ stamp-init: $(INIT_FILES) @$(ECHO_INIT_C) echo "Making init.c" @rm -f init.c-tmp init.l-tmp @touch init.c-tmp - @echo gdbtypes > init.l-tmp @-LANG=C ; export LANG ; \ LC_ALL=C ; export LC_ALL ; \ echo $(INIT_FILES) | \ tr ' ' '\012' | \ sed \ - -e '/^gdbtypes.[co]$$/d' \ -e '/^init.[co]$$/d' \ -e '/version.[co]$$/d' \ -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \ @@ -1876,7 +1862,7 @@ stamp-init: $(INIT_FILES) -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \ while read f; do \ sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \ - done >> init.l-tmp + done > init.l-tmp @echo '/* Do not modify this file. */' >>init.c-tmp @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp