Reduce compiler/libraries/headers cases to only two
1. ack, a.out, minix headers (moved to /usr/include.ack), minix libc 2. gcc/clang, elf, netbsd headers (moved to /usr/include), netbsd libc (moved to /usr/lib) So this obsoletes the /usr/netbsd hierarchy. No special invocation for netbsd libc necessary - it's always used for gcc/clang.
This commit is contained in:
+1
-4
@@ -1,8 +1,5 @@
|
||||
.include <bsd.own.mk>
|
||||
|
||||
SUBDIR= mk
|
||||
.if (${NBSD_LIBC} == "no")
|
||||
SUBDIR+= zoneinfo
|
||||
.endif
|
||||
SUBDIR= mk zoneinfo
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ FILES= bsd.ack.mk bsd.dep.mk bsd.files.mk \
|
||||
bsd.init.mk bsd.kinc.mk bsd.klinks.mk bsd.lib.mk \
|
||||
bsd.links.mk bsd.man.mk bsd.obj.mk bsd.own.mk \
|
||||
bsd.prog.mk bsd.subdir.mk bsd.sys.mk bsd.gcov.mk \
|
||||
minix.libc.mk pkgsrchooks.mk sys.mk
|
||||
pkgsrchooks.mk sys.mk
|
||||
|
||||
# MINIX-specific files
|
||||
FILES+= minix.bootprog.mk
|
||||
|
||||
@@ -541,12 +541,6 @@ OBJECT_FMT= ELF
|
||||
OBJECT_FMT= a.out
|
||||
.endif
|
||||
|
||||
.if ${COMPILER_TYPE} == "gnu"
|
||||
.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
|
||||
LIBDIR= /usr/netbsd/lib
|
||||
.endif
|
||||
.endif
|
||||
|
||||
#
|
||||
# If this platform's toolchain is missing, we obviously cannot build it.
|
||||
#
|
||||
|
||||
@@ -28,12 +28,8 @@ cleanprog: .PHONY cleanobjs cleanextra
|
||||
|
||||
##### Default values
|
||||
.if empty(CPPFLAGS:M-nostdinc)
|
||||
.if (${NBSD_LIBC} == "yes")
|
||||
CPPFLAGS+= ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/netbsd/include}
|
||||
.else
|
||||
CPPFLAGS+= ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
|
||||
.endif
|
||||
.endif
|
||||
.if empty(CXXFLAGS:M-nostdinc++)
|
||||
CXXFLAGS+= ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}
|
||||
.endif
|
||||
@@ -69,12 +65,8 @@ LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a
|
||||
.if ${COMPILER_TYPE} == "ack"
|
||||
LIB${_lib:tu}= ${DESTDIR}/usr/lib/i386/lib${_lib}.a
|
||||
.elif ${COMPILER_TYPE} == "gnu"
|
||||
.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
|
||||
LIB${_lib:tu}= ${DESTDIR}/usr/netbsd/lib/lib${_lib}.a
|
||||
.else
|
||||
LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib}.a
|
||||
.endif
|
||||
.endif
|
||||
.MADE: ${LIB${_lib:tu}} # Note: ${DESTDIR} will be expanded
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
+1
-2
@@ -66,8 +66,7 @@ HAS_SSP= yes
|
||||
.endif
|
||||
|
||||
.if defined(NBSD_LIBC) && (${NBSD_LIBC} != "no")
|
||||
CPPFLAGS+= -nostdinc -D__NBSD_LIBC -isystem /usr/netbsd/include
|
||||
LDFLAGS+= -L /usr/netbsd/lib
|
||||
CPPFLAGS+= -D__NBSD_LIBC
|
||||
.endif
|
||||
|
||||
.if defined(USE_FORT) && (${USE_FORT} != "no")
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# NetBSD libc flags go here
|
||||
NETBSD_LIBC_CPPFLAGS=-B/usr/netbsd -D__NBSD_LIBC
|
||||
NETBSD_LIBC_LDFLAGS=-B/usr/netbsd:/usr/netbsd/lib -lminlib -lcompat_minix
|
||||
# Minix libc flags go here
|
||||
MINIX_LIBC_CPPFLAGS=
|
||||
MINIX_LIBC_LDFLAGS=
|
||||
@@ -2,35 +2,4 @@
|
||||
|
||||
.if !defined(_MINIX_PKGSRC_HOOKS_)
|
||||
_MINIX_PKGSRC_HOOKS_=1
|
||||
|
||||
# Get PKGS_REQUIRING_MINIX_LIBC
|
||||
.include "/usr/pkgsrc/minix/pkgs_requiring_minix_libc.mk"
|
||||
|
||||
# Get MINIX_LIBC_* and NETBSD_LIBC_*
|
||||
.include "/usr/share/mk/minix.libc.mk"
|
||||
|
||||
# Build everything not in PKGS_REQUIRING_MINIX_LIBC with NetBSD libc
|
||||
PKG_REQUIRES_MINIX_LIBC=no
|
||||
|
||||
# Search PKGS_REQUIRING_MINIX_LIBC to see if it needs Minix libc
|
||||
.for PKG_REQUIRING_MINIX_LIBC in ${PKGS_REQUIRING_MINIX_LIBC}
|
||||
.if "${PKG_REQUIRING_MINIX_LIBC}" == "${PKGPATH}"
|
||||
PKG_REQUIRES_MINIX_LIBC=yes
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
# Set the proper compilation flags
|
||||
.if ${PKG_REQUIRES_MINIX_LIBC} == yes
|
||||
CPPFLAGS+= ${MINIX_LIBC_CPPFLAGS}
|
||||
LDFLAGS+= ${MINIX_LIBC_LDFLAGS}
|
||||
.else
|
||||
SED=/bin/sed
|
||||
.include "/usr/pkgsrc/mk/nbsd_libc.buildlink3.mk"
|
||||
PREFER_NATIVE+=minlib
|
||||
PREFER_NATIVE+=compat_minix
|
||||
PREFER_NATIVE+=nbsd_libc
|
||||
CPPFLAGS+= ${NETBSD_LIBC_CPPFLAGS}
|
||||
LDFLAGS+= ${NETBSD_LIBC_LDFLAGS}
|
||||
.endif
|
||||
|
||||
.endif # !defined(_MINIX_PKGSRC_HOOKS_)
|
||||
|
||||
+1
-2
@@ -239,8 +239,7 @@ AR?= ar
|
||||
.endif
|
||||
|
||||
# Set NBSD_LIBC to either "yes" or "no".
|
||||
.if !defined(NBSD) || (${NBSD} == "no") \
|
||||
|| !defined(COMPILER_TYPE) || (${COMPILER_TYPE} == "ack")
|
||||
.if ${COMPILER_TYPE} == "ack"
|
||||
NBSD_LIBC= no
|
||||
.else
|
||||
NBSD_LIBC= yes
|
||||
|
||||
Reference in New Issue
Block a user