From 02d44d76584e4d483fe0fc677c12066ec23d67f4 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 4 Apr 2023 08:50:18 +0200 Subject: bfd+ld: when / whether to generate .c files Having been irritated by seeing bfd/elf{32,64}-aarch64.c to be re- generated in x86-only builds, I came across 769a27ade588 ("Re: bfd BLD-POTFILES.in dependencies"). I think this went slightly too far, as outside of maintainer mode dependencies will cause the subset of files to be (re-)generated which are actually needed for the build. Generating them all is only needed when wanting to update certain files under bfd/po/, i.e. in maintainer mode. In the course of looking around in an attempt to try to understand how things are meant to work, I further noticed that ld has got things slightly wrong too: BLD-POTFILES.in depending on $(BLD_POTFILES) isn't quite right (the output doesn't change when any of the enumerated files changes; it's the mere presence which matters); like in bfd it looks like we would better extend BUILT_SOURCES accordingly. Furthermore it became apparent that ld fails to enumerate the .c files generated from the .l and .y ones. While in their absence it was benign whether translatable strings in the source files were actually marked as such, this now becomes relevant. Mark respective strings at the same time, but skipping ones which look to be of interest for debugging purposes only (e.g. such used by printf() enclosed in #ifdef TRACE). --- ld/deffilep.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ld/deffilep.y') diff --git a/ld/deffilep.y b/ld/deffilep.y index 66ce5d5..33c8cf3 100644 --- a/ld/deffilep.y +++ b/ld/deffilep.y @@ -1134,7 +1134,7 @@ def_image_name (const char *name, bfd_vma base, int is_dll) const char* image_name = lbasename (name); if (image_name != name) - einfo ("%s:%d: Warning: path components stripped from %s, '%s'\n", + einfo (_("%s:%d: Warning: path components stripped from %s, '%s'\n"), def_filename, linenumber, is_dll ? "LIBRARY" : "NAME", name); free (def->name); -- cgit v1.1