[1/2] libgloss: xtensa: fix crt0.o rule

Message ID 20231227074534.6579-1-vapier@gentoo.org
State New
Headers
Series [1/2] libgloss: xtensa: fix crt0.o rule |

Commit Message

Mike Frysinger Dec. 27, 2023, 7:45 a.m. UTC
  Don't hardcode a custom rule for this -- reuse libobjs_a_SOURCES
which was designed for this exact scenario.
---
 libgloss/Makefile.in         | 106 ++++++++++++++++++++---------------
 libgloss/xtensa/Makefile.inc |   7 ++-
 2 files changed, 64 insertions(+), 49 deletions(-)
  

Patch

diff --git a/libgloss/xtensa/Makefile.inc b/libgloss/xtensa/Makefile.inc
index 02308e4f3487..3ce02c190e8b 100644
--- a/libgloss/xtensa/Makefile.inc
+++ b/libgloss/xtensa/Makefile.inc
@@ -8,6 +8,10 @@  multilibtool_DATA += \
 	%D%/sys.qemu.specs \
 	%D%/sys.openocd.specs \
 	%D%/crt0.o
+libobjs_a_SOURCES += \
+	%D%/crt0.S \
+	%D%/crt1-sim.S \
+	%D%/crt1-boards.S
 
 multilibtool_LIBRARIES += %D%/libgloss.a
 
@@ -50,6 +54,3 @@  multilibtool_DATA += %D%/boards/esp32s3/memory.elf.ld
 %C%_libsys_openocd_a_CPPFLAGS += -I$(srcdir)/%D%/boards/esp32s3/include
 endif
 endif
-
-%D%/crt0.$(OBJEXT): %D%/crt0.S
-	$(AM_V_CPPAS)$(CPPASCOMPILE) $(CPPFLAGS) -o $@ -c $<