From 9b0170606d8acb9e8897b01e4b3371b6988bdc44 Mon Sep 17 00:00:00 2001 From: mrg Date: Fri, 31 Oct 2008 20:24:51 +0000 Subject: [PATCH] make MKPIC=no builds work on i368, shark, vax, pmax, sgimips, sparc, maybe all mips and all arm as well. --- compat/libexec/ld.elf_so/Makefile | 7 ++++++- distrib/sets/lists/base/ad.arm | 18 +++++++++--------- distrib/sets/lists/base/md.i386 | 4 ++-- distrib/sets/lists/base/md.shark | 6 +++--- distrib/sets/lists/base/md.sparc | 14 +++++++------- distrib/sets/lists/base/md.vax | 6 +++--- distrib/sets/lists/comp/ad.arm | 4 ++-- distrib/sets/lists/comp/md.i386 | 4 ++-- distrib/sets/lists/comp/md.pmax | 4 ++-- distrib/sets/lists/comp/md.shark | 4 ++-- distrib/sets/lists/comp/md.sparc | 4 ++-- distrib/sets/lists/comp/md.vax | 4 ++-- libexec/ld.aout_so/Makefile | 4 +++- sbin/ldconfig/Makefile | 5 +++-- 14 files changed, 48 insertions(+), 40 deletions(-) diff --git a/compat/libexec/ld.elf_so/Makefile b/compat/libexec/ld.elf_so/Makefile index 3e1764e7f3df..d2c8b0c7211f 100644 --- a/compat/libexec/ld.elf_so/Makefile +++ b/compat/libexec/ld.elf_so/Makefile @@ -1,9 +1,12 @@ -# $NetBSD: Makefile,v 1.1 2008/10/26 07:38:34 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2008/10/31 20:24:51 mrg Exp $ NOMAN= # defined +.include .include +.if ${MKPIC} != "no" + SHLINKINSTALLDIR= /usr/libexec LDFLAGS+= -m32 @@ -31,3 +34,5 @@ ARCHSUBDIR= i386 dependall: ${PROG} .include "${.CURDIR}/Makefile" + +.endif diff --git a/distrib/sets/lists/base/ad.arm b/distrib/sets/lists/base/ad.arm index 41c3476934b3..34649a208e09 100644 --- a/distrib/sets/lists/base/ad.arm +++ b/distrib/sets/lists/base/ad.arm @@ -1,9 +1,9 @@ -# $NetBSD: ad.arm,v 1.9 2004/08/12 16:07:07 lukem Exp $ -./sbin/ldconfig base-sysutil-root -./usr/lib/libarm.so base-sys-shlib -./usr/lib/libarm.so.0 base-sys-shlib -./usr/lib/libarm.so.0.0 base-sys-shlib -./usr/lib/libpmc.so base-sys-shlib -./usr/lib/libpmc.so.0 base-sys-shlib -./usr/lib/libpmc.so.0.0 base-sys-shlib -./usr/libexec/ld.so base-sys-shlib +# $NetBSD: ad.arm,v 1.10 2008/10/31 20:24:51 mrg Exp $ +./sbin/ldconfig base-sysutil-root pic +./usr/lib/libarm.so base-sys-shlib pic +./usr/lib/libarm.so.0 base-sys-shlib pic +./usr/lib/libarm.so.0.0 base-sys-shlib pic +./usr/lib/libpmc.so base-sys-shlib pic +./usr/lib/libpmc.so.0 base-sys-shlib pic +./usr/lib/libpmc.so.0.0 base-sys-shlib pic +./usr/libexec/ld.so base-sys-shlib pic diff --git a/distrib/sets/lists/base/md.i386 b/distrib/sets/lists/base/md.i386 index 2a3c665b7dda..e862db66a2a3 100644 --- a/distrib/sets/lists/base/md.i386 +++ b/distrib/sets/lists/base/md.i386 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.129 2008/10/31 03:34:49 mrg Exp $ +# $NetBSD: md.i386,v 1.130 2008/10/31 20:24:51 mrg Exp $ ./@MODULEDIR@/adosfs base-kernel-modules ./@MODULEDIR@/adosfs/adosfs.kmod base-kernel-modules ./@MODULEDIR@/azalia base-kernel-modules @@ -77,7 +77,7 @@ ./lib/libm387.so base-sys-shlib dynamicroot,pic ./lib/libm387.so.0 base-sys-shlib dynamicroot,pic ./lib/libm387.so.0.1 base-sys-shlib dynamicroot,pic -./sbin/ldconfig base-sysutil-root +./sbin/ldconfig base-sysutil-root pic ./usr/bin/fdformat base-util-bin ./usr/bin/fontedit base-obsolete obsolete ./usr/bin/pmc base-util-bin diff --git a/distrib/sets/lists/base/md.shark b/distrib/sets/lists/base/md.shark index c6041b4f0024..6bf46bb8e7e9 100644 --- a/distrib/sets/lists/base/md.shark +++ b/distrib/sets/lists/base/md.shark @@ -1,6 +1,6 @@ -# $NetBSD: md.shark,v 1.6 2006/09/29 19:03:11 macallan Exp $ +# $NetBSD: md.shark,v 1.7 2008/10/31 20:24:51 mrg Exp $ ./dev/mouse-qms0 base-obsolete obsolete ./dev/qms0 base-obsolete obsolete -./sbin/ldconfig base-sysutil-root -./usr/libexec/ld.so base-sys-shlib +./sbin/ldconfig base-sysutil-root pic +./usr/libexec/ld.so base-sys-shlib pic ./usr/sbin/ofctl base-sysutil-bin diff --git a/distrib/sets/lists/base/md.sparc b/distrib/sets/lists/base/md.sparc index d892c4629ed9..fc4c3d0de916 100644 --- a/distrib/sets/lists/base/md.sparc +++ b/distrib/sets/lists/base/md.sparc @@ -1,12 +1,12 @@ -# $NetBSD: md.sparc,v 1.74 2008/08/25 07:58:37 lukem Exp $ -./lib/libsparc_v8.so.0 base-sys-shlib dynamicroot -./lib/libsparc_v8.so.0.0 base-sys-shlib dynamicroot +# $NetBSD: md.sparc,v 1.75 2008/10/31 20:24:52 mrg Exp $ +./lib/libsparc_v8.so.0 base-sys-shlib dynamicroot,pic +./lib/libsparc_v8.so.0.0 base-sys-shlib dynamicroot,pic ./sbin/edlabel base-sysutil-root -./sbin/ldconfig base-sysutil-root +./sbin/ldconfig base-sysutil-root pic ./usr/bin/fdformat base-util-bin -./usr/lib/libsparc_v8.so.0 base-sys-shlib -./usr/lib/libsparc_v8.so.0.0 base-sys-shlib -./usr/libexec/ld.so base-sys-shlib +./usr/lib/libsparc_v8.so.0 base-sys-shlib pic +./usr/lib/libsparc_v8.so.0.0 base-sys-shlib pic +./usr/libexec/ld.so base-sys-shlib pic ./usr/mdec/binstall base-sysutil-bin ./usr/mdec/boot base-sysutil-bin ./usr/mdec/boot.388000 base-sysutil-bin diff --git a/distrib/sets/lists/base/md.vax b/distrib/sets/lists/base/md.vax index dfada228dce1..eac82cd08f63 100644 --- a/distrib/sets/lists/base/md.vax +++ b/distrib/sets/lists/base/md.vax @@ -1,8 +1,8 @@ -# $NetBSD: md.vax,v 1.25 2004/01/11 10:24:58 lukem Exp $ +# $NetBSD: md.vax,v 1.26 2008/10/31 20:24:52 mrg Exp $ ./boot base-sys-root ./pcs750.bin base-sys-root -./sbin/ldconfig base-sysutil-root -./usr/libexec/ld.so base-sys-shlib +./sbin/ldconfig base-sysutil-root pic +./usr/libexec/ld.so base-sys-shlib pic ./usr/mdec/boot base-sysutil-bin ./usr/mdec/boot.mop base-obsolete obsolete ./usr/mdec/hpboot base-sysutil-bin diff --git a/distrib/sets/lists/comp/ad.arm b/distrib/sets/lists/comp/ad.arm index e0afed486428..c0c7feece09e 100644 --- a/distrib/sets/lists/comp/ad.arm +++ b/distrib/sets/lists/comp/ad.arm @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.30 2008/08/22 13:42:19 lukem Exp $ +# $NetBSD: ad.arm,v 1.31 2008/10/31 20:24:52 mrg Exp $ ./usr/include/arm comp-c-include ./usr/include/arm/ansi.h comp-c-include ./usr/include/arm/aout_machdep.h comp-c-include @@ -88,7 +88,7 @@ ./usr/lib/libpmc.a comp-c-lib ./usr/lib/libpmc_p.a comp-c-proflib profile ./usr/lib/libpmc_pic.a comp-c-piclib -./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug,pic ./usr/libdata/lint/llib-larm.ln comp-c-lintlib lint ./usr/libdata/lint/llib-larm32.ln comp-obsolete obsolete ./usr/libdata/lint/llib-lpmc.ln comp-c-lintlib lint diff --git a/distrib/sets/lists/comp/md.i386 b/distrib/sets/lists/comp/md.i386 index f2abb4c61da4..4d114cb213ec 100644 --- a/distrib/sets/lists/comp/md.i386 +++ b/distrib/sets/lists/comp/md.i386 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.107 2008/10/31 03:34:49 mrg Exp $ +# $NetBSD: md.i386,v 1.108 2008/10/31 20:24:52 mrg Exp $ ./usr/include/emmintrin.h comp-c-include gcccmds ./usr/include/i386 comp-c-include ./usr/include/i386/_G_config.h comp-obsolete obsolete @@ -121,7 +121,7 @@ ./usr/lib/libpmc.a comp-c-lib ./usr/lib/libpmc_p.a comp-c-proflib profile ./usr/lib/libpmc_pic.a comp-c-piclib pic -./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug,pic ./usr/libdata/debug/usr/bin/fdformat.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/pmc.debug comp-util-debug debug ./usr/libdata/debug/usr/sbin/acpidump.debug comp-sysutil-debug debug diff --git a/distrib/sets/lists/comp/md.pmax b/distrib/sets/lists/comp/md.pmax index 5a8f9377ee74..d5c32a20ce0d 100644 --- a/distrib/sets/lists/comp/md.pmax +++ b/distrib/sets/lists/comp/md.pmax @@ -1,4 +1,4 @@ -# $NetBSD: md.pmax,v 1.58 2008/08/22 13:42:19 lukem Exp $ +# $NetBSD: md.pmax,v 1.59 2008/10/31 20:24:52 mrg Exp $ ./usr/include/ieeefp.h comp-c-include ./usr/include/pmax comp-c-include ./usr/include/pmax/_G_config.h comp-obsolete obsolete @@ -65,4 +65,4 @@ ./usr/include/pmax/varargs.h comp-c-include ./usr/include/pmax/vmparam.h comp-c-include ./usr/include/pmax/wchar_limits.h comp-c-include -./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug,pic diff --git a/distrib/sets/lists/comp/md.shark b/distrib/sets/lists/comp/md.shark index afcb7819ce4f..790d8f715e07 100644 --- a/distrib/sets/lists/comp/md.shark +++ b/distrib/sets/lists/comp/md.shark @@ -1,4 +1,4 @@ -# $NetBSD: md.shark,v 1.12 2008/08/22 13:42:19 lukem Exp $ +# $NetBSD: md.shark,v 1.13 2008/10/31 20:24:52 mrg Exp $ ./usr/include/shark comp-c-include ./usr/include/shark/ansi.h comp-c-include ./usr/include/shark/aout_machdep.h comp-c-include @@ -50,5 +50,5 @@ ./usr/include/shark/vmparam.h comp-c-include ./usr/include/shark/wchar_limits.h comp-c-include ./usr/include/ieeefp.h comp-c-include -./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug,pic ./usr/libdata/debug/usr/sbin/ofctl.debug comp-sysutil-debug debug diff --git a/distrib/sets/lists/comp/md.sparc b/distrib/sets/lists/comp/md.sparc index af8a0fd6c1c3..b3b40ffc1995 100644 --- a/distrib/sets/lists/comp/md.sparc +++ b/distrib/sets/lists/comp/md.sparc @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc,v 1.67 2008/08/22 13:42:19 lukem Exp $ +# $NetBSD: md.sparc,v 1.68 2008/10/31 20:24:52 mrg Exp $ ./usr/include/ieeefp.h comp-c-include ./usr/include/sparc comp-c-include ./usr/include/sparc/_G_config.h comp-obsolete obsolete @@ -133,7 +133,7 @@ ./usr/include/sparc64/wchar_limits.h comp-c-include ./usr/include/sparc64/z8530var.h comp-c-include ./usr/libdata/debug/sbin/edlabel.debug comp-sysutil-debug debug -./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug,pic ./usr/libdata/debug/usr/bin/fdformat.debug comp-util-debug debug ./usr/libdata/debug/usr/sbin/apm.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/apmd.debug comp-sysutil-debug debug diff --git a/distrib/sets/lists/comp/md.vax b/distrib/sets/lists/comp/md.vax index 78adce7f1154..f0133e2d3348 100644 --- a/distrib/sets/lists/comp/md.vax +++ b/distrib/sets/lists/comp/md.vax @@ -1,4 +1,4 @@ -# $NetBSD: md.vax,v 1.34 2008/08/22 13:42:19 lukem Exp $ +# $NetBSD: md.vax,v 1.35 2008/10/31 20:24:52 mrg Exp $ ./usr/include/ieeefp.h comp-obsolete obsolete ./usr/include/vax comp-c-include ./usr/include/vax/_G_config.h comp-obsolete obsolete @@ -75,4 +75,4 @@ ./usr/include/vax/wchar_limits.h comp-c-include ./usr/lib/c++rt0.o comp-obsolete obsolete ./usr/lib/scrt0.o comp-obsolete obsolete -./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug +./usr/libdata/debug/sbin/ldconfig.debug comp-sysutil-debug debug,pic diff --git a/libexec/ld.aout_so/Makefile b/libexec/ld.aout_so/Makefile index 271eb3aa481b..7605123a5c99 100644 --- a/libexec/ld.aout_so/Makefile +++ b/libexec/ld.aout_so/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.45 2004/03/19 08:07:28 jmc Exp $ +# $NetBSD: Makefile,v 1.46 2008/10/31 20:24:52 mrg Exp $ .include # for OBJECT_FMT definition .include # for SHLINKINSTALLDIR definition +.if ${MKPIC} != "no" .if (${OBJECT_FMT} == "a.out") PROG= ld.so SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c vfprintf.c @@ -55,6 +56,7 @@ all dependall: ${FILES} ld.so: ld.so.${MACHINE_ARCH} +.endif .endif MAN= ld.aout_so.1 diff --git a/sbin/ldconfig/Makefile b/sbin/ldconfig/Makefile index f7eb98e44a2c..b61b34b5eccf 100644 --- a/sbin/ldconfig/Makefile +++ b/sbin/ldconfig/Makefile @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.21 2002/11/12 14:33:49 itohy Exp $ +# $NetBSD: Makefile,v 1.22 2008/10/31 20:24:52 mrg Exp $ .include # For OBJECT_FMT .include -.if (${OBJECT_FMT} == "a.out" || \ +.if ${MKPIC} != "no" && \ + (${OBJECT_FMT} == "a.out" || \ (${OBJECT_FMT} == "ELF" && \ (${MACHINE_ARCH} == "arm" || \ ${MACHINE_ARCH} == "i386" || \