Message ID | 20250331164840.3038874-1-adhemerval.zanella@linaro.org |
---|---|
State | Accepted |
Commit | 38c3896d574a27816caab0b5039402834ecdb210 |
Headers | show |
Series | elf: Fix tst-origin build when toolchain defaults to --as-needed | expand |
* Adhemerval Zanella: > From: John David Anglin <danglin@gcc.gnu.org> > > Checked on aarch64-linux-gnu. > --- > elf/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/elf/Makefile b/elf/Makefile > index 1282a5bffb..250348c231 100644 > --- a/elf/Makefile > +++ b/elf/Makefile > @@ -3453,7 +3453,8 @@ $(objpfx)tst-dlopen-constructor-null-mod2.so: \ > CFLAGS-tst-origin.c += $(no-stack-protector) > CFLAGS-liborigin-mod.c += $(no-stack-protector) > # Link tst-origin with liborigin-mod.so, but without a full path. > -LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link)) -lorigin-mod > +LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link)) > +LDLIBS-tst-origin += -lorigin-mod > $(objpfx)tst-origin: +nolink-deps += $(objpfx)liborigin-mod.so > $(objpfx)tst-origin: $(objpfx)liborigin-mod.so > $(objpfx)tst-origin.out: tst-origin.sh $(objpfx)tst-origin Looks good. Reviewed-by: Florian Weimer <fweimer@redhat.com> Thanks, Florian
diff --git a/elf/Makefile b/elf/Makefile index 1282a5bffb..250348c231 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -3453,7 +3453,8 @@ $(objpfx)tst-dlopen-constructor-null-mod2.so: \ CFLAGS-tst-origin.c += $(no-stack-protector) CFLAGS-liborigin-mod.c += $(no-stack-protector) # Link tst-origin with liborigin-mod.so, but without a full path. -LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link)) -lorigin-mod +LDFLAGS-tst-origin += -Wl,-rpath,\$$ORIGIN -L$(subst :, -L,$(rpath-link)) +LDLIBS-tst-origin += -lorigin-mod $(objpfx)tst-origin: +nolink-deps += $(objpfx)liborigin-mod.so $(objpfx)tst-origin: $(objpfx)liborigin-mod.so $(objpfx)tst-origin.out: tst-origin.sh $(objpfx)tst-origin
From: John David Anglin <danglin@gcc.gnu.org> Checked on aarch64-linux-gnu. --- elf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)