Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
- Fix for default mtree style
- Update libelf
- Importing libexecinfo
- Resynchronize GCC, mpc, gmp, mpfr
- build.sh: Replace params with show-params.
This has been done as the make target has been renamed in the same
way, while a new target named params has been added. This new
target generates a file containing all the parameters, instead of
printing it on the console.
- Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
get getservbyport() out of the inner loop
Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
175
tools/Makefile
175
tools/Makefile
@@ -1,12 +1,34 @@
|
||||
# $NetBSD: Makefile,v 1.157 2012/09/20 15:50:20 pooka Exp $
|
||||
# $NetBSD: Makefile,v 1.170 2013/09/02 14:34:57 joerg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.endian.mk>
|
||||
|
||||
.if defined(HAVE_GCC) || defined(HAVE_PCC)
|
||||
# Make sure that the ordered build/install processing applies when using
|
||||
# plain make.
|
||||
.MAIN: build_install
|
||||
|
||||
# TOOLDIR must be valid, unless MKTOOLS=no
|
||||
.if ${MKTOOLS:Uyes} != "no"
|
||||
.if "${TOOLDIR}" == ""
|
||||
.error "TOOLDIR is undefined or empty"
|
||||
.elif "${TOOLDIR:tW:M/*}" == ""
|
||||
.error "TOOLDIR is not an absolute path: ${TOOLDIR}"
|
||||
#.elif !exists(TOOLDIR) # XXX .exists fails for directories
|
||||
#.error "TOOLDIR does not exist: ${TOOLDIR}"
|
||||
.endif
|
||||
.endif # MKTOOLS != no
|
||||
|
||||
# TOOLS_BUILDRUMP == yes builds only the subset of the tools required
|
||||
# for building rump kernels and the hypervisor. It is typically used
|
||||
# when building rump kernels targeted for non-NetBSD systems (via
|
||||
# buildrump.sh), and should not be set for a regular "make build".
|
||||
TOOLS_BUILDRUMP?=no
|
||||
|
||||
.if ${TOOLCHAIN_MISSING} == "no"
|
||||
.if defined(HAVE_GCC)
|
||||
TOOLCHAIN_BITS= gmake .WAIT
|
||||
.endif
|
||||
|
||||
.if ${TOOLCHAIN_MISSING} == "no"
|
||||
.if defined(HAVE_GCC)
|
||||
.if ${HAVE_GCC} >= 45
|
||||
TOOLCHAIN_BITS+= gmp .WAIT
|
||||
@@ -23,7 +45,7 @@ TOOLCHAIN_BITS+= binutils .WAIT
|
||||
.if defined(HAVE_GCC)
|
||||
.if ${TOOLCHAIN_MISSING} == "no"
|
||||
TOOLCHAIN_BITS+= gcc
|
||||
. if ${MKCROSSGDB:Uno} != "no"
|
||||
. if ${MKCROSSGDB:Uno} != "no" # LSC: Doesn't work || make(obj)
|
||||
TOOLCHAIN_BITS+= gdb
|
||||
. endif
|
||||
TOOLCHAIN_BITS+= .WAIT
|
||||
@@ -48,7 +70,7 @@ DTRACE_BITS=
|
||||
.if ${MKDTRACE} != "no"
|
||||
DTRACE_BITS+= .WAIT libelf
|
||||
DTRACE_BITS+= .WAIT libdwarf
|
||||
DTRACE_BITS+= .WAIT libctf
|
||||
DTRACE_BITS+= .WAIT libctf
|
||||
DTRACE_BITS+= .WAIT ctfconvert ctfmerge
|
||||
.endif
|
||||
|
||||
@@ -57,39 +79,75 @@ LINT_BITS=
|
||||
LINT_BITS= lint lint2
|
||||
.endif
|
||||
|
||||
# All of host-mkdep, compat, and binstall are needed before anything
|
||||
# else. Within this group, they must be built in a specific order, and
|
||||
# all of them must be built before any of them is installed. They may
|
||||
# be installed in any order. This can't be expressed using the .WAIT
|
||||
# notation inside the SUBDIR list.
|
||||
#
|
||||
# XXX .ORDER does not work when multiple targets are passed on the
|
||||
# make command line without "-j", so use dependencies in addition to .ORDER.
|
||||
#
|
||||
.ORDER: dependall-host-mkdep dependall-compat dependall-binstall
|
||||
.if make(dependall-host-mkdep) && make(dependall-compat)
|
||||
dependall-compat: dependall-host-mkdep
|
||||
.endif
|
||||
.if make(dependall-compat) && make(dependall-binstall)
|
||||
dependall-binstall: dependall-compat
|
||||
.endif
|
||||
|
||||
# Dependencies in SUBDIR below ordered to maximize parallel ability.
|
||||
SUBDIR= host-mkdep .WAIT compat .WAIT \
|
||||
binstall .WAIT mktemp .WAIT sed .WAIT \
|
||||
genassym join \
|
||||
lorder makewhatis mkdep mtree nbperf .WAIT tsort \
|
||||
m4 \
|
||||
.WAIT texinfo \
|
||||
.WAIT mkfs.mfs \
|
||||
.WAIT toproto \
|
||||
.WAIT yacc \
|
||||
.WAIT awk \
|
||||
# See above for special treatment for host-mkdep, compat, and binstall.
|
||||
#
|
||||
SUBDIR= host-mkdep compat binstall \
|
||||
.WAIT mktemp .WAIT sed .WAIT
|
||||
.if ${TOOLS_BUILDRUMP} == "no"
|
||||
SUBDIR+= genassym \
|
||||
${LINT_BITS} \
|
||||
makewhatis mtree nbperf .WAIT
|
||||
.endif
|
||||
|
||||
SUBDIR+= join lorder m4 mkdep tsort .WAIT yacc .WAIT awk .WAIT lex
|
||||
|
||||
.if ${TOOLS_BUILDRUMP} == "no"
|
||||
SUBDIR += .WAIT texinfo \
|
||||
.WAIT tic \
|
||||
.WAIT lex \
|
||||
.WAIT pax \
|
||||
.WAIT ${TOOLCHAIN_BITS} \
|
||||
${DTRACE_BITS} \
|
||||
cat cksum \
|
||||
file \
|
||||
.WAIT \
|
||||
pwd_mkdb stat zic \
|
||||
partition \
|
||||
writeisofs
|
||||
.WAIT \
|
||||
.WAIT \
|
||||
.WAIT \
|
||||
.WAIT \
|
||||
pwd_mkdb stat zic
|
||||
.endif
|
||||
.if defined(__MINIX)
|
||||
SUBDIR += \
|
||||
mkfs.mfs \
|
||||
partition \
|
||||
toproto \
|
||||
writeisofs
|
||||
.else
|
||||
SUBDIR+= .WAIT config
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
.if ${MKLLVM} != "no"
|
||||
# .WAIT between llvm-tblgen and llvm-clang-tblgen ensures install
|
||||
# rules works correctly
|
||||
SUBDIR+= \
|
||||
llvm .WAIT \
|
||||
llvm-lib/libLLVMSupport llvm-lib/libLLVMTableGen .WAIT \
|
||||
llvm-tblgen .WAIT llvm-clang-tblgen .WAIT \
|
||||
llvm-tblgen llvm-clang-tblgen .WAIT \
|
||||
llvm-include .WAIT \
|
||||
llvm-lib .WAIT \
|
||||
llvm-clang
|
||||
.if ${MKLLD} != "no"
|
||||
SUBDIR+= llvm-lld
|
||||
.endif
|
||||
.if ${MKMCLINKER} != "no"
|
||||
SUBDIR+= llvm-mcld
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${MKMAN} != "no" || ${MKDOC} != "no" || ${MKHTML} != "no"
|
||||
@@ -99,6 +157,8 @@ SUBDIR+= groff
|
||||
SUBDIR+= mandoc
|
||||
.endif
|
||||
|
||||
.if ${TOOLS_BUILDRUMP} == "no"
|
||||
|
||||
.if ${MKMAINTAINERTOOLS:Uno} != "no"
|
||||
SUBDIR+= autoconf .WAIT gettext
|
||||
.endif
|
||||
@@ -154,12 +214,20 @@ SUBDIR+= hp300-mkboot
|
||||
.endif
|
||||
|
||||
.if !defined(__MINIX)
|
||||
.if ${MACHINE} == "evbarm" \
|
||||
&& ${MACHINE_CPU} == "arm" \
|
||||
&& ${TARGET_ENDIANNESS} == "1234"
|
||||
SUBDIR+= elftosb
|
||||
.endif
|
||||
|
||||
.if ${MACHINE} == "evbarm" || ${MACHINE} == "evbmips" || \
|
||||
${MACHINE} == "evbppc" || ${MACHINE} == "sandpoint"
|
||||
SUBDIR+= mkubootimage
|
||||
.endif
|
||||
.endif # !defined(__MINIX)
|
||||
|
||||
.endif # TOOLCHAIN_BUILDRUMP
|
||||
|
||||
check_MKTOOLS: .PHONY .NOTMAIN
|
||||
.if ${MKTOOLS:Uyes} == "no"
|
||||
@echo '*** WARNING: "MKTOOLS" is set to "no"; this will prevent building and'
|
||||
@@ -169,22 +237,19 @@ check_MKTOOLS: .PHONY .NOTMAIN
|
||||
.endif
|
||||
|
||||
.if ${MKTOOLS:Uyes} == "no" || ${USETOOLS} != "yes" # {
|
||||
SUBDIR= # empty
|
||||
realall realdepend install: check_MKTOOLS
|
||||
|
||||
.for dir in ${SUBDIR:N.WAIT}
|
||||
all-${dir} depend-${dir} dependall-${dir} install-${dir}:
|
||||
@true
|
||||
.endfor
|
||||
.endif # }
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
.include <bsd.buildinstall.mk>
|
||||
.include <bsd.obj.mk>
|
||||
|
||||
.if !defined(PREVIOUSTOOLDIR)
|
||||
. if exists(PREVIOUSTOOLDIR)
|
||||
PREVIOUSTOOLDIR!= cat PREVIOUSTOOLDIR
|
||||
. else
|
||||
PREVIOUSTOOLDIR=
|
||||
PREVIOUSTOOLDIR=
|
||||
. endif
|
||||
.endif
|
||||
|
||||
@@ -201,59 +266,5 @@ realall realdepend: .MAKE
|
||||
.endif
|
||||
echo ${TOOLDIR} >PREVIOUSTOOLDIR
|
||||
|
||||
# For each .WAIT point, make sure the immediately preceding target is
|
||||
# installed before building anything after that point.
|
||||
# (dsl: which means that with: 'a b .WAIT c' the build of 'c' waits for the
|
||||
# install of 'b', but not the install of 'a'.)
|
||||
#
|
||||
# We use the "internal" targets and dependencies generated by <bsd.subdir.mk>
|
||||
# to achieve this. These targets look like:
|
||||
# subdir-all: all-dir1 [.WAIT] all-dir2 etc..
|
||||
# subdir-install: install-dir1 [.WAIT] install-dir2 etc..
|
||||
# and so on for each element in ${TARGETS}, with .WAIT sources inserted at
|
||||
# places corresponding to the .WAITs in our $SUBDIR variable.
|
||||
#
|
||||
# Also, since we're now mixing `install' with `all' and `depend' targets
|
||||
# an order relationship between those in each individual subdirectory
|
||||
# must be established.
|
||||
#
|
||||
_deps:=
|
||||
_prev:=
|
||||
|
||||
.for d in ${SUBDIR} # {
|
||||
_this:= ${d}
|
||||
|
||||
.if ${_this} == ".WAIT" # {
|
||||
|
||||
# setup dependency to apply to all/depend targets in the next group
|
||||
_deps:= ${_deps} ${_prev:S/^/install-/}
|
||||
|
||||
# if we're building *only* individual targets (i.e. "dependall-yacc"),
|
||||
# make sure prerequisite tools build before installing
|
||||
# XXX: dsl: this is likely to generate a dependency loop since there is
|
||||
# a .ORDER releation between the nodes as well.
|
||||
.if !make(all) && !make(dependall) && !make(install)
|
||||
install-${_prev}: dependall-${_prev}
|
||||
.endif
|
||||
|
||||
.else # ${_this} != ".WAIT" # } {
|
||||
|
||||
# order depend/all/install targets for ${d} subdir.
|
||||
.ORDER: depend-${d} all-${d} dependall-${d} install-${d}
|
||||
|
||||
# prevent cleandir in real{all,depend} from interfering with subdir makes
|
||||
.ORDER: realdepend dependall-${d}
|
||||
.ORDER: realdepend depend-${d}
|
||||
.ORDER: realall all-${d}
|
||||
|
||||
# make all/depend-${d} dependent on list of install targets
|
||||
depend-${d} all-${d} dependall-${d}: ${_deps}
|
||||
|
||||
.endif # ${_this} != ".WAIT" # }
|
||||
|
||||
# stash current name in case the next entry is .WAIT
|
||||
_prev:= ${d}
|
||||
.endfor # }
|
||||
|
||||
cleandir:
|
||||
rm -f ${CLEANFILES}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.gnuhost,v 1.39 2012/06/19 21:48:33 hans Exp $
|
||||
# $NetBSD: Makefile.gnuhost,v 1.42 2013/08/13 20:41:25 drochner Exp $
|
||||
#
|
||||
# Rules used when building a GNU host package. Expects MODULE to be set.
|
||||
#
|
||||
@@ -26,6 +26,7 @@ MAKE_PROGRAM?= ${MAKE}
|
||||
|
||||
GNUHOSTDIST?= ${.CURDIR}/../../gnu/dist/${MODULE}
|
||||
|
||||
.if defined(__MINIX)
|
||||
# AL - MINIX /usr/src does not have the sources for the GNU utilities
|
||||
# in-tree (they are much bigger than Minix itself!) So to successfully
|
||||
# use them while cross-compiling, we have to fetch them. The success of
|
||||
@@ -40,6 +41,15 @@ ${GNUHOSTDIST:H}/.gitignore: ${GNUHOSTDIST:H}/fetch.sh
|
||||
_gnu_get_src=${GNUHOSTDIST:H}/.gitignore
|
||||
.endif # exists(GNUHOSTDIST:H/fetch.sh) on MINIX
|
||||
|
||||
# AL - Special target for MINIX, reset the source tree as pristine
|
||||
.if ${CLEANFETCHED:Uno} == "yes" && exists(${GNUHOSTDIST:H}/fetch.sh)
|
||||
cleandir: clean_gnu_src
|
||||
clean_gnu_src:
|
||||
-rm -r -f ${GNUHOSTDIST} ${GNUHOSTDIST:H}/.gitignore
|
||||
# XXX CHECKME: could have used the content of .gitignore as well?
|
||||
.endif # CLEANFETCHED == yes
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
FIND_ARGS+= \! \( -type d \( \
|
||||
-name 'CVS' -o \
|
||||
-name 'config' -o \
|
||||
@@ -65,6 +75,7 @@ CONFIGURE_ENV+= \
|
||||
AWK=${TOOL_AWK:Q} \
|
||||
CC=${HOST_CC:Q} \
|
||||
CFLAGS=${HOST_CFLAGS:Q} \
|
||||
CONFIG_SHELL=${HOST_SH:Q} \
|
||||
CPPFLAGS=${HOST_CPPFLAGS:Q} \
|
||||
CXX=${HOST_CXX:Q} \
|
||||
CXXFLAGS=${HOST_CXXFLAGS:Q} \
|
||||
@@ -152,12 +163,4 @@ clean: clean.gnu
|
||||
clean.gnu:
|
||||
-rm -r -f .*_done build
|
||||
|
||||
# AL - Special target for MINIX, reset the source tree as pristine
|
||||
.if ${CLEANFETCHED:Uno} == "yes" && exists(${GNUHOSTDIST:H}/fetch.sh)
|
||||
cleandir: clean_gnu_src
|
||||
clean_gnu_src:
|
||||
-rm -r -f ${GNUHOSTDIST} ${GNUHOSTDIST:H}/.gitignore
|
||||
# XXX CHECKME: could have used the content of .gitignore as well?
|
||||
.endif # CLEANFETCHED == yes
|
||||
|
||||
.include <bsd.hostprog.mk>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.host,v 1.28 2011/04/10 16:52:36 joerg Exp $
|
||||
# $NetBSD: Makefile.host,v 1.31 2013/06/14 16:10:02 tsutsui Exp $
|
||||
|
||||
NOINFO= # defined
|
||||
NOLINT= # defined
|
||||
@@ -7,13 +7,15 @@ NOMAN= # defined
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.ifndef NOCOMPATLIB
|
||||
COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
|
||||
.-include "${COMPATOBJ}/defs.mk"
|
||||
# Use TOOLDIR copy of libnbcompat and associated *.h files
|
||||
.-include "${TOOLDIR}/share/compat/defs.mk"
|
||||
.elif !empty(.MAKE.OS:M*CYGWIN*)
|
||||
HOSTEXEEXT=.exe
|
||||
.endif
|
||||
|
||||
.if ${HOST_OSTYPE:C/\-.*//} == "Minix"
|
||||
LDADD+= -lcompat_minix
|
||||
.endif
|
||||
.endif # ${HOST_OSTYPE:C/\-.*//} == "Minix"
|
||||
|
||||
# Resolve pathnames in variables.
|
||||
_RESOLVE_VARS= CFLAGS CPPFLAGS DPADD HOST_CPPFLAGS LDADD
|
||||
@@ -47,6 +49,7 @@ HOSTPROGNAME?= ${HOSTPROG}
|
||||
HOST_BINDIR?= ${TOOLDIR}/bin
|
||||
HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
|
||||
HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
|
||||
HOST_INSTALLPROG?=${HOST_BINDIR}/${HOSTPROGNAME}${HOSTEXEEXT}
|
||||
.undef LINKS
|
||||
|
||||
SRCS?= ${HOSTPROG}.c
|
||||
@@ -56,14 +59,17 @@ SRCS+= ${HOST_SRCS}
|
||||
|
||||
# Install rule.
|
||||
realinstall: install.host install.files
|
||||
install.host: ${HOST_BINDIR}/${HOSTPROGNAME}
|
||||
${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
|
||||
install.host: ${HOST_INSTALLPROG}
|
||||
${HOST_INSTALLPROG}:: ${HOSTPROG}
|
||||
${_MKTARGET_INSTALL}
|
||||
mkdir -p ${HOST_BINDIR}
|
||||
${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
|
||||
.if !empty(.MAKE.OS:M*CYGWIN*)
|
||||
${HOST_SH} ${NETBSDSRCDIR}/tools/binstall/mkmanifest ${.TARGET}
|
||||
.endif
|
||||
|
||||
.if ${MKUPDATE} == "no"
|
||||
.PHONY: ${HOST_BINDIR}/${HOSTPROGNAME}
|
||||
.PHONY: ${HOST_INSTALLPROG}
|
||||
.endif
|
||||
|
||||
install.files:
|
||||
|
||||
@@ -38,7 +38,6 @@ beforedepend:
|
||||
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude
|
||||
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/sys
|
||||
${HOST_INSTALL_DIR} ${TOOLDIR}/include/nbinclude/ufs
|
||||
.if !defined(__MINIX)
|
||||
cd ${_ARCHDIR} && \
|
||||
${TOOL_PAX} -s /include\\/// -rw ${_ARCH_INCS} \
|
||||
${TOOLDIR}/include/nbinclude
|
||||
@@ -48,6 +47,5 @@ beforedepend:
|
||||
${TOOL_PAX} -rw ${_SYSINCS} ${TOOLDIR}/include/nbinclude/sys
|
||||
cd ${_UFSDIR} && \
|
||||
${TOOL_PAX} -rw ${_UFS_INCS} ${TOOLDIR}/include/nbinclude/ufs
|
||||
.endif
|
||||
cd ${TOOLDIR}/include/nbinclude && rm -f machine && \
|
||||
${HOST_INSTALL_SYMLINK} ${MACHINE} machine
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
# $NetBSD: Makefile,v 1.7 2007/07/03 16:29:24 joerg Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2013/03/16 22:32:50 christos Exp $
|
||||
|
||||
NOMAN=
|
||||
.include <bsd.own.mk>
|
||||
|
||||
HOSTPROGNAME= ${MACHINE_GNU_PLATFORM}-install
|
||||
HOST_SRCDIR= usr.bin/xinstall
|
||||
CPPFLAGS+= -I${.CURDIR}/../compat/sys
|
||||
CPPFLAGS+= -DTARGET_STRIP=\"${STRIP}\"
|
||||
|
||||
# Prevent Makefile.host from trying to use the version of libnbcompat
|
||||
# from ${TOOLDIR}.
|
||||
NOCOMPATLIB=
|
||||
|
||||
# Use uninstalled copy of host-mkdep
|
||||
HOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep && ${PRINTOBJDIR}
|
||||
HOST_MKDEP= ${HOST_MKDEP_OBJ}/host-mkdep
|
||||
MKDEP= ${HOST_MKDEP}
|
||||
|
||||
# Use uninstalled copy of libnbcompat and associated *.h files
|
||||
COMPATLIB_UNINSTALLED= yes
|
||||
COMPATOBJ!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
|
||||
.-include "${COMPATOBJ}/defs.mk"
|
||||
|
||||
.include "${.CURDIR}/../Makefile.host"
|
||||
|
||||
# Use uninstalled copy of the install program
|
||||
INSTALL= ./xinstall
|
||||
|
||||
|
||||
33
tools/binstall/mkmanifest
Executable file
33
tools/binstall/mkmanifest
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
makeone() {
|
||||
local name="$(basename "$1" .exe)"
|
||||
case $name in
|
||||
*instal*|*patch*|*update*|*setup*)
|
||||
;;
|
||||
*)
|
||||
return;;
|
||||
esac
|
||||
cat << _EOF > ${1%.exe}.exe.manifest
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- $NetBSD: mkmanifest,v 1.1 2013/02/17 00:36:40 christos Exp $ -->
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0"
|
||||
processorArchitecture="X86"
|
||||
name="$name"
|
||||
type="win32"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
_EOF
|
||||
}
|
||||
|
||||
for i
|
||||
do
|
||||
makeone "$i"
|
||||
done
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: mknative-binutils,v 1.8 2011/09/25 04:00:58 christos Exp $
|
||||
# $NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp $
|
||||
#
|
||||
# Shell script for generating all the constants needed for a native
|
||||
# platform build of src/external/gpl3/binutils
|
||||
@@ -122,6 +122,8 @@ get_binutils () {
|
||||
DEFS EMUL EMULATION_OFILES INCLUDES OFILES STRINGIFY TEXINFOS
|
||||
getvars ld/Makefile \
|
||||
target_alias | sed 's,[\._0-9A-Z]*$,,'
|
||||
getvars ld/Makefile \
|
||||
enable_initfini_array
|
||||
} | write_mk external/gpl3/binutils/usr.bin/ld/arch/$MACHINE_ARCH/defs.mk
|
||||
|
||||
for f in config ldemul-list; do
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# $NetBSD: Makefile,v 1.59 2012/06/04 19:06:45 joerg Exp $
|
||||
# $NetBSD: Makefile,v 1.69 2013/08/06 22:04:25 apb Exp $
|
||||
|
||||
HOSTLIB= nbcompat
|
||||
|
||||
.ifndef __MINIX
|
||||
.include <bsd.own.mk>
|
||||
|
||||
SRCS= atoll.c basename.c cdbr.c cdbw.c dirname.c \
|
||||
fgetln.c flock.c fparseln.c fpurge.c \
|
||||
dprintf.c fgetln.c flock.c fparseln.c fpurge.c \
|
||||
getcap.c getline.c getmode.c getopt_long.c gettemp.c \
|
||||
heapsort.c \
|
||||
issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
|
||||
@@ -15,27 +16,11 @@ SRCS= atoll.c basename.c cdbr.c cdbw.c dirname.c \
|
||||
raise_default_signal.c rmd160.c rmd160hl.c \
|
||||
setenv.c setgroupent.c \
|
||||
setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
|
||||
sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
|
||||
strlcat.c strlcpy.c strmode.c strndup.c strsep.c strsuftoll.c \
|
||||
strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
|
||||
sha256hl.c sha384hl.c sha512hl.c snprintb.c snprintf.c \
|
||||
stat_flags.c strlcat.c strlcpy.c strmode.c strndup.c \
|
||||
strsep.c strsuftoll.c strtoll.c \
|
||||
unvis.c vis.c err.c errx.c verr.c verrx.c \
|
||||
vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
|
||||
.else
|
||||
SRCS= atoll.c basename.c dirname.c fgetln.c flock.c fparseln.c \
|
||||
fpurge.c getline.c getmode.c getopt_long.c gettemp.c \
|
||||
heapsort.c \
|
||||
issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
|
||||
md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
|
||||
mi_vector_hash.c mkdtemp.c \
|
||||
mkstemp.c pread.c putc_unlocked.c pwcache.c pwrite.c \
|
||||
pw_scan.c \
|
||||
raise_default_signal.c rmd160.c rmd160hl.c \
|
||||
setenv.c setgroupent.c \
|
||||
setpassent.c setprogname.c sha1.c sha1hl.c sha2.c \
|
||||
sha256hl.c sha384hl.c sha512hl.c snprintf.c stat_flags.c \
|
||||
strlcat.c strlcpy.c strmode.c strndup.c strsep.c strsuftoll.c \
|
||||
strtoll.c unvis.c vis.c err.c errx.c verr.c verrx.c \
|
||||
vwarn.c vwarnx.c warn.c warnx.c fts.c glob.c efun.c
|
||||
.endif
|
||||
|
||||
BUILD_OSTYPE!= uname -s
|
||||
|
||||
@@ -69,10 +54,12 @@ CPPFLAGS+= -I. -I./include -I${.CURDIR} -I${.CURDIR}/sys \
|
||||
${.CURDIR}/../../common/lib/libc/hash/sha2 \
|
||||
${.CURDIR}/../../common/lib/libc/md \
|
||||
${.CURDIR}/../../common/lib/libc/stdlib \
|
||||
${.CURDIR}/../../common/lib/libutil \
|
||||
${.CURDIR}/../../external/bsd/flex/dist
|
||||
|
||||
DPSRCS+= defs.mk
|
||||
CLEANFILES+= config.log config.status configure.lineno *.stamp
|
||||
CLEANDIRFILES+= defs.mk config.cache confdefs.h
|
||||
|
||||
# Get components of Berkeley DB.
|
||||
_CURDIR:= ${.CURDIR}
|
||||
@@ -90,22 +77,81 @@ config.cache: include/.stamp configure nbtool_config.h.in defs.mk.in
|
||||
defs.mk: config.cache
|
||||
@touch ${.TARGET}
|
||||
|
||||
# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
|
||||
# configure.ac. See more detailed instructions in configure.ac.
|
||||
regen:
|
||||
cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
|
||||
cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
|
||||
INCFILES= nbtool_config.h
|
||||
INCSUBDIRS= sys machine rpc arpa
|
||||
CLEANDIRFILES+= ${INCFILES}
|
||||
|
||||
# CLEANDIRFILES may not contain directory names
|
||||
cleandir: cleandir.include
|
||||
cleandir.include: .PHONY
|
||||
rm -rf include
|
||||
|
||||
include/.stamp:
|
||||
mkdir -p include/sys include/machine include/rpc include/arpa
|
||||
mkdir -p ${INCSUBDIRS:@d@ include/$d @}
|
||||
@touch ${.TARGET}
|
||||
|
||||
cleandir:
|
||||
-rm -f nbtool_config.h confdefs.h defs.mk
|
||||
-rm -r -f include
|
||||
-rm -f config.cache
|
||||
# Install rules
|
||||
|
||||
HOST_LIBDIR= ${TOOLDIR}/lib
|
||||
HOST_INCSDIR= ${TOOLDIR}/include
|
||||
HOST_SHAREDIR= ${TOOLDIR}/share
|
||||
|
||||
install: .PHONY install.lib includes install.defs.mk
|
||||
|
||||
# Install lib${HOSTLIB}.a in ${TOOLDIR}/lib
|
||||
install.lib: .PHONY ${HOST_LIBDIR}/lib${HOSTLIB}.a
|
||||
${HOST_LIBDIR}/lib${HOSTLIB}.a: lib${HOSTLIB}.a
|
||||
${_MKTARGET_INSTALL}
|
||||
${HOST_INSTALL_DIR} ${HOST_LIBDIR}
|
||||
${HOST_INSTALL_FILE} -m ${LIBMODE} ${.ALLSRC} ${.TARGET}
|
||||
|
||||
.for _f in ${INCFILES}
|
||||
HOST_INCINSTFILES+= ${HOST_INCSDIR}/compat/${_f}
|
||||
${HOST_INCSDIR}/compat/${_f}: ${_f}
|
||||
${_MKTARGET_INSTALL}
|
||||
${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
|
||||
.endfor
|
||||
|
||||
.for _d in ${INCSUBDIRS}
|
||||
HOST_INCINSTDIRS+= ${HOST_INCSDIR}/compat/${_d}
|
||||
${HOST_INCSDIR}/compat/${_d}:
|
||||
${_MKTARGET_INSTALL}
|
||||
${HOST_INSTALL_DIR} ${.TARGET}
|
||||
.endfor
|
||||
|
||||
# Install include files in ${TOOLDIR}/include/compat
|
||||
includes: .PHONY ${HOST_INCINSTDIRS} .WAIT ${HOST_INCINSTFILES}
|
||||
@(cd include && find . -name '*.h' -print | while read f ; do \
|
||||
${HOST_INSTALL_FILE} $$f ${HOST_INCSDIR}/compat/$$f ; \
|
||||
done)
|
||||
|
||||
|
||||
# Install defs.mk in ${TOOLDIR}/share/compat
|
||||
install.defs.mk: .PHONY ${HOST_SHAREDIR}/compat/defs.mk
|
||||
${HOST_SHAREDIR}/compat/defs.mk: defs.mk
|
||||
${_MKTARGET_INSTALL}
|
||||
${HOST_INSTALL_DIR} ${HOST_SHAREDIR}
|
||||
${HOST_INSTALL_DIR} ${HOST_SHAREDIR}/compat
|
||||
${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
|
||||
|
||||
# bsd.hostlib.mk wants HOST_CPPFLAGS, not CPPFLAGS
|
||||
|
||||
HOST_CPPFLAGS:= ${CPPFLAGS}
|
||||
CPPFLAGS:= # empty
|
||||
|
||||
.include <bsd.hostlib.mk>
|
||||
|
||||
# Use uninstalled copy of host-mkdep
|
||||
HOST_MKDEP_OBJ!= cd ${.CURDIR}/../host-mkdep && ${PRINTOBJDIR}
|
||||
HOST_MKDEP= ${HOST_MKDEP_OBJ}/host-mkdep
|
||||
MKDEP= ${HOST_MKDEP}
|
||||
|
||||
# Use uninstalled copy of the install program
|
||||
INSTALL_OBJ!= cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR}
|
||||
INSTALL= ${INSTALL_OBJ}/xinstall
|
||||
|
||||
# Run "${TOOLDIR}/bin/nbmake-${MACHINE} regen" by hand after editing
|
||||
# configure.ac. See more detailed instructions in configure.ac.
|
||||
regen:
|
||||
cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
|
||||
cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoheader
|
||||
|
||||
5
tools/compat/cdbr.h
Normal file
5
tools/compat/cdbr.h
Normal file
@@ -0,0 +1,5 @@
|
||||
/* $NetBSD: cdbr.h,v 1.1 2012/06/04 19:06:45 joerg Exp $ */
|
||||
|
||||
/* We unconditionally use the NetBSD cdbr(3) in libnbcompat. */
|
||||
#include "nbtool_config.h"
|
||||
#include "../../include/cdbr.h"
|
||||
5
tools/compat/cdbw.h
Normal file
5
tools/compat/cdbw.h
Normal file
@@ -0,0 +1,5 @@
|
||||
/* $NetBSD: cdbw.h,v 1.1 2012/06/03 21:02:50 joerg Exp $ */
|
||||
|
||||
/* We unconditionally use the NetBSD cdbw(3) in libnbcompat. */
|
||||
#include "nbtool_config.h"
|
||||
#include "../../include/cdbw.h"
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat_defs.h,v 1.86 2012/06/04 10:18:01 joerg Exp $ */
|
||||
/* $NetBSD: compat_defs.h,v 1.93 2013/10/24 13:59:47 apb Exp $ */
|
||||
|
||||
#ifndef __NETBSD_COMPAT_DEFS_H__
|
||||
#define __NETBSD_COMPAT_DEFS_H__
|
||||
@@ -62,6 +62,10 @@
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_RPC_TYPES_H
|
||||
#include <rpc/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef _NETBSD_SOURCE
|
||||
#error _NETBSD_SOURCE is *not* to be defined.
|
||||
#endif
|
||||
@@ -121,12 +125,16 @@ struct group;
|
||||
#define __dead
|
||||
#undef __printflike
|
||||
#define __printflike(x,y)
|
||||
#undef __format_arg
|
||||
#define __format_arg(x)
|
||||
#undef __restrict
|
||||
#define __restrict
|
||||
#undef __unused
|
||||
#define __unused
|
||||
#undef __arraycount
|
||||
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
|
||||
#undef __USE
|
||||
#define __USE(a) ((void)(a))
|
||||
|
||||
/* Dirent support. */
|
||||
|
||||
@@ -164,6 +172,11 @@ typedef unsigned int id_t;
|
||||
#endif
|
||||
|
||||
#if !HAVE_SOCKLEN_T
|
||||
/*
|
||||
* This is defined as int for compatibility with legacy systems (and not
|
||||
* unsigned int), since universally it was int in most systems that did not
|
||||
* define it.
|
||||
*/
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
@@ -263,6 +276,9 @@ int evasprintf(char **, const char *, va_list);
|
||||
#if !HAVE_FGETLN || defined(__NetBSD__) || defined(__minix)
|
||||
char *fgetln(FILE *, size_t *);
|
||||
#endif
|
||||
#if !HAVE_DPRINTF
|
||||
int dprintf(int, const char *, ...);
|
||||
#endif
|
||||
|
||||
#if !HAVE_FLOCK
|
||||
# define LOCK_SH 0x01
|
||||
@@ -434,6 +450,11 @@ const char *getprogname(void);
|
||||
void setprogname(const char *);
|
||||
#endif
|
||||
|
||||
#if !HAVE_SNPRINTB_M
|
||||
int snprintb(char *, size_t, const char *, uint64_t);
|
||||
int snprintb_m(char *, size_t, const char *, uint64_t, size_t);
|
||||
#endif
|
||||
|
||||
#if !HAVE_SNPRINTF
|
||||
int snprintf(char *, size_t, const char *, ...);
|
||||
#endif
|
||||
|
||||
1302
tools/compat/configure
vendored
1302
tools/compat/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: configure.ac,v 1.74 2011/11/03 14:13:53 joerg Exp $
|
||||
# $NetBSD: configure.ac,v 1.80 2013/08/14 10:14:45 jmcneill Exp $
|
||||
#
|
||||
# Autoconf definition file for libnbcompat.
|
||||
#
|
||||
@@ -35,9 +35,9 @@ AH_BOTTOM([#include "compat_defs.h"
|
||||
AC_DEFUN([AC_NETBSD],
|
||||
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
|
||||
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
||||
AC_MSG_CHECKING([for NetBSD])
|
||||
AC_MSG_CHECKING([for NetBSD or MINIX3])
|
||||
AC_EGREP_CPP(yes,
|
||||
[#ifdef __NetBSD__
|
||||
[#if defined(__NetBSD__) || ((__minix)
|
||||
yes
|
||||
#endif
|
||||
],
|
||||
@@ -79,7 +79,7 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/mman.h sys/param.h \
|
||||
# Find headers that may not be available.
|
||||
AC_HEADER_DIRENT
|
||||
AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h \
|
||||
getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h)
|
||||
getopt.h features.h malloc.h sys/poll.h pthread.h stddef.h rpc/types.h)
|
||||
AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
|
||||
sys/endian.h sys/featuretest.h err.h inttypes.h libgen.h paths.h \
|
||||
stdint.h util.h resolv.h arpa/nameser.h,,
|
||||
@@ -100,6 +100,9 @@ AC_CHECK_TYPES([id_t, long long, u_long, u_char, u_short, u_int, u_quad_t])
|
||||
AC_CHECK_TYPE(socklen_t, [AC_DEFINE([HAVE_SOCKLEN_T], 1,
|
||||
[Define if you have the socklen_t type.])],,
|
||||
[#include <sys/types.h>
|
||||
#ifdef HAVE_RPC_TYPES_H
|
||||
#include <rpc/types.h>
|
||||
#endif
|
||||
#include <sys/socket.h>])
|
||||
|
||||
dnl XXX - This is UGLY. Need a better way to homogenize the bitsized types,
|
||||
@@ -134,24 +137,29 @@ AC_CHECK_MEMBERS([struct stat.st_flags, struct stat.st_gen,
|
||||
struct stat.st_atim, struct stat.st_mtimensec],,,
|
||||
[#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBERS(struct statvfs.f_iosize,,, [#include <sys/statvfs.h>])
|
||||
AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
|
||||
|
||||
# Global variable decls.
|
||||
AC_CHECK_DECLS([optind, optreset],,, [
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
])
|
||||
AC_CHECK_DECLS(sys_signame,,, [#include <signal.h>])
|
||||
|
||||
# Library functions (where a .h check isn't enough).
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(atoll asprintf asnprintf basename devname dirfd dirname \
|
||||
esetfunc fgetln flock fpurge __fpurge futimes getline \
|
||||
dprintf esetfunc fgetln flock fpurge __fpurge futimes getline \
|
||||
getopt getopt_long group_from_gid gid_from_group \
|
||||
heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
|
||||
mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
|
||||
pwrite raise_default_signal random setenv \
|
||||
setgroupent setprogname setpassent snprintf strlcat strlcpy strmode \
|
||||
setgroupent setprogname setpassent \
|
||||
snprintb_m snprintf strlcat strlcpy strmode \
|
||||
strndup strsep strsuftoll strtoll \
|
||||
user_from_uid uid_from_user vasprintf vasnprintf vsnprintf)
|
||||
|
||||
@@ -194,6 +202,8 @@ dnl # Thus AC_CHECK_LIB(regex...) comes first, and AC_SEARCHLIBS next.
|
||||
AC_CHECK_LIB(regex, regfree)
|
||||
AC_SEARCH_LIBS(regfree, rx posix)
|
||||
|
||||
AC_CHECK_LIB(rt, clock_gettime)
|
||||
|
||||
AC_CHECK_FUNCS(fparseln, [
|
||||
AC_MSG_CHECKING(if fparseln seems to work)
|
||||
AC_RUN_IFELSE(
|
||||
|
||||
@@ -1,8 +1,72 @@
|
||||
# $NetBSD: defs.mk.in,v 1.10 2011/08/14 20:22:42 apb Exp $
|
||||
# $NetBSD: defs.mk.in,v 1.12 2012/12/02 13:05:14 apb Exp $
|
||||
#
|
||||
# Makefile fragment for building with libnbcompat and associated
|
||||
# include files. It can also be used for building just with
|
||||
# the include files, without the library.
|
||||
#
|
||||
# This can be used when the library and include files have been installed
|
||||
# into TOOLDIR (by "make install" in the src/tools/compat directory),
|
||||
# or when they have not been installed into TOOLDIR but reside
|
||||
# in the .OBJDIR associated with src/tools/compat.
|
||||
#
|
||||
# Variables:
|
||||
#
|
||||
# COMPATLIB_UNINSTALLED:
|
||||
# If "yes", then use the files from the .OBJDIR of
|
||||
# NETBSDSRCDIR/tools/compat. Otherwise, use the files
|
||||
# from TOOLDIR.
|
||||
#
|
||||
# COMPATLIB_NO_LIB:
|
||||
# If "yes" then do not use the library (but still use
|
||||
# the include files).
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# * Use uninstalled copy of libnbcompat and associated *.h files:
|
||||
#
|
||||
# COMPATLIB_UNINSTALLED= yes
|
||||
# COMPATOBJ!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
|
||||
# .-include "${COMPATOBJ}/defs.mk"
|
||||
#
|
||||
# * Use TOOLDIR copy of libnbcompat and associated *.h files:
|
||||
#
|
||||
# .-include "${TOOLDIR}/share/compat/defs.mk"
|
||||
#
|
||||
# * Use TOOLDIR copy of compat *.h files, but do not use libnbcompat.a:
|
||||
#
|
||||
# COMPATLIB_NO_LIB= yes
|
||||
# .-include "${TOOLDIR}/share/compat/defs.mk"
|
||||
#
|
||||
# The use of ".-include" instead of ".include" above is because it's
|
||||
# expected that the file might not exist during "make obj" or "make clean".
|
||||
#
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
# Use the installed (TOOLDIR) version of the library and headers by default
|
||||
COMPATLIB_UNINSTALLED ?= no
|
||||
# Use library and includes by default.
|
||||
COMPATLIB_NO_LIB ?= no
|
||||
|
||||
.if "${COMPATLIB_UNINSTALLED}" == "yes"
|
||||
# The library lives in the .OBJDIR.
|
||||
#
|
||||
# Some include files live directly in the .OBJDIR, while others
|
||||
# live in subdirectories of .OBJDIR/include.
|
||||
#
|
||||
COMPATOBJ:= ${.PARSEDIR}
|
||||
HOSTEXEEXT= @EXEEXT@
|
||||
COMPATLIBDIR= ${COMPATOBJ}
|
||||
COMPATINCFLAGS= -I${COMPATOBJ} -I${COMPATOBJ}/include
|
||||
.else
|
||||
# The library lives in TOOLDIR/lib.
|
||||
#
|
||||
# All include files live in TOOLDIR/include/comnpat, and its subdirectories.
|
||||
#
|
||||
COMPATLIBDIR= ${TOOLDIR}/lib
|
||||
COMPATINCFLAGS= -I${TOOLDIR}/include/compat
|
||||
.endif
|
||||
|
||||
HOSTEXEEXT= @EXEEXT@
|
||||
HOST_BSHELL= @BSHELL@
|
||||
|
||||
BUILD_OSTYPE!= uname -s
|
||||
@@ -12,11 +76,12 @@ BUILD_OSTYPE!= uname -s
|
||||
HOST_CPPFLAGS+= -no-cpp-precomp
|
||||
.endif
|
||||
|
||||
HOST_CPPFLAGS+= -I${COMPATOBJ} -I${COMPATOBJ}/include \
|
||||
-I${.CURDIR}/../compat -DHAVE_NBTOOL_CONFIG_H=1 \
|
||||
-D_FILE_OFFSET_BITS=64
|
||||
HOST_CPPFLAGS+= ${COMPATINCFLAGS} -I${NETBSDSRCDIR}/tools/compat \
|
||||
-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
|
||||
|
||||
DPADD+= ${COMPATOBJ}/libnbcompat.a
|
||||
LDADD+= -L${COMPATOBJ} -lnbcompat @LIBS@
|
||||
.if "${COMPATLIB_NO_LIB}" != "yes"
|
||||
DPADD+= ${COMPATLIBDIR}/libnbcompat.a
|
||||
LDADD+= -L${COMPATLIBDIR} -lnbcompat @LIBS@
|
||||
.endif # ! COMPATLIB_NO_LIB
|
||||
|
||||
HAVE_PTHREAD_H= @HAVE_PTHREAD_H@
|
||||
|
||||
77
tools/compat/dprintf.c
Normal file
77
tools/compat/dprintf.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/* $NetBSD: dprintf.c,v 1.2 2013/03/05 16:29:09 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_NBTOOL_CONFIG_H
|
||||
#include "nbtool_config.h"
|
||||
#endif
|
||||
|
||||
#if !HAVE_DPRINTF
|
||||
#include <stdlib.h>
|
||||
#ifndef HAVE_NBTOOL_CONFIG_H
|
||||
/* These headers are required, but included from nbtool_config.h */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
dprintf(int fd, const char *fmt, ...)
|
||||
{
|
||||
FILE *fp;
|
||||
int e;
|
||||
va_list ap;
|
||||
|
||||
if ((e = dup(fd)) == -1)
|
||||
return -1;
|
||||
|
||||
if ((fp = fdopen(e, "r+")) == NULL) {
|
||||
(void)close(e);
|
||||
return -1;
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
e = vfprintf(fp, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
(void)fclose(fp);
|
||||
return e;
|
||||
}
|
||||
|
||||
#endif /* HAVE_DPRINTF */
|
||||
|
||||
#ifdef TEST
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
dprintf(1, "Hello %s\n", "world");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
1
tools/compat/fs/msdosfs/bootsect.h
Normal file
1
tools/compat/fs/msdosfs/bootsect.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../../../sys/fs/msdosfs/bootsect.h"
|
||||
1
tools/compat/fs/msdosfs/bpb.h
Normal file
1
tools/compat/fs/msdosfs/bpb.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../../../sys/fs/msdosfs/bpb.h"
|
||||
1
tools/compat/fs/msdosfs/denode.h
Normal file
1
tools/compat/fs/msdosfs/denode.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../../../sys/fs/msdosfs/denode.h"
|
||||
1
tools/compat/fs/msdosfs/direntry.h
Normal file
1
tools/compat/fs/msdosfs/direntry.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../../../sys/fs/msdosfs/direntry.h"
|
||||
1
tools/compat/fs/msdosfs/fat.h
Normal file
1
tools/compat/fs/msdosfs/fat.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../../../sys/fs/msdosfs/fat.h"
|
||||
1
tools/compat/fs/msdosfs/msdosfsmount.h
Normal file
1
tools/compat/fs/msdosfs/msdosfsmount.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../../../sys/fs/msdosfs/msdosfsmount.h"
|
||||
@@ -1,6 +1,6 @@
|
||||
/* nbtool_config.h.in. Generated automatically from configure.ac by autoheader. */
|
||||
|
||||
/* $NetBSD: nbtool_config.h.in,v 1.27 2011/11/03 14:13:53 joerg Exp $ */
|
||||
/* $NetBSD: nbtool_config.h.in,v 1.33 2013/08/14 10:15:14 jmcneill Exp $ */
|
||||
|
||||
#ifndef __NETBSD_NBTOOL_CONFIG_H__
|
||||
#define __NETBSD_NBTOOL_CONFIG_H__
|
||||
@@ -237,6 +237,9 @@
|
||||
/* Define if `__dd_fd' is member of `DIR'. */
|
||||
#undef HAVE_DIR___DD_FD
|
||||
|
||||
/* Define if you have the `dprintf' function. */
|
||||
#undef HAVE_DPRINTF
|
||||
|
||||
/* Define if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
@@ -318,6 +321,9 @@
|
||||
/* Define if you have the `regex' library (-lregex). */
|
||||
#undef HAVE_LIBREGEX
|
||||
|
||||
/* Define if you have the `rt' library (-lrt). */
|
||||
#undef HAVE_LIBRT
|
||||
|
||||
/* Define if you have the `z' library (-lz). */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
@@ -414,6 +420,9 @@
|
||||
/* Define if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define if you have the `snprintb_m' function. */
|
||||
#undef HAVE_SNPRINTB_M
|
||||
|
||||
/* Define if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
@@ -486,6 +495,9 @@
|
||||
/* Define if `st_mtimensec' is member of `struct stat'. */
|
||||
#undef HAVE_STRUCT_STAT_ST_MTIMENSEC
|
||||
|
||||
/* Define if `tm_gmtoff' is member of `struct tm'. */
|
||||
#undef HAVE_STRUCT_TM_TM_GMTOFF
|
||||
|
||||
/* Define if you have the <sys/bswap.h> header file. */
|
||||
#undef HAVE_SYS_BSWAP_H
|
||||
|
||||
|
||||
5
tools/compat/rmd160.h
Normal file
5
tools/compat/rmd160.h
Normal file
@@ -0,0 +1,5 @@
|
||||
/* $NetBSD: rmd160.h,v 1.4 2013/02/07 20:30:29 christos Exp $ */
|
||||
|
||||
/* We unconditionally use the NetBSD rmd160 in libnbcompat. */
|
||||
#include "nbtool_config.h"
|
||||
#include "../../sys/sys/rmd160.h"
|
||||
5
tools/compat/sha1.h
Normal file
5
tools/compat/sha1.h
Normal file
@@ -0,0 +1,5 @@
|
||||
/* $NetBSD: sha1.h,v 1.5 2013/02/07 20:30:29 christos Exp $ */
|
||||
|
||||
/* We unconditionally use the NetBSD sha1 in libnbcompat. */
|
||||
#include "nbtool_config.h"
|
||||
#include "../../sys/sys/sha1.h"
|
||||
5
tools/compat/sha2.h
Normal file
5
tools/compat/sha2.h
Normal file
@@ -0,0 +1,5 @@
|
||||
/* $NetBSD: sha2.h,v 1.2 2013/02/07 20:31:52 christos Exp $ */
|
||||
|
||||
/* We unconditionally use the NetBSD sha2 in libnbcompat. */
|
||||
#include "nbtool_config.h"
|
||||
#include "../../sys/sys/sha2.h"
|
||||
@@ -1,5 +1,4 @@
|
||||
/* $NetBSD: sha1.h,v 1.1 2006/10/29 06:17:08 dogcow Exp $ */
|
||||
/* $NetBSD: sha1.h,v 1.2 2013/03/12 01:52:55 christos Exp $ */
|
||||
|
||||
/* We unconditionally use the NetBSD SHA1 in libnbcompat. */
|
||||
#include "nbtool_config.h"
|
||||
#include "../../sys/sys/sha1.h"
|
||||
|
||||
@@ -1,34 +1,21 @@
|
||||
# $NetBSD: Makefile,v 1.52 2012/09/18 07:05:15 skrll Exp $
|
||||
# $NetBSD: Makefile,v 1.61 2013/11/28 12:08:57 mrg Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
GCC_LANGUAGES=c c++ objc
|
||||
MODULE= gcc4
|
||||
|
||||
MKNATIVE_CONFIG_TARGET_LIBS= \
|
||||
configure-target-libstdc++-v3 \
|
||||
configure-target-libobjc
|
||||
|
||||
.if ${HAVE_GCC} == 45
|
||||
MKNATIVE_TARGET= gcc45
|
||||
GNUHOSTDIST= ${.CURDIR}/../../external/gpl3/gcc/dist
|
||||
MKNATIVE_CONFIG_TARGET_LIBS+= \
|
||||
configure-target-libgomp
|
||||
.else
|
||||
MKNATIVE_TARGET= gcc4
|
||||
.endif
|
||||
|
||||
BINENV= /usr/bin/env -i
|
||||
|
||||
VAX_CONFIGURE_ARGS=
|
||||
|
||||
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64"
|
||||
MULTILIB_ARGS= --enable-multilib
|
||||
.else
|
||||
MULTILIB_ARGS= --disable-multilib
|
||||
.endif
|
||||
|
||||
.if ${MKSOFTFLOAT} != "no"
|
||||
.if ${MKSOFTFLOAT} != "no" && ${MACHINE_CPU} != "m68k"
|
||||
SOFTFLOAT_ARGS= -with-float=soft
|
||||
.endif
|
||||
|
||||
@@ -38,14 +25,12 @@ COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \
|
||||
--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
|
||||
--with-pkgversion="NetBSD nb1 20120916" \
|
||||
--with-system-zlib \
|
||||
${VAX_CONFIGURE_ARGS} \
|
||||
--enable-__cxa_atexit
|
||||
.if defined(__MINIX)
|
||||
COMMON_CONFIGURE_ARGS+= \
|
||||
--disable-libssp \
|
||||
--disable-threads \
|
||||
--enable-visibility \
|
||||
--disable-libunwind
|
||||
--disable-threads
|
||||
|
||||
CONFIGURE_ENV+= gcc_cv_ld_hidden=yes
|
||||
|
||||
@@ -87,6 +72,29 @@ MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
|
||||
CONFIGURE_ENV+= gcc_cv_libc_provides_ssp=yes \
|
||||
gcc_cv_as_sparc_gotdata_op=no
|
||||
|
||||
ALL_TARGET= all-gcc
|
||||
INSTALL_TARGET= install-gcc
|
||||
|
||||
.include "${.CURDIR}/../Makefile.gmakehost"
|
||||
BUILD_MAKE=${TOOL_GMAKE}
|
||||
|
||||
#
|
||||
# mknative-gcc specific stuff
|
||||
#
|
||||
MKNATIVE_CONFIG_TARGET_LIBS= \
|
||||
configure-target-libstdc++-v3 \
|
||||
configure-target-libobjc
|
||||
|
||||
.if ${HAVE_GCC} == 45
|
||||
MKNATIVE_TARGET= gcc45
|
||||
MKNATIVE_CONFIG_TARGET_LIBS+= \
|
||||
configure-target-libgomp
|
||||
.else
|
||||
MKNATIVE_TARGET= gcc4
|
||||
.endif
|
||||
|
||||
BINENV= /usr/bin/env -i
|
||||
|
||||
MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
|
||||
CC_FOR_BUILD=${HOST_CC:Q} \
|
||||
CC=${CC:Q}' '${CCADDFLAGS:Q} \
|
||||
@@ -108,16 +116,6 @@ MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
|
||||
gdb_cv_scanf_has_long_double=yes \
|
||||
gcc_cv_as_sparc_gotdata_op=no
|
||||
|
||||
ALL_TARGET= all-gcc
|
||||
INSTALL_TARGET= install-gcc
|
||||
|
||||
.include "${.CURDIR}/../Makefile.gmakehost"
|
||||
BUILD_MAKE=${TOOL_GMAKE}
|
||||
|
||||
#
|
||||
# mknative-gcc specific stuff
|
||||
#
|
||||
|
||||
.if ${HAVE_GCC} < 45
|
||||
GCCSRCDIR=${.CURDIR}/../../gnu/dist/gcc4
|
||||
.else
|
||||
@@ -127,27 +125,39 @@ GCCSRCDIR=${.CURDIR}/../../external/gpl3/gcc/dist
|
||||
CXXADDFLAGS= --sysroot=${DESTDIR}
|
||||
CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
|
||||
|
||||
# NEWCONFIGDIR can be set to a read-write location of the source tree
|
||||
# in case the version being used is not.
|
||||
NEWCONFIGDIR?= ${.CURDIR}/../..
|
||||
MKNATIVE?= ${.CURDIR}/mknative-gcc
|
||||
|
||||
bootstrap-libgcc: .configure_done
|
||||
@echo 'Creating files needed for libgcc by a native bootstrap build.'
|
||||
@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} lib${MKNATIVE_TARGET} \
|
||||
${.OBJDIR}/build ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} \
|
||||
${DESTDIR}
|
||||
${.OBJDIR}/build ${NEWCONFIGDIR} ${NETBSDSRCDIR} \
|
||||
${MACHINE_GNU_PLATFORM} ${DESTDIR}
|
||||
|
||||
native-gcc: .native/.configure_done
|
||||
@echo 'Extracting GNU GCC configury for a native toolchain.'
|
||||
@MAKE=${BUILD_MAKE:Q} ${HOST_SH} ${MKNATIVE} ${MKNATIVE_TARGET} \
|
||||
${.OBJDIR}/.native ${NEWCONFIGDIR} ${MACHINE_GNU_PLATFORM} \
|
||||
${DESTDIR}
|
||||
${.OBJDIR}/.native ${NEWCONFIGDIR} ${NETBSDSRCDIR} \
|
||||
${MACHINE_GNU_PLATFORM} ${DESTDIR}
|
||||
|
||||
NATIVE_CONFIGURE_ARGS= ${COMMON_CONFIGURE_ARGS}
|
||||
.if ${HAVE_GCC} >= 45
|
||||
MPC= ${NETBSDSRCDIR}/external/lgpl3/mpc
|
||||
MPFR= ${NETBSDSRCDIR}/external/lgpl3/mpfr
|
||||
GMP= ${NETBSDSRCDIR}/external/lgpl3/gmp
|
||||
MPCOBJ!= cd ${MPC}/lib/libmpc && ${PRINTOBJDIR}
|
||||
MPFROBJ!= cd ${MPFR}/lib/libmpfr && ${PRINTOBJDIR}
|
||||
GMPOBJ!= cd ${GMP}/lib/libgmp && ${PRINTOBJDIR}
|
||||
|
||||
NATIVE_CONFIGURE_ARGS+= \
|
||||
--with-mpc=${DESTDIR}/usr \
|
||||
--with-mpfr=${DESTDIR}/usr \
|
||||
--with-gmp=${DESTDIR}/usr
|
||||
--with-mpc-lib=${MPCOBJ} \
|
||||
--with-mpfr-lib=${MPFROBJ} \
|
||||
--with-gmp-lib=${GMPOBJ} \
|
||||
--with-mpc-include=${MPC}/dist/src \
|
||||
--with-mpfr-include=${MPFR}/dist \
|
||||
--with-gmp-include=${GMP}/lib/libgmp/arch/${MACHINE_ARCH}
|
||||
|
||||
. if ${MACHINE_ARCH} != "vax"
|
||||
NATIVE_CONFIGURE_ARGS+= --enable-tls
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$NetBSD: README.mknative,v 1.13 2012/09/27 11:29:49 skrll Exp $
|
||||
$NetBSD: README.mknative,v 1.17 2013/11/28 12:08:57 mrg Exp $
|
||||
|
||||
This file describes how to bootstrap the native toolchain on a new NetBSD
|
||||
platform (and how to update the new toolchain files, if needed). These
|
||||
@@ -22,8 +22,11 @@ work.
|
||||
gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.)
|
||||
|
||||
2. Build and install a cross toolchain (via "build.sh -m MACHINE tools").
|
||||
Note that while PR #47353 is not fixed, you can not use the -O option
|
||||
to build.sh. Use -M instead. (The differences are in layout and pathname
|
||||
prefixes in the object directory pointed to by each option.)
|
||||
|
||||
3. In src/tools/gcc, do "nbmake-MACHINE bootstrap-libgcc".
|
||||
3. In src/tools/gcc, do "nbmake-MACHINE HAVE_GCC=45 bootstrap-libgcc".
|
||||
|
||||
This will create just enough glue in src/external/gpl3/gcc/lib/libgcc/arch
|
||||
to make it possible to build, based on the toolchain built in
|
||||
@@ -33,8 +36,11 @@ work.
|
||||
will regenerate the "proper" libgcc config files.
|
||||
|
||||
4. At top level, do
|
||||
"nbmake-MACHINE obj do-distrib-dirs MKGCC=no MKBINUTILS=no", and
|
||||
"nbmake-MACHINE includes HAVE_GCC= MKGCC=no MKBINUTILS=no".
|
||||
"nbmake-MACHINE obj do-distrib-dirs MKGCC=no MKBINUTILS=no HAVE_GCC=45", and
|
||||
"nbmake-MACHINE includes HAVE_GCC= MKGCC=no MKBINUTILS=no HAVE_GCC=45".
|
||||
(Note: replace 45 [for gcc 4.5.x] with the appropriate version you are
|
||||
going to mknative-for, the MKGCC=no prevents the standard makefiles from
|
||||
picking up any gcc version info automatically)
|
||||
|
||||
5. In src/lib/csu, do
|
||||
"nbmake-MACHINE dependall". and "nbmake-MACHINE install".
|
||||
@@ -47,15 +53,11 @@ work.
|
||||
"nbmake-MACHINE obj includes dependall install".
|
||||
|
||||
8. In each of src/external/lgpl3/gmp/lib/libgmp,
|
||||
src/external/lgpl3/mpfr/lib/libmpfr, src/external/lgpl2/mpc/lib/libmpc
|
||||
do "nbmake-MACHINE obj includes LIBISPRIVATE=no", and
|
||||
"nbmake-MACHINE dependall install".
|
||||
|
||||
It is important to have LIBISPRIVATE=no while doing includes as this
|
||||
installs a header file that is not part of standard build.
|
||||
src/external/lgpl3/mpfr/lib/libmpfr, src/external/lgpl3/mpc/lib/libmpc
|
||||
do "nbmake-MACHINE obj dependall".
|
||||
|
||||
9. In src/lib, do
|
||||
"nbmake-MACHINE dependall install MKGCC=no".
|
||||
"nbmake-MACHINE dependall install MKGCC=no HAVE_GCC=45".
|
||||
|
||||
Optionally, all of the following may be set in the environment to reduce
|
||||
the amount of code needed to build at this step. Basically, it must be
|
||||
@@ -67,6 +69,7 @@ work.
|
||||
MKLINT=no
|
||||
MKPROFILE=no
|
||||
MKSHARE=no
|
||||
MKRUMP=no
|
||||
|
||||
10. In src/tools/gcc, do "nbmake-MACHINE native-gcc".
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $NetBSD: mknative-gcc,v 1.68 2012/09/25 06:55:10 skrll Exp $
|
||||
# $NetBSD: mknative-gcc,v 1.74 2013/11/28 12:08:57 mrg Exp $
|
||||
#
|
||||
# Shell script for generating all the constants needed for a native
|
||||
# platform build of gcc.
|
||||
@@ -9,9 +9,10 @@
|
||||
|
||||
_TMPDIR=$2
|
||||
_TOP=$3
|
||||
_PLATFORM=$4
|
||||
_DESTDIR=$5
|
||||
_ABI=$6
|
||||
_SRC=$4
|
||||
_PLATFORM=$5
|
||||
_DESTDIR=$6
|
||||
_ABI=$7
|
||||
_VPATH=`grep VPATH ${_TMPDIR}/Makefile | sed 's,^.*=[ ]*,,'`
|
||||
_GNU_DIST=`cd ${_VPATH}; pwd`
|
||||
|
||||
@@ -26,6 +27,15 @@ fi
|
||||
_OUTDIR="$_TOP/gnu"
|
||||
_OUTDIRBASE="gnu"
|
||||
|
||||
sanitise_includes () {
|
||||
sed \
|
||||
-e "s,-I$_DESTDIR/usr/include,,g" \
|
||||
-e "s,-I$_SRC/external/lgpl3/mpfr/dist,,g" \
|
||||
-e "s,-I$_SRC/external/lgpl3/mpc/dist/src,,g" \
|
||||
-e "s,-I$_SRC/external/lgpl3/gmp/lib/libgmp/arch/$MACHINE_ARCH,,g" \
|
||||
-e "s,-I/usr/include/[^ ]*,,"
|
||||
}
|
||||
|
||||
##### gnu/lib/crtstuff #####
|
||||
|
||||
get_crtstuff () {
|
||||
@@ -35,7 +45,7 @@ get_crtstuff () {
|
||||
getvars gcc/Makefile \
|
||||
INCLUDES CRTSTUFF_CFLAGS CRTSTUFF_T_CFLAGS CRTSTUFF_T_CFLAGS_S \
|
||||
tm_defines xm_file xm_defines \
|
||||
| sed "s,-I$_DESTDIR/usr/include,,g" \
|
||||
| sanitise_includes \
|
||||
| write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH.mk
|
||||
}
|
||||
|
||||
@@ -394,8 +404,8 @@ get_libgcc () {
|
||||
SHLIB_MAPFILES SHLIB_NM_FLAGS \
|
||||
EXTRA_HEADERS xm_defines \
|
||||
tm_defines ${_extravars}
|
||||
} | sed "s,-I$_DESTDIR/usr/include,,g" \
|
||||
| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH.mk
|
||||
} | sanitise_includes \
|
||||
| write_mk $_OUTDIRBASE/lib/lib$_subdir/arch${_archsubdir}/$MACHINE_ARCH.mk
|
||||
|
||||
# Generate new style files.
|
||||
if [ -n "${MKNATIVE_LIBGCC_NEW}" ]; then
|
||||
@@ -546,7 +556,7 @@ get_libstdcxx_v3 () {
|
||||
} | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/defs.mk
|
||||
}
|
||||
|
||||
##### gnu/usr.bin/gcc3 #####
|
||||
##### gnu/usr.bin/gcc* #####
|
||||
|
||||
get_gcc_bootstrap () {
|
||||
_subdir="$1"
|
||||
@@ -569,7 +579,7 @@ get_gcc () {
|
||||
_extravars2="tm_file_list build_xm_include_list"
|
||||
_extravars3="tm_p_include_list"
|
||||
;;
|
||||
|
||||
|
||||
gcc)
|
||||
_buildname="BUILD_"
|
||||
_libcppsubdir=""
|
||||
@@ -600,7 +610,7 @@ get_gcc () {
|
||||
tm_defines host_xm_file host_xm_defines tm_p_file \
|
||||
target_cpu_default ${_extravars} ${_extravars2} \
|
||||
lang_specs_files ${_extravars3} \
|
||||
| sed "s,-I$_DESTDIR/usr/include,,g"
|
||||
| sanitise_includes
|
||||
getvars gcc/Makefile \
|
||||
LIB2ADDEHDEP | sed 's/unwind.inc//'
|
||||
getvars gcc/Makefile \
|
||||
@@ -612,10 +622,6 @@ get_gcc () {
|
||||
getvars libcpp/Makefile \
|
||||
libcpp_a_OBJS
|
||||
;;
|
||||
gcc3)
|
||||
getvars gcc/Makefile \
|
||||
LIBCPP_OBJS LIBCPP_H
|
||||
;;
|
||||
esac
|
||||
getvars gcc/Makefile \
|
||||
ENABLE_SHARED
|
||||
@@ -687,11 +693,6 @@ __EOF__
|
||||
|
||||
case "$1" in
|
||||
# .mk and .h files for libgcc bootstrap (from host build)
|
||||
libgcc)
|
||||
get_libgcc gcc3
|
||||
get_crtstuff crtstuff3
|
||||
exit 0
|
||||
;;
|
||||
|
||||
libgcc4)
|
||||
get_libgcc gcc4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp $
|
||||
# $NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp $
|
||||
#
|
||||
# from: NetBSD: mknative,v 1.12 2003/03/05 06:17:17 mrg Exp
|
||||
#
|
||||
@@ -24,7 +24,7 @@ getvars()
|
||||
_mf="$1"; shift
|
||||
case "$MAKE" in
|
||||
*gmake)
|
||||
env MAKEFLAGS= $MAKE -f - -f "$_TMPDIR/$_mf" _x_ <<EOF || bomb "getvars $_mf $* failed"
|
||||
env MAKEFLAGS= $MAKE --quiet -f - -f "$_TMPDIR/$_mf" _x_ <<EOF || bomb "getvars $_mf $* failed"
|
||||
define echo_var
|
||||
@echo G_\${var}="\${\${var}}" | sed -e 's,\([^\.]\)\./\([a-zA-Z0-9_-]*\.o\),\1\2,g' -e 's,$_VPATH,\$\${GNUHOSTDIST},g' -e 's,$_GNU_DIST,\$\${GNUHOSTDIST},g'
|
||||
|
||||
@@ -52,7 +52,7 @@ write_c()
|
||||
echo '/* This file is automatically generated. DO NOT EDIT! */' >$_TOP/$1.tmp || \
|
||||
bomb "cannot create $1"
|
||||
grep '$''NetBSD' $0 | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp $' | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp $' | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
|
||||
echo '' >>$_TOP/$1.tmp
|
||||
writefile $1
|
||||
}
|
||||
@@ -64,7 +64,7 @@ write_mk()
|
||||
echo '# This file is automatically generated. DO NOT EDIT!' >$_TOP/$1.tmp || \
|
||||
bomb "cannot create $1"
|
||||
grep '$''NetBSD' $0 | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.9 2007/02/05 18:26:01 apb Exp $' | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
|
||||
echo '$NetBSD: mknative.common,v 1.10 2013/10/20 16:00:20 skrll Exp $' | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
|
||||
echo '#' >>$_TOP/$1.tmp
|
||||
writefile $1
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# $NetBSD: Makefile,v 1.5 2008/10/25 22:15:28 apb Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2012/12/02 12:48:32 apb Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
.PATH.sh: ${.CURDIR}/../../usr.bin/genassym
|
||||
|
||||
COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
|
||||
.-include "${COMPATOBJ}/defs.mk"
|
||||
|
||||
.-include "${TOOLDIR}/share/compat/defs.mk"
|
||||
|
||||
TIMESTAMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.2 2006/10/27 22:36:23 uwe Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2013/08/16 10:29:32 gsutre Exp $
|
||||
#
|
||||
|
||||
GNUHOSTDIST= ${.CURDIR}/../../gnu/dist/gmake
|
||||
@@ -11,6 +11,8 @@ CONFIGURE_ENV+= CC=${HOST_CC:Q} \
|
||||
CONFIGURE_ARGS= --program-prefix=${_TOOL_PREFIX}g
|
||||
CONFIGURE_ARGS+=--disable-nls
|
||||
|
||||
MAKE_ARGS= MAKEINFO=${TOOL_MAKEINFO:Q}
|
||||
|
||||
.NOTPARALLEL:
|
||||
|
||||
.include "${.CURDIR}/../Makefile.gnuhost"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: headerlist,v 1.6 2011/01/26 01:18:55 pooka Exp $
|
||||
# $NetBSD: headerlist,v 1.8 2013/07/18 22:08:59 matt Exp $
|
||||
#
|
||||
# do not edit; this file was automatically generated by:
|
||||
# NetBSD: mkheaderlist.sh,v 1.1 2007/08/07 12:38:23 yamt Exp
|
||||
@@ -36,8 +36,12 @@
|
||||
./emips/include/elf_machdep.h
|
||||
./dreamcast/include/disklabel.h
|
||||
./dreamcast/include/elf_machdep.h
|
||||
./epoc32/include/disklabel.h
|
||||
./epoc32/include/elf_machdep.h
|
||||
./evbarm/include/disklabel.h
|
||||
./evbarm/include/elf_machdep.h
|
||||
./evbcf/include/disklabel.h
|
||||
./evbcf/include/elf_machdep.h
|
||||
./evbmips/include/disklabel.h
|
||||
./evbmips/include/elf_machdep.h
|
||||
./evbppc/include/disklabel.h
|
||||
|
||||
@@ -1,27 +1,48 @@
|
||||
# $NetBSD: Makefile,v 1.10 2008/10/19 22:05:23 apb Exp $
|
||||
# $NetBSD: Makefile,v 1.12 2012/12/02 12:44:06 apb Exp $
|
||||
|
||||
TIMESTAMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
|
||||
HOSTPROG= host-mkdep
|
||||
HOSTPROGNAME= ${_TOOL_PREFIX}host-mkdep
|
||||
HOST_BINDIR= ${TOOLDIR}/bin
|
||||
|
||||
NOMAN= # defined
|
||||
SRCS= # empty
|
||||
|
||||
CLEANFILES+= config.cache config.log config.status host-mkdep
|
||||
|
||||
.include <bsd.hostprog.mk>
|
||||
|
||||
# When host-mkdep is built, TOOL_AWK is not yet available, so we do not
|
||||
# pass AWK=${TOOL_AWK:Q} to configure; we allow configure to find awk
|
||||
# for itself (or complain if it can't find awk).
|
||||
# XXX: The configure script needs to use awk, but we can't pass
|
||||
# AWK=${TOOL_AWK:Q} in CONFIGURE_ENV, because TOOL_AWK is not yet
|
||||
# available at the time that host-mkdep is built. The configure script
|
||||
# will try to find some other version of awk.
|
||||
#
|
||||
CONFIGURE_ENV= CC=${HOST_CC:Q}
|
||||
|
||||
realall: host-mkdep
|
||||
host-mkdep: configure host-mkdep.in
|
||||
-rm -f $@
|
||||
CC=${HOST_CC:Q} ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
|
||||
${CONFIGURE_ENV} \
|
||||
${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
|
||||
chmod +x $@
|
||||
|
||||
# This is the only program that comes before binstall.
|
||||
install: ${TIMESTAMP}
|
||||
${TIMESTAMP}: host-mkdep
|
||||
mkdir -p ${TOOLDIR}/bin
|
||||
cp host-mkdep $@
|
||||
chmod +x $@
|
||||
# Use uninstalled copy of the install program
|
||||
INSTALL_OBJ!= cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR}
|
||||
INSTALL= ${INSTALL_OBJ}/xinstall
|
||||
|
||||
# Install rule, copied from src/tools/Makefile.host.
|
||||
# We can't include Makefile.host because there is no HOST_SRCDIR
|
||||
# corresponding to host-mkdep.
|
||||
#
|
||||
realinstall: install.host
|
||||
install.host: ${HOST_BINDIR}/${HOSTPROGNAME}
|
||||
${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
|
||||
${_MKTARGET_INSTALL}
|
||||
mkdir -p ${HOST_BINDIR}
|
||||
${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
|
||||
|
||||
.if ${MKUPDATE} == "no"
|
||||
.PHONY: ${HOST_BINDIR}/${HOSTPROGNAME}
|
||||
.endif
|
||||
|
||||
# Run by hand, then "configure" script committed:
|
||||
regen:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!@BSHELL@ -
|
||||
#
|
||||
# $NetBSD: host-mkdep.in,v 1.21 2012/08/26 22:37:19 jmmv Exp $
|
||||
# $NetBSD: host-mkdep.in,v 1.30 2013/09/02 08:37:11 joerg Exp $
|
||||
#
|
||||
# Copyright (c) 1991, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
@@ -73,7 +73,7 @@ set_objlist()
|
||||
# (don't trust the shell builtin getopts to be in a known state on error)
|
||||
while [ $# -gt 0 ]; do
|
||||
option="${1#-}"
|
||||
[ "x$option" = "x$1" -o -z "$option" ] && break
|
||||
[ "x$option" = "x$1" -o -z "$option" ] && break # LSC: Prevents error on Minix
|
||||
while
|
||||
optarg="${option#?}"
|
||||
option="${option%$optarg}"
|
||||
@@ -84,6 +84,7 @@ while [ $# -gt 0 ]; do
|
||||
-o) OPTIONAL=true; AWK_OPTIONAL='print ".OPTIONAL:" $0';;
|
||||
-p) NEWEXT=;;
|
||||
-q) QUIET=true;;
|
||||
-[iv]) ;;
|
||||
|
||||
-[fPs]) # Options with arguments
|
||||
[ -z "$optarg" ] && {
|
||||
@@ -161,6 +162,11 @@ else
|
||||
shift 2
|
||||
cppargs=${cppargs%xx}
|
||||
;;
|
||||
-std=*)
|
||||
set -- "$@" "$1"
|
||||
shift
|
||||
cppargs=${cppargs%x}
|
||||
;;
|
||||
|
||||
-no-cpp-precomp) # This is a Darwin-specific option.
|
||||
set -- "$@" "$1"
|
||||
@@ -177,7 +183,12 @@ else
|
||||
shift
|
||||
cppargs=${cppargs%x}
|
||||
;;
|
||||
|
||||
--sysroot*)
|
||||
shift
|
||||
;;
|
||||
-[iv])
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
echo "$0: Unknown option: $1" 1>&2 # all other -options
|
||||
exit 1
|
||||
@@ -225,7 +236,7 @@ else
|
||||
file=${file%.*}
|
||||
set_objlist $file
|
||||
|
||||
@CPP@ "$@" $f | @AWK@ '
|
||||
( (@CPP@ "$@" $f; echo $? >&3) | @AWK@ '
|
||||
/^#/ {
|
||||
# Be as tolerant as possible.
|
||||
sub(/^#(line)? [ 0-9]*\"?/, "")
|
||||
@@ -241,7 +252,7 @@ else
|
||||
print "'"$objlist"'" ": " $0
|
||||
'"$AWK_OPTIONAL"'
|
||||
}
|
||||
' >> $TMP
|
||||
' >> $TMP) 3>&1 | (read a; exit $a)
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.11 2008/10/25 22:15:28 apb Exp $
|
||||
# $NetBSD: Makefile,v 1.12 2012/12/02 12:48:33 apb Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
COMPATOBJ!= cd ${.CURDIR}/../compat && ${PRINTOBJDIR}
|
||||
.-include "${COMPATOBJ}/defs.mk"
|
||||
.-include "${TOOLDIR}/share/compat/defs.mk"
|
||||
|
||||
TIMESTAMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.2 2012/04/15 08:37:32 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2013/11/28 12:08:57 mrg Exp $
|
||||
#
|
||||
|
||||
GNUHOSTDIST= ${.CURDIR}/../../external/lgpl2/mpc/dist
|
||||
GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/mpc/dist
|
||||
|
||||
CONFIGURE_ARGS+= --with-gmp=${TOOLDIR:Q} \
|
||||
--with-mpfr=${TOOLDIR:Q}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.6 2005/08/26 03:19:14 elad Exp $
|
||||
# $NetBSD: Makefile,v 1.7 2013/02/06 01:01:48 christos Exp $
|
||||
|
||||
HOSTPROGNAME= ${_TOOL_PREFIX}mtree
|
||||
HOST_SRCDIR= usr.sbin/mtree
|
||||
HOST_CPPFLAGS= -DNO_MD5 -DNO_RMD160 -DNO_SHA1 -DNO_SHA2
|
||||
#HOST_CPPFLAGS= -DNO_MD5 -DNO_RMD160 -DNO_SHA1 -DNO_SHA2
|
||||
|
||||
.include "${.CURDIR}/../Makefile.host"
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
# $NetBSD: Makefile,v 1.9 2002/12/08 20:20:05 thorpej Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2013/06/14 16:10:02 tsutsui Exp $
|
||||
|
||||
MODULE= texinfo
|
||||
|
||||
CONFIGURE_ARGS= --program-prefix=${_TOOL_PREFIX}
|
||||
|
||||
.include "${.CURDIR}/../Makefile.gnuhost"
|
||||
|
||||
.if !empty(.MAKE.OS:M*CYGWIN*) && target(install)
|
||||
.END: install-texinfo
|
||||
install-texinfo:
|
||||
${HOST_SH} ${NETBSDSRCDIR}/tools/binstall/mkmanifest ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info.exe
|
||||
.endif
|
||||
|
||||
Reference in New Issue
Block a user