Subject: using MKSTATICLIB
To: None <tech-toolchain@netbsd.org>
From: Simon Burge <simonb@NetBSD.org>
List: tech-toolchain
Date: 09/09/2006 13:50:07
I was playing around with a build using MKSTATICLIB=yes, and this loses
because a few libraries we have are static only, and thus don't end up
getting built at all.
Is adding "MKSTATICLIB=yes" to the library Makefiles the right way to
deal with this? The patch below fixes this for me.
Cheers,
Simon.
--
Index: gnu/lib/libgcc3/libgcc/Makefile
===================================================================
RCS file: /cvsroot/src/gnu/lib/libgcc3/libgcc/Makefile,v
retrieving revision 1.7
diff -d -p -u -r1.7 Makefile
--- gnu/lib/libgcc3/libgcc/Makefile 13 May 2006 01:50:51 -0000 1.7
+++ gnu/lib/libgcc3/libgcc/Makefile 9 Sep 2006 03:46:32 -0000
@@ -2,6 +2,7 @@
REQUIRETOOLS= yes
NOLINT= # defined
+MKSTATICLIB= yes # override, need static lib
LIB= gcc
Index: gnu/lib/libgcc3/libgcc_eh/Makefile
===================================================================
RCS file: /cvsroot/src/gnu/lib/libgcc3/libgcc_eh/Makefile,v
retrieving revision 1.2
diff -d -p -u -r1.2 Makefile
--- gnu/lib/libgcc3/libgcc_eh/Makefile 8 Mar 2004 14:47:27 -0000 1.2
+++ gnu/lib/libgcc3/libgcc_eh/Makefile 9 Sep 2006 03:46:32 -0000
@@ -2,6 +2,7 @@
REQUIRETOOLS= yes
NOLINT= # defined
+MKSTATICLIB= yes # override, need static lib
LIB= gcc_eh
Index: lib/libcompat/Makefile
===================================================================
RCS file: /cvsroot/src/lib/libcompat/Makefile,v
retrieving revision 1.28
diff -d -p -u -r1.28 Makefile
--- lib/libcompat/Makefile 6 Jul 2005 14:43:24 -0000 1.28
+++ lib/libcompat/Makefile 9 Sep 2006 03:46:32 -0000
@@ -2,6 +2,8 @@
.include <bsd.own.mk>
+MKSTATICLIB= yes # override, need static lib
+
LIB= compat
CPPFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -D__LIBCOMPAT_SOURCE__
AFLAGS+=-I${NETBSDSRCDIR}/lib/libc/arch/${MACHINE_ARCH}
Index: lib/libl/Makefile
===================================================================
RCS file: /cvsroot/src/lib/libl/Makefile,v
retrieving revision 1.12
diff -d -p -u -r1.12 Makefile
--- lib/libl/Makefile 7 May 2005 00:23:01 -0000 1.12
+++ lib/libl/Makefile 9 Sep 2006 03:46:32 -0000
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.12 2005/05/07 00:23:01 lukem Exp $
NOPIC= # defined
+MKSTATICLIB= yes # override, need static lib
.include <bsd.own.mk>
Index: lib/librmt/Makefile
===================================================================
RCS file: /cvsroot/src/lib/librmt/Makefile,v
retrieving revision 1.8
diff -d -p -u -r1.8 Makefile
--- lib/librmt/Makefile 19 Aug 2002 14:55:16 -0000 1.8
+++ lib/librmt/Makefile 9 Sep 2006 03:46:32 -0000
@@ -2,6 +2,7 @@
NOPIC= # defined
NOPROFILE= # defined
+MKSTATICLIB= yes # override, need static lib
LIB= rmt
SRCS= rmtlib.c
Index: lib/liby/Makefile
===================================================================
RCS file: /cvsroot/src/lib/liby/Makefile,v
retrieving revision 1.10
diff -d -p -u -r1.10 Makefile
--- lib/liby/Makefile 19 Aug 2002 14:55:18 -0000 1.10
+++ lib/liby/Makefile 9 Sep 2006 03:46:32 -0000
@@ -2,6 +2,7 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/4/93
NOPIC= # defined
+MKSTATICLIB= yes # override, need static lib
LIB= y
SRCS= main.c yyerror.c