From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 1/3] Remove gdbtypes special case from init.c rule
Date: Mon, 24 Dec 2018 21:10:00 -0000 [thread overview]
Message-ID: <20181224210927.16741-2-tom@tromey.com> (raw)
In-Reply-To: <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 <tom@tromey.com>
* 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
--
2.17.2
prev parent reply other threads:[~2018-12-24 21:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-24 21:09 [PATCH 0/3] some minor Makefile improvements Tom Tromey
2018-12-24 21:09 ` [PATCH 3/3] Build gdb "nat" files in subdirectory Tom Tromey
2018-12-27 4:29 ` Simon Marchi
2018-12-27 20:03 ` Tom Tromey
2018-12-24 21:10 ` [PATCH 2/3] Make init.c depend on source files Tom Tromey
2018-12-27 4:02 ` Simon Marchi
2018-12-27 4:21 ` Tom Tromey
2018-12-27 4:23 ` Simon Marchi
2018-12-27 4:24 ` Simon Marchi
2018-12-24 21:10 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181224210927.16741-2-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox