diff options
| -rw-r--r-- | libexec/rtld-elf/Makefile | 4 | ||||
| -rw-r--r-- | libexec/rtld-elf/rtld-libc/Makefile.inc | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 0dbd2b8aa935..b6ff7681e658 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -128,3 +128,7 @@ ${PROG_FULL}: ${VERSION_MAP} # and are therefore not identical to the ones from the system headers. CFLAGS+= -Wno-redundant-decls .endif + +# Add dependencies on libc and libsys archives after bsd.prog.mk +# includes bsd.libnames.mk so they are defined. +rtld_libc.a: ${LIBC_NOSSP_PIC} ${LIBSYS_PIC} diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index b16f84f398d0..a10bd562a7ce 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -96,7 +96,11 @@ CLEANFILES+=${_obj}.pico # We insert all the .o files from libc_nossp_pic.a into a new rtld_libc.a file # to ensure that only .o files that are actually used end up being included. -rtld_libc.a: ${LIBC_NOSSP_PIC} ${LIBSYS_PIC} ${SRCTOP}/libexec/rtld-elf/rtld-libc/Makefile.inc +# +# XXX: we add dependencies on the source libraries in ../Makefile after +# bsd.prog.mk includes bsd.libnames.mk since variables in dependencies are +# expanded when parsed. +rtld_libc.a: ${SRCTOP}/libexec/rtld-elf/rtld-libc/Makefile.inc @rm -f ${.TARGET} ${AR} x ${LIBC_NOSSP_PIC} ${_rtld_libc_objs} ${AR} x ${LIBSYS_PIC} ${_rtld_libsys_objs} |
