build(romlib): de-duplicate ROMLib wrapper sources

The `romlib_generator.py` script may generate duplicate wrapper sources,
which is undesirable when using them to generate Makefile rules as Make
will warn about duplicated targets.

This change sorts the wrapper sources returned from this script, which
has the effect of also de-duplicating them.

Change-Id: I109607ef94f77113a48cc0d6e07877efd1971dbc
Signed-off-by: Chris Kay <chris.kay@arm.com>
This commit is contained in:
Chris Kay 2024-05-29 21:57:48 +00:00
parent df52e2600d
commit d9db846766

View file

@ -23,8 +23,10 @@ OBJS = $(BUILD_DIR)/jmptbl.o $(BUILD_DIR)/init.o
MAPFILE = $(BUILD_PLAT)/romlib/romlib.map
ifneq ($(PLAT_DIR),)
WRAPPER_SOURCES = $(shell $(ROMLIB_GEN) genwrappers -b $(WRAPPER_DIR) --list ../../$(PLAT_DIR)/jmptbl.i)
WRAPPER_OBJS = $(WRAPPER_SOURCES:.s=.o)
WRAPPER_SOURCES = $(sort $(shell $(ROMLIB_GEN) genwrappers -b $\
$(WRAPPER_DIR) --list ../../$(PLAT_DIR)/jmptbl.i))
WRAPPER_OBJS = $(WRAPPER_SOURCES:.s=.o)
endif
V ?= 0