Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpam Fix fallout from NO_STATIC_MODULES -> OPENPAM_STA...
details: https://anonhg.NetBSD.org/src/rev/954d2a6e0cc7
branches: trunk
changeset: 933241:954d2a6e0cc7
user: rin <rin%NetBSD.org@localhost>
date: Sat May 23 00:43:33 2020 +0000
description:
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...
diffstat:
lib/libpam/Makefile.inc | 8 +++++++-
lib/libpam/libpam/Makefile | 4 +---
lib/libpam/modules/mod.mk | 3 +--
3 files changed, 9 insertions(+), 6 deletions(-)
diffs (57 lines):
diff -r 5172f0c3af18 -r 954d2a6e0cc7 lib/libpam/Makefile.inc
--- a/lib/libpam/Makefile.inc Sat May 23 00:32:42 2020 +0000
+++ b/lib/libpam/Makefile.inc Sat May 23 00:43:33 2020 +0000
@@ -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 @@
# 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
diff -r 5172f0c3af18 -r 954d2a6e0cc7 lib/libpam/libpam/Makefile
--- a/lib/libpam/libpam/Makefile Sat May 23 00:32:42 2020 +0000
+++ b/lib/libpam/libpam/Makefile Sat May 23 00:43:33 2020 +0000
@@ -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 @@
${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}
diff -r 5172f0c3af18 -r 954d2a6e0cc7 lib/libpam/modules/mod.mk
--- a/lib/libpam/modules/mod.mk Sat May 23 00:32:42 2020 +0000
+++ b/lib/libpam/modules/mod.mk Sat May 23 00:43:33 2020 +0000
@@ -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 @@
libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}
.else
libinstall::
-CPPFLAGS+= -DOPENPAM_STATIC_MODULES
.endif
.include <bsd.lib.mk>
Home |
Main Index |
Thread Index |
Old Index