From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] libgloss: add some objcopy/objdump build rules
Date: Fri, 29 Dec 2023 20:56:10 -0500 [thread overview]
Message-ID: <20231230015610.23359-1-vapier@gentoo.org> (raw)
A bunch of ports have manual rules to generate disassembly, srec, and
binary files from test programs. Add top-level pattern rules so every
test program gets this for free, and we don't have to duplicate it in
every subdir.
---
libgloss/Makefile.am | 8 ++++++++
libgloss/Makefile.in | 7 +++++++
2 files changed, 15 insertions(+)
diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index 0d4460b5801e..f74f515adba2 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -31,6 +31,14 @@ AM_CPPFLAGS = -idirafter $(srcroot)/include
noinst_LIBRARIES = libobjs.a
libobjs_a_SOURCES =
+## Some convenience rules for debugging programs.
+%.dis: %
+ $(AM_V_GEN)$(OBJDUMP) -d $< > $@
+%.bin: %
+ $(AM_V_GEN)$(OBJCOPY) -O binary $< $@
+%.srec: %
+ $(AM_V_GEN)$(OBJCOPY) -O srec $< $@
+
## These are roughly topologically sorted in order to make porting more
## streamlined.
FLAGS_TO_PASS = \
--
2.43.0
reply other threads:[~2023-12-30 1:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231230015610.23359-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=newlib@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).