From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id ECA9A3858C56; Sat, 20 Jan 2024 01:26:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECA9A3858C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705713975; bh=cK75mbsGTX12i+xPXbrRF4J+0F5pWKar7vGga8mIf5k=; h=From:To:Subject:Date:From; b=Avcp+YrJn8me53TIQc8Dz8sYQGfGDUZ/fYjt6SoLA1T9IUDioxCCIPKsp4L5mSiza Pvn1HSOixzk6irUcfmt47uUj3YRz9VQxwF8Kl2N9rSMERSHxnyCnoyYZUzgx/iyT6u tF6PGOraQV1cJCDVHcjid8eMSmhkR7005fhTYOgY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] libgloss: add some objcopy/objdump build rules X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/main X-Git-Oldrev: 1adfc9ac37228732bbed2c0923cfc3ae7007724e X-Git-Newrev: 0714c6305adfb91b6560da03dc871a564450495c Message-Id: <20240120012615.ECA9A3858C56@sourceware.org> Date: Sat, 20 Jan 2024 01:26:15 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D0714c6305ad= fb91b6560da03dc871a564450495c commit 0714c6305adfb91b6560da03dc871a564450495c Author: Mike Frysinger Date: Fri Dec 29 01:51:27 2023 -0500 libgloss: add some objcopy/objdump build rules =20 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. Diff: --- libgloss/Makefile.am | 10 ++++++++++ libgloss/Makefile.in | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am index a8a445b1d..a035f8d8a 100644 --- a/libgloss/Makefile.am +++ b/libgloss/Makefile.am @@ -31,6 +31,16 @@ AM_CPPFLAGS =3D -idirafter $(srcroot)/include noinst_LIBRARIES =3D libobjs.a libobjs_a_SOURCES =3D =20 +## Some convenience rules for debugging programs. +%.dis: % + $(AM_V_GEN)$(OBJDUMP) -d $< > $@ +%.bin: % + $(AM_V_GEN)$(OBJCOPY) -O binary $< $@ +%.hex: % + $(AM_V_GEN)$(OBJCOPY) -O ihex $< $@ +%.srec: % + $(AM_V_GEN)$(OBJCOPY) -O srec $< $@ + ## These are roughly topologically sorted in order to make porting more ## streamlined. FLAGS_TO_PASS =3D \ diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in index 6b8375745..eff98872c 100644 --- a/libgloss/Makefile.in +++ b/libgloss/Makefile.in @@ -5693,6 +5693,15 @@ uninstall-am: uninstall-aarch64_cpu_initcpuinitDATA \ .PRECIOUS: Makefile =20 =20 +%.dis: % + $(AM_V_GEN)$(OBJDUMP) -d $< > $@ +%.bin: % + $(AM_V_GEN)$(OBJCOPY) -O binary $< $@ +%.hex: % + $(AM_V_GEN)$(OBJCOPY) -O ihex $< $@ +%.srec: % + $(AM_V_GEN)$(OBJCOPY) -O srec $< $@ + # GNU Make needs to see an explicit $(MAKE) variable in the command it # runs to enable its job server during parallel builds. Hence the # comments below.