Upgrading build system to new NetBSD revision
The tested targets are the followgin ones: * tools * distribution * sets * release The remaining NetBSD targets have not been disabled nor tested *at all*. Try them at your own risk, they may reboot the earth. For all compliant Makefiles, objects and generated files are put in MAKEOBJDIR, which means you can now keep objects between two branch switching. Same for DESTDIR, please refer to build.sh options. Regarding new or modifications of Makefiles a few things: * Read share/mk/bsd.README * If you add a subdirectory, add a Makefile in it, and have it called by the parent through the SUBDIR variable. * Do not add arbitrary inclusion which crosses to another branch of the hierarchy; If you can't do without it, put a comment on why. If possible, do not use inclusion at all. * Use as much as possible the infrastructure, it is here to make life easier, do not fight it. Sets and package are now used to track files. We have one set called "minix", composed of one package called "minix-sys"
This commit is contained in:
+2
-41
@@ -1,44 +1,5 @@
|
||||
# $NetBSD: Makefile,v 1.15 2009/12/15 04:06:43 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.16 2011/04/15 08:47:02 plunky Exp $
|
||||
|
||||
WARNS?= 3 # XXX: -Wsign-compare issues ld.elf_so source
|
||||
SUBDIR+= elf32 elf64 elf32_compat .WAIT build
|
||||
|
||||
.include <bsd.own.mk> # for MKDYNAMICROOT definition
|
||||
|
||||
PROG= ldd
|
||||
SRCS= ldd.c
|
||||
MAN= ldd.1
|
||||
|
||||
|
||||
SUBDIR+= elf32 elf64 elf32_compat
|
||||
|
||||
.if (${MACHINE_ARCH} != "alpha")
|
||||
LIB_ELF32DIR!= cd ${.CURDIR}/elf32 && ${PRINTOBJDIR}
|
||||
EXTRA_LIBS+= ${LIB_ELF32DIR}/libldd_elf32.a
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
||||
LIB_ELF32COMPATDIR!= cd ${.CURDIR}/elf32_compat && ${PRINTOBJDIR}
|
||||
EXTRA_LIBS+= ${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
|
||||
(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
|
||||
(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
||||
LIB_ELF64DIR!= cd ${.CURDIR}/elf64 && ${PRINTOBJDIR}
|
||||
EXTRA_LIBS+= ${LIB_ELF64DIR}/libldd_elf64.a
|
||||
CPPFLAGS.ldd.c= -DELFSIZE=64
|
||||
.else
|
||||
CPPFLAGS.ldd.c= -DELFSIZE=32
|
||||
.endif
|
||||
|
||||
LDADD+= ${EXTRA_LIBS}
|
||||
DPADD+= ${EXTRA_LIBS}
|
||||
|
||||
.include "Makefile.common"
|
||||
|
||||
.if (${MKDYNAMICROOT} == "no")
|
||||
LDSTATIC?= -static
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
# $NetBSD: Makefile.common,v 1.1 2009/01/06 03:59:56 mrg Exp $
|
||||
# $NetBSD: Makefile.common,v 1.2 2012/02/17 08:13:18 matt Exp $
|
||||
|
||||
# LSC Until it compiles cleanly...
|
||||
NOGCCERROR:=yes
|
||||
|
||||
LDELFSO=${NETBSDSRCDIR}/libexec/ld.elf_so
|
||||
CPPFLAGS+= -I${LDELFSO} -DLIBDIR=\"${LIBDIR}\"
|
||||
@@ -8,6 +11,6 @@ CPPFLAGS+= -D_RTLD_SOURCE
|
||||
|
||||
.if (${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "sparc64") || \
|
||||
(${MACHINE_ARCH} == "arm") || (${MACHINE_ARCH} == "m68k") || \
|
||||
(${MACHINE_ARCH} == "powerpc")
|
||||
(${MACHINE_ARCH} == "powerpc") || (${MACHINE_ARCH:Mmips*} != "")
|
||||
CPPFLAGS+= -DVARPSZ
|
||||
.endif
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
# $NetBSD: Makefile,v 1.1 2011/04/15 08:47:02 plunky Exp $
|
||||
|
||||
.include <bsd.own.mk> # for MKDYNAMICROOT definition
|
||||
|
||||
PROG= ldd
|
||||
SRCS= ldd.c
|
||||
MAN= ldd.1
|
||||
|
||||
.PATH: ${.CURDIR}/..
|
||||
|
||||
.if (${MACHINE_ARCH} != "alpha")
|
||||
LIB_ELF32DIR!= cd ${.CURDIR}/../elf32 && ${PRINTOBJDIR}
|
||||
EXTRA_LIBS+= ${LIB_ELF32DIR}/libldd_elf32.a
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
||||
LIB_ELF32COMPATDIR!= cd ${.CURDIR}/../elf32_compat && ${PRINTOBJDIR}
|
||||
EXTRA_LIBS+= ${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
|
||||
(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
|
||||
(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
|
||||
LIB_ELF64DIR!= cd ${.CURDIR}/../elf64 && ${PRINTOBJDIR}
|
||||
EXTRA_LIBS+= ${LIB_ELF64DIR}/libldd_elf64.a
|
||||
CPPFLAGS.ldd.c= -DELFSIZE=64
|
||||
.else
|
||||
CPPFLAGS.ldd.c= -DELFSIZE=32
|
||||
.endif
|
||||
|
||||
LDADD+= ${EXTRA_LIBS}
|
||||
DPADD+= ${EXTRA_LIBS}
|
||||
|
||||
.include "Makefile.common"
|
||||
|
||||
.if (${MKDYNAMICROOT} == "no")
|
||||
LDSTATIC?= -static
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
@@ -1,8 +1,16 @@
|
||||
# $NetBSD: Makefile,v 1.7 2009/12/13 08:50:56 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.8 2011/03/09 23:10:08 joerg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.init.mk>
|
||||
|
||||
RTLD_FUNCS = \
|
||||
_rtld_tls_allocate \
|
||||
_rtld_tls_free \
|
||||
|
||||
.for _d in ${RTLD_FUNCS}
|
||||
CPPFLAGS+= -D${_d}=_elf32_${_d}
|
||||
.endfor
|
||||
|
||||
CPPFLAGS+= -DELFSIZE=32
|
||||
LIB= ldd_elf32
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.5 2009/12/13 08:50:57 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2011/03/09 23:10:08 joerg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
@@ -30,6 +30,8 @@ RTLD_FUNCS = \
|
||||
_rtld_add_paths \
|
||||
_rtld_process_hints \
|
||||
_rtld_sysctl \
|
||||
_rtld_tls_allocate \
|
||||
_rtld_tls_free \
|
||||
_rtld_load_library
|
||||
|
||||
.for _d in ${RTLD_FUNCS}
|
||||
|
||||
Reference in New Issue
Block a user