Cross compile on minix support
* Remade patch so it works with minix patch tool. * New MINIX tar support -ox, so revert back to it In fetch scripts, tar had been replaced by bsdtar as the prebvious tar did not support the -o flag under minix, which is required to prevent usage of tar file stored user and group information. This introduces portability problems. As our new tar tool now support that flag revert back to improve portability.
This commit is contained in:
parent
6227378147
commit
b8a678ef1d
32 changed files with 21644 additions and 31161 deletions
5
build.sh
5
build.sh
|
@ -763,6 +763,8 @@ nobomb_getmakevar()
|
|||
"${make}" -m ${TOP}/share/mk -s -B -f- _x_ <<EOF || return 1
|
||||
_x_:
|
||||
echo \${$1}
|
||||
# LSC FIXME: We are cross compiling, so overwrite default and build tools
|
||||
USETOOLS:=yes
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.kernobj.mk>
|
||||
EOF
|
||||
|
@ -1693,10 +1695,9 @@ EOF
|
|||
eval cat <<EOF
|
||||
MAKEWRAPPERMACHINE=${makewrappermachine:-${MACHINE}}; export MAKEWRAPPERMACHINE
|
||||
USETOOLS=yes; export USETOOLS
|
||||
MKGCC=yes; export MKGCC
|
||||
MKGDB=no; export MKGDB
|
||||
# LSC We are cross compiling, so do not install to root!
|
||||
MKINSTALLBOOT=no; export MKINSTALLBOOT
|
||||
MKGCC=yes; export MKGCC
|
||||
EOF
|
||||
} | eval sort -u "${makewrapout}"
|
||||
eval cat <<EOF "${makewrapout}"
|
||||
|
|
|
@ -89,6 +89,7 @@ expand.c: arith.h
|
|||
trap.c: signames.h
|
||||
cd.c complete.c eval.c exec.c expand.c jobs.c main.c options.c parser.c redir.c show.c trap.c var.c: nodes.h
|
||||
eval.c exec.c expand.c input.c input.h jobs.c mystring.c output.c parser.c trap.c var.c: syntax.h
|
||||
cd.c eval.c exec.c histedit.cjobs.c main.c miscbltin.c options.c trap.c var.c: builtins.h
|
||||
|
||||
# LSC: Seems that this file is implicitly taken into account by NetBSD's make,
|
||||
# still seems to be ignored / not found currently.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# LSC For now...
|
||||
NOGCCERROR:= yes
|
||||
PROG= getty
|
||||
BINDIR= /bin
|
||||
MAN=
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
./bin/cpio minix-sys
|
||||
./bin/cp minix-sys
|
||||
./bin/date minix-sys
|
||||
./bin/dev2name minix-sys
|
||||
./bin/dev2name minix-sys obsolete
|
||||
./bin/echo minix-sys
|
||||
./bin/ed minix-sys
|
||||
./bin/expr minix-sys
|
||||
|
@ -107,6 +107,7 @@
|
|||
./libexec/ld-elf.so.1 minix-sys
|
||||
./libexec minix-sys
|
||||
./lib minix-sys
|
||||
./lib/cpp minix-sys
|
||||
./mnt minix-sys
|
||||
./proc minix-sys
|
||||
./root/.ashrc minix-sys
|
||||
|
@ -291,7 +292,7 @@
|
|||
./usr/bin/mkdep minix-sys
|
||||
./usr/bin/mkdir minix-sys
|
||||
./usr/bin/mkfifo minix-sys
|
||||
./usr/bin/mkproto minix-sys
|
||||
./usr/bin/mkproto minix-sys obsolete
|
||||
./usr/bin/mktemp minix-sys
|
||||
./usr/bin/more minix-sys
|
||||
./usr/bin/mt minix-sys
|
||||
|
@ -1213,7 +1214,7 @@
|
|||
./usr/man/man1/cut.1 minix-sys
|
||||
./usr/man/man1/date.1 minix-sys
|
||||
./usr/man/man1/dd.1 minix-sys
|
||||
./usr/man/man1/dev2name.1 minix-sys
|
||||
./usr/man/man1/dev2name.1 minix-sys obsolete
|
||||
./usr/man/man1/df.1 minix-sys
|
||||
./usr/man/man1/dhrystone.1 minix-sys
|
||||
./usr/man/man1/diff.1 minix-sys
|
||||
|
@ -1304,7 +1305,8 @@
|
|||
./usr/man/man1/mkdep.1 minix-sys
|
||||
./usr/man/man1/mkdir.1 minix-sys
|
||||
./usr/man/man1/mkfifo.1 minix-sys
|
||||
./usr/man/man1/mkfs.1 minix-sys
|
||||
./usr/man/man1/mkfs.1 minix-sys obsolete
|
||||
./usr/man/man1/mkfs.mfs.1 minix-sys
|
||||
./usr/man/man1/mkproto.1 minix-sys
|
||||
./usr/man/man1/mktemp.1 minix-sys
|
||||
./usr/man/man1/more.1 minix-sys
|
||||
|
@ -3681,6 +3683,7 @@
|
|||
./usr/pkg minix-sys
|
||||
./usr/preserve minix-sys
|
||||
./usr/run minix-sys
|
||||
./usr/sbin minix-sys
|
||||
./usr/sbin/acpi minix-sys
|
||||
./usr/sbin/amddev minix-sys
|
||||
./usr/sbin/atl2 minix-sys
|
||||
|
@ -3709,7 +3712,7 @@
|
|||
./usr/sbin/lance minix-sys
|
||||
./usr/sbin/log minix-sys
|
||||
./usr/sbin/memory minix-sys
|
||||
./usr/sbin minix-sys
|
||||
./usr/sbin/mkproto minix-sys
|
||||
./usr/sbin/mtree minix-sys
|
||||
./usr/sbin/orinoco minix-sys
|
||||
./usr/sbin/pci minix-sys
|
||||
|
@ -3762,7 +3765,7 @@
|
|||
./usr/share/doc/psd/19.curses/macros minix-sys
|
||||
./usr/share/doc/psd/19.curses/Makefile minix-sys
|
||||
./usr/share/doc/psd/19.curses/Master minix-sys
|
||||
./usr/share/doc/psd/19.curses minix-sys
|
||||
./usr/share/doc/psd/19.curses inix-sys
|
||||
./usr/share/doc/psd/19.curses/twinkle1.c minix-sys
|
||||
./usr/share/doc/psd/19.curses/twinkle2.c minix-sys
|
||||
./usr/share/doc/psd/19.curses/win_st.c minix-sys
|
||||
|
@ -3824,11 +3827,11 @@
|
|||
./usr/share/mk/bsd.test.mk minix-sys
|
||||
./usr/share/mk/bsd.x11.mk minix-sys
|
||||
./usr/share/mk/minix.bootprog.mk minix-sys
|
||||
./usr/share/mk/minix.gcc.mk minix-sys
|
||||
./usr/share/mk/minix.gcc.mk minix-sys obsolete
|
||||
./usr/share/mk/minix.gcov.mk minix-sys
|
||||
./usr/share/mk/minix.service.mk minix-sys
|
||||
./usr/share/mk minix-sys
|
||||
./usr/share/mk/pkgsrchooks.mk minix-sys
|
||||
./usr/share/mk/pkgsrchooks.mk minix-sys obsolete
|
||||
./usr/share/mk/sys.mk minix-sys
|
||||
./usr/share/terminfo minix-sys
|
||||
./usr/share/terminfo/terminfo.db minix-sys
|
||||
|
@ -4171,7 +4174,7 @@
|
|||
./usr/share/zoneinfo/Atlantic/Faroe minix-sys
|
||||
./usr/share/zoneinfo/Atlantic/Jan_Mayen minix-sys
|
||||
./usr/share/zoneinfo/Atlantic/Madeira minix-sys
|
||||
./usr/share/zoneinfo/Atlantic minix-sys
|
||||
./usr/share/zoneinfo/Atlantic inix-sys
|
||||
./usr/share/zoneinfo/Atlantic/Reykjavik minix-sys
|
||||
./usr/share/zoneinfo/Atlantic/South_Georgia minix-sys
|
||||
./usr/share/zoneinfo/Atlantic/Stanley minix-sys
|
||||
|
@ -4470,6 +4473,7 @@
|
|||
./boot/minix/.temp/mod10_vm minix-sys
|
||||
./boot/minix/.temp/mod11_pfs minix-sys
|
||||
./boot/minix/.temp/mod12_init minix-sys
|
||||
|
||||
./multiboot minix-sys
|
||||
./multiboot/kernel minix-sys
|
||||
./multiboot/mod01_ds minix-sys
|
||||
|
|
|
@ -300,7 +300,9 @@ FILESMODE_minfree= 600
|
|||
CONFIGSYMLINKS+= ${TZDIR}/${LOCALTIME} /etc/localtime \
|
||||
/usr/sbin/rmt /etc/rmt
|
||||
.else
|
||||
CONFIGSYMLINKS+= /usr/log /var/log \
|
||||
CONFIGSYMLINKS+= \
|
||||
/usr/lib/cpp /lib/cpp \
|
||||
/usr/log /var/log \
|
||||
/usr/tmp /var/tmp \
|
||||
/usr/pkg/bin/clang /usr/bin/cc \
|
||||
/usr/pkg/bin/strip /usr/bin/strip \
|
||||
|
|
2
external/gpl3/binutils/fetch.sh
vendored
2
external/gpl3/binutils/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
bsdtar -oxjf binutils-2.21.1.tar.bz2 && \
|
||||
tar -oxjf binutils-2.21.1.tar.bz2 && \
|
||||
mv binutils-2.21.1 dist && \
|
||||
cd dist && \
|
||||
cat ../patches/* | patch -p1
|
||||
|
|
File diff suppressed because it is too large
Load diff
11
external/gpl3/binutils/patches/0002-minix-on-minix.patch
vendored
Normal file
11
external/gpl3/binutils/patches/0002-minix-on-minix.patch
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff -rNU3 dist/binutils/dwarf.c dist.new/binutils/dwarf.c
|
||||
--- dist/binutils/dwarf.c Wed Nov 7 17:24:51 2012
|
||||
+++ dist.new/binutils/dwarf.c Wed Nov 7 15:50:59 2012
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "elf/common.h"
|
||||
#include "dwarf2.h"
|
||||
#include "dwarf.h"
|
||||
+#include "getopt.h"
|
||||
|
||||
static const char *regname (unsigned int regno, int row);
|
||||
|
2
external/gpl3/gcc/fetch.sh
vendored
2
external/gpl3/gcc/fetch.sh
vendored
|
@ -32,7 +32,7 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
bsdtar -oxjf gcc-4.5.3.tar.bz2 && \
|
||||
tar -oxjf gcc-4.5.3.tar.bz2 && \
|
||||
mv gcc-4.5.3 dist && \
|
||||
cd dist && \
|
||||
rm -rf $DELETEDIRS && \
|
||||
|
|
49175
external/gpl3/gcc/patches/0000-gcc_nbsd.patch
vendored
49175
external/gpl3/gcc/patches/0000-gcc_nbsd.patch
vendored
File diff suppressed because it is too large
Load diff
12
external/gpl3/gcc/patches/0002-minix-on-minix.patch
vendored
Normal file
12
external/gpl3/gcc/patches/0002-minix-on-minix.patch
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -rNU3 gcc-4.5.3/configure dist/configure
|
||||
--- gcc-4.5.3/configure Wed Nov 7 20:12:53 2012
|
||||
+++ dist/configure Wed Nov 7 19:25:20 2012
|
||||
@@ -5321,7 +5321,7 @@
|
||||
|
||||
|
||||
# Check for GMP, MPFR and MPC
|
||||
-gmplibs="-lmpc -lmpfr -lgmp"
|
||||
+gmplibs="-lmpc -lmpfr -lgmp -lm"
|
||||
gmpinc=
|
||||
have_gmp=no
|
||||
|
2
external/lgpl2/mpc/fetch.sh
vendored
2
external/lgpl2/mpc/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
bsdtar -oxzf mpc-0.9.tar.gz
|
||||
tar -oxzf mpc-0.9.tar.gz
|
||||
mv mpc-0.9 dist
|
||||
fi
|
||||
|
||||
|
|
2
external/lgpl3/gmp/fetch.sh
vendored
2
external/lgpl3/gmp/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
bsdtar -oxjf gmp-5.0.2.tar.bz2
|
||||
tar -oxjf gmp-5.0.2.tar.bz2
|
||||
mv gmp-5.0.2 dist && \
|
||||
cd dist && \
|
||||
cat ../patches/* |patch -p1
|
||||
|
|
2
external/lgpl3/mpfr/fetch.sh
vendored
2
external/lgpl3/mpfr/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
bsdtar -oxjf mpfr-3.0.1.tar.bz2
|
||||
tar -oxjf mpfr-3.0.1.tar.bz2
|
||||
mv mpfr-3.0.1 dist && \
|
||||
cd dist && \
|
||||
cat ../patches/* |patch -p1
|
||||
|
|
|
@ -10,7 +10,7 @@ MDEC= /usr/mdec
|
|||
GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
|
||||
|
||||
# LSC detect where were built the objects files
|
||||
PROGROOT:= ../..
|
||||
PROGROOT:= ..
|
||||
.if "${MAKEOBJDIR:S,${.CURDIR},,}" != ""
|
||||
PROGROOT:= ${MAKEOBJDIR:S,releasetools,,}
|
||||
.endif
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
|
||||
.if ${MKSHARE} != "no" || \
|
||||
make(clean) || make(cleandir) || make(distclean) || make(obj)
|
||||
SUBDIR= mk terminfo zoneinfo misc
|
||||
SUBDIR= misc mk \
|
||||
terminfo zoneinfo
|
||||
.if ${MKNLS} != "no"
|
||||
SUBDIR+=i18n locale nls
|
||||
.endif
|
||||
|
|
|
@ -16,8 +16,7 @@ FILES= bsd.README bsd.clang-analyze.mk bsd.clean.mk bsd.dep.mk bsd.doc.mk \
|
|||
bsd.subdir.mk bsd.sys.mk bsd.test.mk bsd.x11.mk sys.mk
|
||||
|
||||
# MINIX-specific files
|
||||
FILES+= minix.bootprog.mk minix.service.mk \
|
||||
minix.gcc.mk minix.gcov.mk pkgsrchooks.mk
|
||||
FILES+= minix.bootprog.mk minix.service.mk minix.gcov.mk
|
||||
|
||||
FILESDIR=/usr/share/mk
|
||||
.endif
|
||||
|
|
|
@ -23,4 +23,22 @@ _GCC_CRTDIR?= ${DESTDIR}/usr/lib
|
|||
_GCC_LIBGCCDIR?= ${DESTDIR}/usr/lib
|
||||
.endif
|
||||
|
||||
.if defined(__MINIX)
|
||||
AFLAGS+=-D__ASSEMBLY__
|
||||
CPPFLAGS+= -fno-builtin -Wall -Wno-sign-compare
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
CPPFLAGS+= -march=i586
|
||||
.elif ${MACHINE_ARCH} == "arm"
|
||||
CPPFLAGS+= -march=armv7-a
|
||||
CPPFLAGS+= -D__minix
|
||||
.endif
|
||||
|
||||
# LSC In the current state there is too much to be done
|
||||
# Some package have been identified by directly adding NOGCCERROR
|
||||
# To their Makefiles
|
||||
NOGCCERROR:= yes
|
||||
NOCLANGERROR:= yes
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
.endif # ! defined(_BSD_GCC_MK_)
|
||||
|
|
|
@ -510,9 +510,12 @@ _INSTRANLIB=${empty(PRESERVE):?-a "${RANLIB} -t":}
|
|||
__archivebuild: .USE
|
||||
${_MKTARGET_BUILD}
|
||||
rm -f ${.TARGET}
|
||||
# LSC MINIX: We do not have yet imported tsort nor lorder
|
||||
# ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
|
||||
.if defined(__MINIX)
|
||||
# LSC FIXME MINIX: We do not have yet imported tsort nor lorder
|
||||
${AR} ${_ARFL} ${.TARGET} ${.ALLSRC:M*o}
|
||||
.else
|
||||
${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
|
||||
.endif # defined(__MINIX)
|
||||
.endif
|
||||
|
||||
.if !target(__archiveinstall)
|
||||
|
@ -566,7 +569,8 @@ DPLIBC ?= ${DESTDIR}${LIBC_SO}
|
|||
.else
|
||||
LDLIBC ?= -nodefaultlibs
|
||||
.if ${LIB} == "c"
|
||||
LDADD+= -lgcc
|
||||
LDADD+= ${${ACTIVE_CC} == "gcc":?-lgcc:}
|
||||
LDADD+= ${${ACTIVE_CC} == "clang":?-L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic:}
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
|
@ -821,6 +825,5 @@ LINKSMODE?= ${LIBMODE}
|
|||
.include <bsd.dep.mk>
|
||||
.include <bsd.clang-analyze.mk>
|
||||
.include <bsd.clean.mk>
|
||||
.include <minix.gcc.mk>
|
||||
|
||||
${TARGETS}: # ensure existence
|
||||
|
|
|
@ -8,23 +8,31 @@
|
|||
.if !defined(_BSD_OWN_MK_)
|
||||
_BSD_OWN_MK_=1
|
||||
|
||||
# LSC SAVE SOME TIME...
|
||||
MKCLEANVERIFY:= no
|
||||
|
||||
.ifndef HOSTPROG
|
||||
# LSC Needed at a lot of places for MINIX
|
||||
CPPFLAGS+= -isystem ${DESTDIR}/usr/include
|
||||
MKDYNAMICROOT:= no
|
||||
|
||||
# Override MACHINE as the native host make will set it to i686
|
||||
_uname_s!= uname -s
|
||||
.if ${_uname_s} == "Minix" && ${MACHINE_ARCH} == "i386"
|
||||
MACHINE:= i386
|
||||
.endif
|
||||
|
||||
.if defined(__MINIX)
|
||||
|
||||
# LSC FIXME: Useless difference, Should use the mk.conf
|
||||
MAKECONF?= /etc/make.conf
|
||||
|
||||
# Some Minix deviations from NetBSD
|
||||
LDSTATIC?= -static
|
||||
MKDYNAMICROOT?= no
|
||||
|
||||
BINMODE?= 755
|
||||
NONBINMODE?= 644
|
||||
MANDIR?= /usr/man
|
||||
BINGRP?= operator
|
||||
MANGRP?= operator
|
||||
INFOGRP?= operator
|
||||
DOCGRP?= operator
|
||||
|
||||
MACHINE_GNU_PLATFORM?=${MACHINE_ARCH}-elf32-minix
|
||||
.endif # defined(__MINIX)
|
||||
|
||||
MKBINUTILS:= no
|
||||
MKGDB:= no
|
||||
MKGCC?= no
|
||||
|
||||
# LSC To check if works
|
||||
#DESTDIR?= /usr/destdir.${MACHINE_ARCH}
|
||||
|
||||
# LSC MINIX SMP Support?
|
||||
.ifdef CONFIG_SMP
|
||||
|
@ -35,9 +43,26 @@ SMP_FLAGS += -DCONFIG_MAX_CPUS=${CONFIG_MAX_CPUS}
|
|||
.endif
|
||||
|
||||
CPPFLAGS+= ${SMP_FLAGS}
|
||||
.endif
|
||||
|
||||
MAKECONF?= /etc/make.conf
|
||||
__uname_s!= uname -s
|
||||
.if ${__uname_s:Uunknown} == "Minix"
|
||||
USETOOLS?= never
|
||||
. if ${USETOOLS:Uno} != "yes"
|
||||
#HAVE_LLVM?=2.9
|
||||
HAVE_LLVM?=3.1
|
||||
. endif
|
||||
. if !defined(HOSTPROG) && !defined(HOSTLIB)
|
||||
# LSC FIXME: Override MACHINE as the native minix host make command will set
|
||||
# it to i686.
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
MACHINE:= i386
|
||||
. endif
|
||||
. endif # !defined(HOSTPROG) && !defined(HOSTLIB)
|
||||
.endif # __uname_s == "Minix"
|
||||
|
||||
.else
|
||||
MAKECONF?= /etc/mk.conf
|
||||
.endif # defined(__MINIX)
|
||||
.-include "${MAKECONF}"
|
||||
|
||||
#
|
||||
|
@ -551,10 +576,10 @@ BSDSRCDIR?= /usr/src
|
|||
BSDOBJDIR?= /usr/obj
|
||||
NETBSDSRCDIR?= ${BSDSRCDIR}
|
||||
|
||||
BINGRP?= operator
|
||||
BINGRP?= wheel
|
||||
BINOWN?= root
|
||||
BINMODE?= 755
|
||||
NONBINMODE?= 644
|
||||
BINMODE?= 555
|
||||
NONBINMODE?= 444
|
||||
|
||||
# These are here mainly because we don't want suid root in case
|
||||
# a Makefile defines BINMODE.
|
||||
|
@ -563,14 +588,14 @@ RUMPBINOWN?= root
|
|||
RUMPBINMODE?= 555
|
||||
RUMPNONBINMODE?=444
|
||||
|
||||
MANDIR?= /usr/man
|
||||
MANGRP?= operator
|
||||
MANDIR?= /usr/share/man
|
||||
MANGRP?= wheel
|
||||
MANOWN?= root
|
||||
MANMODE?= ${NONBINMODE}
|
||||
MANINSTALL?= ${_MANINSTALL}
|
||||
|
||||
INFODIR?= /usr/share/info
|
||||
INFOGRP?= operator
|
||||
INFOGRP?= wheel
|
||||
INFOOWN?= root
|
||||
INFOMODE?= ${NONBINMODE}
|
||||
|
||||
|
@ -583,7 +608,7 @@ LIBMODE?= ${NONBINMODE}
|
|||
|
||||
DOCDIR?= /usr/share/doc
|
||||
HTMLDOCDIR?= /usr/share/doc/html
|
||||
DOCGRP?= operator
|
||||
DOCGRP?= wheel
|
||||
DOCOWN?= root
|
||||
DOCMODE?= ${NONBINMODE}
|
||||
|
||||
|
@ -839,6 +864,7 @@ MKZFS?= yes
|
|||
.endif
|
||||
|
||||
# Some tough Minix defaults
|
||||
MKCOVERAGE?= no
|
||||
MKPROFILE?= no
|
||||
MKSTATICLIB:= yes
|
||||
MKLINT:= no
|
||||
|
@ -848,7 +874,6 @@ USE_FORT:= no
|
|||
MKYP:= no
|
||||
MKPF:= no
|
||||
MKNLS:= no
|
||||
MKCOVERAGE?= no
|
||||
MKHESIOD:= no
|
||||
MKPOSTFIX:= no
|
||||
MKKMOD:= no
|
||||
|
@ -868,8 +893,6 @@ MKIPFILTER:= no
|
|||
MKINET6:= no
|
||||
MKGROFF:= no
|
||||
MKHTML:= no
|
||||
MKBINUTILS:= no
|
||||
MKGDB:= no
|
||||
|
||||
#
|
||||
# MK* options which default to "yes".
|
||||
|
@ -1033,12 +1056,12 @@ COPY?= -c
|
|||
.if ${MKUPDATE} == "no"
|
||||
PRESERVE?=
|
||||
.else
|
||||
#XXX: Not supported by MINIX install
|
||||
#LSC: Not supported by MINIX install
|
||||
PRESERVE?= -p
|
||||
.endif
|
||||
#XXX: Not supported by MINIX install
|
||||
RENAME?= -r
|
||||
.endif
|
||||
.endif # != "Minix"
|
||||
HRDLINK?= -l h
|
||||
SYMLINK?= -l s
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
.include <bsd.init.mk>
|
||||
.include <bsd.shlib.mk>
|
||||
.include <bsd.gcc.mk>
|
||||
#.include <minix.gcov.mk>
|
||||
.include <minix.gcc.mk>
|
||||
.include <minix.gcov.mk>
|
||||
|
||||
#
|
||||
# Definitions and targets shared among all programs built by a single
|
||||
|
@ -120,9 +119,6 @@ LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib:S/xx/++/:S/atf_c/atf-c/}.a
|
|||
.endif
|
||||
.endfor
|
||||
|
||||
#LSC Add minix base library, required for libc to work.
|
||||
LDADD+= -L=/usr/lib -lminlib
|
||||
|
||||
# PAM applications, if linked statically, need more libraries
|
||||
.if (${MKPIC} == "no")
|
||||
.if (${MKCRYPTO} != "no")
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
.if !defined(_BSD_SYS_MK_)
|
||||
_BSD_SYS_MK_=1
|
||||
|
||||
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix"
|
||||
HOST_CPP?= /usr/lib/cpp
|
||||
.endif
|
||||
|
||||
.if ${MKREPRO:Uno} == "yes"
|
||||
CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
|
||||
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
|
||||
|
@ -33,7 +37,9 @@ CFLAGS+= -Wno-sign-compare
|
|||
CFLAGS+= ${${ACTIVE_CC} != "clang":? -Wno-traditional :}
|
||||
.if !defined(NOGCCERROR)
|
||||
# Set assembler warnings to be fatal
|
||||
CFLAGS+= -Wa,--fatal-warnings
|
||||
#CFLAGS+= -Wa,--fatal-warnings
|
||||
# LSC Clang version 2.9 those not support this flag
|
||||
CFLAGS+= ${${HAVE_LLVM:U} != "2.9":? -Wa,--fatal-warnings:}
|
||||
.endif
|
||||
# Set linker warnings to be fatal
|
||||
# XXX no proper way to avoid "FOO is a patented algorithm" warnings
|
||||
|
@ -109,7 +115,11 @@ CPPFLAGS+= -D_FORTIFY_SOURCE=2
|
|||
.if (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
|
||||
.if ${HAS_SSP} == "yes"
|
||||
COPTS+= -fstack-protector -Wstack-protector
|
||||
.if defined(__MINIX)
|
||||
COPTS+= ${${ACTIVE_CC} == "clang":? -mllvm -stack-protector-buffer-size=1 :}
|
||||
.else
|
||||
COPTS+= ${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
|
||||
.endif # defined(__MINIX)
|
||||
COPTS+= ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
|
||||
.endif
|
||||
.endif
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
LDSTATIC?= -static
|
||||
|
||||
AFLAGS+=-D__ASSEMBLY__
|
||||
CPPFLAGS+= -fno-builtin -Wall -Wno-sign-compare
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
CPPFLAGS+= -march=i586
|
||||
.elif ${MACHINE_ARCH} == "arm"
|
||||
CPPFLAGS+= -march=armv7-a
|
||||
CPPFLAGS+= -D__minix
|
||||
.endif
|
||||
|
||||
# LSC In the current state there is too much to be done
|
||||
# Some package have been identified by directly adding NOGCCERROR
|
||||
# To their Makefiles
|
||||
NOGCCERROR:= yes
|
||||
NOCLANGERROR:= yes
|
|
@ -1,5 +0,0 @@
|
|||
#
|
||||
|
||||
.if !defined(_MINIX_PKGSRC_HOOKS_)
|
||||
_MINIX_PKGSRC_HOOKS_=1
|
||||
.endif # !defined(_MINIX_PKGSRC_HOOKS_)
|
|
@ -1,19 +1,25 @@
|
|||
# $NetBSD: sys.mk,v 1.110 2012/10/06 20:54:58 christos Exp $
|
||||
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
|
||||
|
||||
unix?= We run MINIX.
|
||||
|
||||
# This variable should be used to differentiate Minix builds in Makefiles.
|
||||
__MINIX= yes
|
||||
|
||||
COMPILER_TYPE=gnu
|
||||
NBSD_LIBC= yes
|
||||
|
||||
.if defined(MKSMALL) && ${MKSMALL} == "yes"
|
||||
.if defined(__MINIX)
|
||||
.if ${MKSMALL:U} == "yes"
|
||||
DBG= -Os
|
||||
CFLAGS+= -DNDEBUG
|
||||
.endif
|
||||
|
||||
unix?= We run MINIX.
|
||||
|
||||
COMPILER_TYPE=gnu
|
||||
NBSD_LIBC= yes
|
||||
|
||||
DBG?= -O
|
||||
CPP?= /usr/lib/cpp
|
||||
.endif # defined(__MINIX)
|
||||
unix?= We run NetBSD.
|
||||
|
||||
.SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh
|
||||
|
||||
.LIBS: .a
|
||||
|
@ -30,8 +36,7 @@ _ASM_TRADITIONAL_CPP= -x assembler-with-cpp
|
|||
COMPILE.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${_ASM_TRADITIONAL_CPP} -c
|
||||
LINK.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${LDFLAGS}
|
||||
|
||||
CC?= clang
|
||||
|
||||
CC?= cc
|
||||
.if ${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb"
|
||||
# -O2 is too -falign-* zealous for low-memory sh3 machines
|
||||
DBG?= -Os -freorder-blocks
|
||||
|
@ -41,9 +46,7 @@ DBG?= -Os
|
|||
.elif ${MACHINE_ARCH} == "vax"
|
||||
DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload
|
||||
.else
|
||||
#MINIX: use -O for now
|
||||
#DBG?= -O2
|
||||
DBG?= -O
|
||||
DBG?= -O2
|
||||
.endif
|
||||
CFLAGS?= ${DBG}
|
||||
LDFLAGS?=
|
||||
|
|
|
@ -77,6 +77,7 @@ GCC_CPPFLAGS= -DNETBSD_TOOLS -DTARGET_SYSTEM_ROOT=0 \
|
|||
|
||||
.if ${HOST_OSTYPE:C/\-.*//} == "Minix"
|
||||
GCC_CPPFLAGS+= -D_NETBSD_SOURCE -D_POSIX_SOURCE -D_COMPAT_MINIX
|
||||
CONFIGURE_ENV+= LDFLAGS=-lm
|
||||
.endif
|
||||
|
||||
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
|
||||
|
|
|
@ -13,6 +13,7 @@ PROG= passwd
|
|||
SRCS= local_passwd.c passwd.c
|
||||
MAN= passwd.1
|
||||
|
||||
# LSC No LOGIN_CAP on Minix?
|
||||
CPPFLAGS+=-I${.CURDIR} #-DLOGIN_CAP
|
||||
|
||||
.if (${USE_YP} != "no")
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
PROG= sed
|
||||
SRCS= compile.c main.c misc.c process.c
|
||||
|
||||
# LSC FIXME Still required?
|
||||
SYMLINKS?= ${BINDIR}/sed /bin/sed
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -7,7 +7,7 @@ CPPFLAGS+= -I${.CURDIR}/../../lib/libterminfo
|
|||
|
||||
.ifndef HOSTPROG
|
||||
LDADD+= -lterminfo -lutil
|
||||
DPADD+= ${LIBTERMINFO} #${LIBUTIL}
|
||||
DPADD+= ${LIBTERMINFO} ${LIBUTIL}
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
# LSC Until it compiles cleanly...
|
||||
NOGCCERROR:=yes
|
||||
|
||||
PROG= xinstall
|
||||
SRCS= xinstall.c getid.c
|
||||
MAN= install.1
|
||||
|
|
|
@ -252,8 +252,7 @@ main(int argc, char *argv[])
|
|||
case 'p':
|
||||
dopreserve = 1;
|
||||
#ifdef __minix
|
||||
errx(1,
|
||||
"Minix lacks support for futimes(3)/utimes(2)");
|
||||
warn("Minix lacks support for futimes(3)/utimes(2)");
|
||||
#endif
|
||||
break;
|
||||
case 'r':
|
||||
|
|
|
@ -8,7 +8,7 @@ CPPFLAGS+= -D_MINIX
|
|||
# LSC Adding this to activate the getline renaming macro
|
||||
CPPFLAGS+= -D__NBSD_LIBC
|
||||
|
||||
.if ${HOST_OSTYPE:C/\-.*//} == "Minix" || !defined(HOSTPROGNAME)
|
||||
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix" || !defined(HOSTPROGNAME)
|
||||
LDADD+= -lminlib -lcompat_minix
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue