Since ld may depend on libctf (if present), and libctf may be relinked by the installation process, libctf must be installed before ld is, or the relink may fail if it calls on symbols or symbol versions that do not exist in any libctf already present on the system. (If none is present, the copy in the build tree will be automatically used, but if one *is* present, it may take precedence and break things.)
(This is a maybe- dependency, so it will work even if libctf is disabled.) ChangeLog 2021-01-26 Nick Alcock <nick.alc...@oracle.com> PR 27250 * Makefile.def: Add install-libctf dependency to install-ld. * Makefile.in: Regenerated. --- Makefile.def | 1 + Makefile.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) I'm probably going to put this into binutils directly, rather than via a later cherry-pick, because this one breaks 'make install' and leaves you with a broken system ld, so fixing it fast is quite important. diff --git a/Makefile.def b/Makefile.def index 3e38f61193f..607eac7fe3c 100644 --- a/Makefile.def +++ b/Makefile.def @@ -463,6 +463,7 @@ dependencies = { module=all-binutils; on=all-intl; }; dependencies = { module=all-binutils; on=all-gas; }; dependencies = { module=all-binutils; on=all-libctf; }; dependencies = { module=all-ld; on=all-libctf; }; +dependencies = { module=install-ld; on=install-libctf; }; // We put install-opcodes before install-binutils because the installed // binutils might be on PATH, and they might need the shared opcodes diff --git a/Makefile.in b/Makefile.in index 03785200dc7..d8a94c4173d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -565,7 +565,7 @@ STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS)) STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS)) -STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use -fprofile-reproducible=parallel-runs +STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g @@ -61234,6 +61234,7 @@ all-stagetrain-ld: maybe-all-stagetrain-libctf all-stagefeedback-ld: maybe-all-stagefeedback-libctf all-stageautoprofile-ld: maybe-all-stageautoprofile-libctf all-stageautofeedback-ld: maybe-all-stageautofeedback-libctf +install-ld: maybe-install-libctf install-binutils: maybe-install-opcodes install-strip-binutils: maybe-install-strip-opcodes install-opcodes: maybe-install-bfd -- 2.30.0.252.gc27e85e57d