Fix fallout from NO_STATIC_MODULES -> OPENPAM_STATIC_MODULES changes;
libpam.a fails to load any modules and does not work at all. At the moment, openpam_load.c at least must be compiled with and without OPENPAM_STATIC_MODULES for static and shared libraries, respectively. Therefore, use CSHLIBFLAGS again, in order to build objects for static and shared libraries separately. This may be ugly, but seems better for me than adding further hacks in libpam/libpam/Makefile, which is already complicated enough...
This commit is contained in:
parent
10afa7e5af
commit
6ce10d32d6
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.inc,v 1.19 2020/04/29 02:16:56 riastradh Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.20 2020/05/23 00:43:33 rin Exp $
|
||||
# Copyright 1998 Juniper Networks, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
@ -42,6 +42,12 @@ CPPFLAGS+= -DOPENPAM_MODULES_DIRECTORY=\"${MODLIBDIR}\"
|
||||
# No debugging
|
||||
#CPPFLAGS+= -DDEBUG
|
||||
|
||||
# XXX
|
||||
# At the moment, openpam_load.c at least must be compiled with and without
|
||||
# OPENPAM_STATIC_MODULES for static and shared libraries, respectively.
|
||||
CPPFLAGS+= -DOPENPAM_STATIC_MODULES
|
||||
CSHLIBFLAGS+= -UOPENPAM_STATIC_MODULES
|
||||
|
||||
# Define the shared library version here. libpam and the modules share a
|
||||
# version, and we need these variables early for module install rules.
|
||||
SHLIB_MAJOR= 4
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.25 2020/05/01 21:58:16 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.26 2020/05/23 00:43:33 rin Exp $
|
||||
#-
|
||||
# Copyright (c) 1998 Juniper Networks, Inc.
|
||||
# All rights reserved.
|
||||
@ -214,8 +214,6 @@ openpam_static_modules.o: openpam_static.o ${STATIC_MODULE_LIBS}
|
||||
${CC} ${LDFLAGS} -nostdlib -o ${.TARGET} -r -Wl,--whole-archive \
|
||||
openpam_static.o ${STATIC_MODULE_LIBS}
|
||||
|
||||
CPPFLAGS.openpam_static.c+= -DOPENPAM_STATIC_MODULES
|
||||
|
||||
CWARNFLAGS.clang+= -Wno-error=tautological-pointer-compare
|
||||
COPTS.openpam_dynamic.c+= ${GCC_NO_CAST_FUNCTION_TYPE}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: mod.mk,v 1.16 2020/04/29 02:16:57 riastradh Exp $
|
||||
# $NetBSD: mod.mk,v 1.17 2020/05/23 00:43:33 rin Exp $
|
||||
|
||||
NOLINT= # don't build a lint library
|
||||
NOPROFILE= # don't build a profile library
|
||||
@ -21,7 +21,6 @@ LIBDPLIBS+= pam ${NETBSDSRCDIR}/lib/libpam/libpam
|
||||
libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}
|
||||
.else
|
||||
libinstall::
|
||||
CPPFLAGS+= -DOPENPAM_STATIC_MODULES
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user