Skip to content

Commit

Permalink
bsd.compat.mk: Allow finding non-internal libraries
Browse files Browse the repository at this point in the history
Currently only libexec/rtld-elf32 uses internal LIBC_NOSSP_PIC during
the build but it gets it directly from the objdir rather than a sysroot.
For example, /usr/obj/usr/src/amd64.amd64/obj-lib32/lib/libc/libc_nossp_pic.a.
We don't stage lib32 libraries in WORLDTMP/usr/lib32 and doing so doesn't
buy much.  If we want to use a staged lib32 library then we need to look in
LIBCOMPATTMP where they were staged.  For example if LIBC_PIC were wanted then
look for /usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32/libc_pic.a.

Reported by:	rlibby
Reviewed by:	rlibby
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D27648
  • Loading branch information
bdrewery committed Jan 8, 2021
1 parent 44b8b2a commit 556fcdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions share/mk/bsd.compat.mk
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat}
.if defined(WANT_COMPAT)
LIBDIR_BASE:= /usr/lib${libcompat}
_LIB_OBJTOP= ${LIBCOMPAT_OBJTOP}
LIBDESTDIR:= ${LIBCOMPATTMP}
CFLAGS+= ${LIBCOMPATCFLAGS}
LDFLAGS+= ${CFLAGS} ${LIBCOMPATLDFLAGS}
MACHINE= ${LIBCOMPAT_MACHINE}
Expand Down
2 changes: 1 addition & 1 deletion share/mk/bsd.libnames.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.error bsd.libnames.mk cannot be included directly.
.endif

LIBDESTDIR= ${SYSROOT:U${DESTDIR}}
LIBDESTDIR?= ${SYSROOT:U${DESTDIR}}

.sinclude <src.libnames.mk>

Expand Down

0 comments on commit 556fcdc

Please sign in to comment.