diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-01-15 20:48:28 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-01-15 20:55:48 -0500 |
commit | 109a0a7e902f23e7167f89abbc0d8fa0ccca6594 (patch) | |
tree | 69140c62ef540d70211485d814b435ab235e3132 /sim/bfin | |
parent | 8cf531c3dbf593dd3159950dc3fa1bba2c00ac5e (diff) | |
download | fsf-binutils-gdb-109a0a7e902f23e7167f89abbc0d8fa0ccca6594.zip fsf-binutils-gdb-109a0a7e902f23e7167f89abbc0d8fa0ccca6594.tar.gz fsf-binutils-gdb-109a0a7e902f23e7167f89abbc0d8fa0ccca6594.tar.bz2 |
sim: modules.c: fix generation after recent refactors
Add explicit arch-specific modules.c rules to keep the build from
generating an incorrect common/modules.c. Otherwise the pattern
rules would cascade such that it'd look for $arch/modules.o which
turned into common/modules.c which triggered the gen rule.
My local testing of this code didn't catch this bug because of how
Automake manages .Po (dependency files) in incremental builds -- it
was adding extra rules that override the pattern rules which caused
the build to generate correct modules.c files. But when building
from a cold cache, the pattern rules would force common/modules.c to
be used leading to crashes at runtime.
Diffstat (limited to 'sim/bfin')
-rw-r--r-- | sim/bfin/local.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sim/bfin/local.mk b/sim/bfin/local.mk index e6f6662..26ad90e 100644 --- a/sim/bfin/local.mk +++ b/sim/bfin/local.mk @@ -36,6 +36,9 @@ $(%C%_libsim_a_OBJECTS) $(%C%_libsim_a_LIBADD): %D%/hw-config.h noinst_LIBRARIES += %D%/libsim.a +## Override wildcards that trigger common/modules.c to be (incorrectly) used. +%D%/modules.o: %D%/modules.c + %D%/%.o: common/%.c ; $(SIM_COMPILE) -@am__include@ %D%/$(DEPDIR)/*.Po |