aboutsummaryrefslogtreecommitdiff
path: root/ld/Makefile.am
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-05-25 14:41:47 +0100
committerAlan Modra <amodra@gmail.com>2022-05-26 12:56:12 +0930
commit9e2bb0cb5e74aed4158f08495534922d7108f928 (patch)
treeed3ed33aef50a4bd5e0f16d3072340a81d0d0b4f /ld/Makefile.am
parentd1a24139adfb2f029c9d52a9c43da44a617f90a4 (diff)
downloadgdb-9e2bb0cb5e74aed4158f08495534922d7108f928.zip
gdb-9e2bb0cb5e74aed4158f08495534922d7108f928.tar.gz
gdb-9e2bb0cb5e74aed4158f08495534922d7108f928.tar.bz2
ld: add --package-metadata
Generate a .note.package FDO package metadata ELF note, following the spec: https://systemd.io/ELF_PACKAGE_METADATA/ If the jansson library is available at build time (and it is explicitly enabled), link ld to it, and use it to validate that the input is correct JSON, to avoid writing garbage to the file. The configure option --enable-jansson has to be used to explicitly enable it (error out when not found). This allows bootstrappers (or others who are not interested) to seamlessly skip it without issues.
Diffstat (limited to 'ld/Makefile.am')
-rw-r--r--ld/Makefile.am6
1 files changed, 3 insertions, 3 deletions
diff --git a/ld/Makefile.am b/ld/Makefile.am
index e53bef1..a3cd789 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -45,7 +45,7 @@ ELF_CLFAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
-DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
-AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
@@ -964,8 +964,8 @@ ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmai
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c \
ldbuildid.c
ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) \
- $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL) $(ZLIB)
+ $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL_DEP) $(JANSSON_LIBS)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBCTF) $(LIBIBERTY) $(LIBINTL) $(ZLIB) $(JANSSON_LIBS)
# Dependency tracking for the generated emulation files.
EXTRA_ld_new_SOURCES += $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)