diff options
author | jperkin <jperkin@pkgsrc.org> | 2015-08-31 09:03:19 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2015-08-31 09:03:19 +0000 |
commit | bd28fbd5f0b239b009fd87883bb31dae676bf1f8 (patch) | |
tree | 22024ec58f8f2ef9c2f5fedb0e7ca705c96f6461 /pkgtools | |
parent | 800ff904ff6daf558f1fff160e2bc6e330cf7a13 (diff) | |
download | pkgsrc-bd28fbd5f0b239b009fd87883bb31dae676bf1f8.tar.gz |
Update bootstrap-mk-files to 20150831. Changes:
* Reduce unnecessary diffs in Darwin, Linux, and SunOS mods.
* Sync WARNS flags on SunOS.
* Remove obsolete modifications to bsd.sys.mk and sys.mk on Darwin. This
primarily brings in PROG_CXX support.
Tested in bulk builds on all modified platforms.
Diffstat (limited to 'pkgtools')
9 files changed, 79 insertions, 319 deletions
diff --git a/pkgtools/bootstrap-mk-files/Makefile b/pkgtools/bootstrap-mk-files/Makefile index 321ef8d18d6..220b73c8938 100644 --- a/pkgtools/bootstrap-mk-files/Makefile +++ b/pkgtools/bootstrap-mk-files/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.47 2015/07/04 07:19:08 ryoon Exp $ +# $NetBSD: Makefile,v 1.48 2015/08/31 09:03:19 jperkin Exp $ -PKGNAME= bootstrap-mk-files-20150704 +PKGNAME= bootstrap-mk-files-20150831 CATEGORIES= pkgtools CONFLICTS+= mk-files-[0-9]* diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk index cd055da338d..989bfa38d21 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk +++ b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.bsd.lib.mk,v 1.5 2014/11/22 16:32:13 bsiegert Exp $ +# $NetBSD: Darwin.bsd.lib.mk,v 1.6 2015/08/31 09:03:19 jperkin Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .if !target(__initialized__) @@ -81,6 +81,8 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR} # Data-driven table using make variables to control how shared libraries # are built for different platforms and object formats. # OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk> +# SHLIB_MAJOR, SHLIB_MINOR, SHLIB_TEENY: Major, minor, and teeny version +# numbers of shared library # SHLIB_SOVERSION: version number to be compiled into a shared library # via -soname. Usualy ${SHLIB_MAJOR} on ELF. # NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR} @@ -90,9 +92,11 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR} # SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors # SHLIB_LDENDFILE: support .o file, call C++ file-level destructors # FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects. -# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS} -# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects. -# CAPICFLAGS flags for {$CC} to compiling .[Ss] files +# CPPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS} +# CPICFLAGS: flags for ${CC} to compile .[cC] files to pic objects. +# CSHLIBFLAGS: flags for ${CC} to compile .[cC] files to .so objects. +# (usually includes ${CPICFLAGS}) +# CAPICFLAGS: flags for ${CC} to compiling .[Ss] files # (usually just ${CPPPICFLAGS} ${CPICFLAGS}) # APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects. @@ -397,8 +401,11 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ ${SHLIB_LDENDFILE} .endif .if ${OBJECT_FMT} == "ELF" +.if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \ + "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}" ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR} +.endif ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp mv -f lib${LIB}.so.tmp lib${LIB}.so .endif diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk deleted file mode 100644 index 49e2f5729e3..00000000000 --- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.bsd.sys.mk +++ /dev/null @@ -1,65 +0,0 @@ -# $NetBSD: Darwin.bsd.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $ - -#OBJCOPY?= objcopy -STRIP?= strip -CONFIG?= config -RPCGEN?= rpcgen -MKLOCALE?= mklocale - -.SUFFIXES: .m .o .ln .lo - -# Objective C -# (Defined here rather than in <sys.mk> because `.m' is not just -# used for Objective C source) -.m: - ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.m.o: - ${COMPILE.m} ${.IMPSRC} - -.if defined(PARALLEL) || defined(LPREFIX) -LPREFIX?=yy -LFLAGS+=-P${LPREFIX} -# Lex -.l: - ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC} - ${LINK.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c ${LDLIBS} -ll - rm -f ${.TARGET:R}.${LPREFIX}.c -.l.c: - ${LEX.l} -o${.TARGET} ${.IMPSRC} -.l.o: - ${LEX.l} -o${.TARGET:R}.${LPREFIX}.c ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.${LPREFIX}.c - rm -f ${.TARGET:R}.${LPREFIX}.c -.endif - -# Yacc -.if defined(YHEADER) || defined(YPREFIX) -.if defined(YPREFIX) -YFLAGS+=-p${YPREFIX} -.endif -.if defined(YHEADER) -YFLAGS+=-d -.endif -.y: - ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} - ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS} - rm -f ${.TARGET:R}.tab.c ${.TARGET:R}.tab.h -.y.h: ${.TARGET:R}.c -.y.c: - ${YACC.y} -o ${.TARGET} ${.IMPSRC} -.y.o: - ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c - rm -f ${.TARGET:R}.tab.c ${TARGET:R}.tab.h -.elif defined(PARALLEL) -.y: - ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} - ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS} - rm -f ${.TARGET:R}.tab.c -.y.c: - ${YACC.y} -o ${.TARGET} ${.IMPSRC} -.y.o: - ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c - rm -f ${.TARGET:R}.tab.c -.endif diff --git a/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk deleted file mode 100644 index e7092b03e8f..00000000000 --- a/pkgtools/bootstrap-mk-files/files/mods/Darwin.sys.mk +++ /dev/null @@ -1,210 +0,0 @@ -# $NetBSD: Darwin.sys.mk,v 1.2 2006/11/11 18:24:52 jschauma Exp $ -# @(#)sys.mk 8.2 (Berkeley) 3/21/94 - -unix= We run UNIX. -OS!= uname -s - -.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h -.SUFFIXES: .sh .m4 - -.LIBS: .a - -AR?= ar -ARFLAGS?= rl -RANLIB?= ranlib - -AS?= as -AFLAGS?= -COMPILE.s?= ${AS} ${AFLAGS} -LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} - -.if exists(/usr/bin/gcc) -CC?= gcc -.else -CC?= cc -.endif -DBG?= -O2 -CFLAGS?= -pipe ${DBG} -COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} - -.if exists(/usr/bin/g++) -CXX?= g++ -.else -CXX?= c++ -.endif -CXXFLAGS?= ${CFLAGS} -COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} - -OBJC?= ${CC} -OBJCFLAGS?= ${CFLAGS} -COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} - -CPP?= cpp -NOLINT= 1 -CPPFLAGS?= - -MK_DEP?= mkdeps.sh -N - -FC?= f77 -FFLAGS?= -O -RFLAGS?= -COMPILE.f?= ${FC} ${FFLAGS} -c -LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} - -INSTALL?= install - -LEX?= lex -LFLAGS?= -LEX.l?= ${LEX} ${LFLAGS} - -LD?= ld -LDFLAGS?= - -LINT?= lint -LINTFLAGS?= -chapbx - -LORDER?= lorder - -MAKE?= bmake - -NM?= nm - -PC?= pc -PFLAGS?= -COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} - -SHELL?= sh - -SIZE?= size - -TSORT?= tsort -q - -YACC?= yacc -YFLAGS?= -d -YACC.y?= ${YACC} ${YFLAGS} - -# C -.c: - ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.c.o: - ${COMPILE.c} ${.IMPSRC} -.c.a: - ${COMPILE.c} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -# C++ -.cc: - ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.cc.o: - ${COMPILE.cc} ${.IMPSRC} -.cc.a: - ${COMPILE.cc} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -.C: - ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.C.o: - ${COMPILE.cc} ${.IMPSRC} -.C.a: - ${COMPILE.cc} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -# Fortran/Ratfor -.f: - ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.f.o: - ${COMPILE.f} ${.IMPSRC} -.f.a: - ${COMPILE.f} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -.F: - ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.F.o: - ${COMPILE.F} ${.IMPSRC} -.F.a: - ${COMPILE.F} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -.r: - ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.r.o: - ${COMPILE.r} ${.IMPSRC} -.r.a: - ${COMPILE.r} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -# Pascal -.p: - ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.p.o: - ${COMPILE.p} ${.IMPSRC} -.p.a: - ${COMPILE.p} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -# Assembly -.s: - ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.s.o: - ${COMPILE.s} -o ${.TARGET} ${.IMPSRC} -.s.a: - ${COMPILE.s} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o -.S: - ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} -.S.o: - ${COMPILE.S} ${.IMPSRC} -.S.a: - ${COMPILE.S} ${.IMPSRC} - ${AR} ${ARFLAGS} $@ $*.o - rm -f $*.o - -# Lex -.l: - ${LEX.l} ${.IMPSRC} - ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll - rm -f lex.yy.c -.l.c: - ${LEX.l} ${.IMPSRC} - mv lex.yy.c ${.TARGET} -.l.o: - ${LEX.l} ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} lex.yy.c - rm -f lex.yy.c - -# Yacc -.y: - ${YACC.y} ${.IMPSRC} - ${LINK.c} -o ${.TARGET} y.tab.c ${LDLIBS} - rm -f y.tab.c -.y.c: - ${YACC.y} ${.IMPSRC} - mv y.tab.c ${.TARGET} -.y.o: - ${YACC.y} ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} y.tab.c - rm -f y.tab.c - -# Shell -.sh: - rm -f ${.TARGET} - cp ${.IMPSRC} ${.TARGET} diff --git a/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk b/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk index bee99ea7861..b500f215cab 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk +++ b/pkgtools/bootstrap-mk-files/files/mods/Linux.bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: Linux.bsd.lib.mk,v 1.3 2008/03/13 17:28:23 joerg Exp $ +# $NetBSD: Linux.bsd.lib.mk,v 1.4 2015/08/31 09:03:19 jperkin Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .if !target(__initialized__) @@ -81,6 +81,8 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR} # Data-driven table using make variables to control how shared libraries # are built for different platforms and object formats. # OBJECT_FMT: currently either "ELF" or "a.out", from <bsd.own.mk> +# SHLIB_MAJOR, SHLIB_MINOR, SHLIB_TEENY: Major, minor, and teeny version +# numbers of shared library # SHLIB_SOVERSION: version number to be compiled into a shared library # via -soname. Usualy ${SHLIB_MAJOR} on ELF. # NetBSD/pmax used to use ${SHLIB_MAJOR}[.${SHLIB_MINOR} @@ -90,9 +92,11 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR} # SHLIB_LDSTARTFILE: support .o file, call C++ file-level constructors # SHLIB_LDENDFILE: support .o file, call C++ file-level destructors # FPICFLAGS: flags for ${FC} to compile .[fF] files to .so objects. -# CPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS} -# CPICFLAGS: flags for ${CC} to compile .[cC] files to .so objects. -# CAPICFLAGS flags for {$CC} to compiling .[Ss] files +# CPPPICFLAGS: flags for ${CPP} to preprocess .[sS] files for ${AS} +# CPICFLAGS: flags for ${CC} to compile .[cC] files to pic objects. +# CSHLIBFLAGS: flags for ${CC} to compile .[cC] files to .so objects. +# (usually includes ${CPICFLAGS}) +# CAPICFLAGS: flags for ${CC} to compiling .[Ss] files # (usually just ${CPPPICFLAGS} ${CPICFLAGS}) # APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects. @@ -388,8 +392,11 @@ lib${LIB}.so.${SHLIB_FULLVERSION}: ${SOLIB} ${DPADD} \ ${SHLIB_LDENDFILE} .endif .if ${OBJECT_FMT} == "ELF" +.if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \ + "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}" ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.${SHLIB_MAJOR}.tmp mv -f lib${LIB}.so.${SHLIB_MAJOR}.tmp lib${LIB}.so.${SHLIB_MAJOR} +.endif ln -sf lib${LIB}.so.${SHLIB_FULLVERSION} lib${LIB}.so.tmp mv -f lib${LIB}.so.tmp lib${LIB}.so .endif diff --git a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk index a8f9883faee..f7664a76985 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk +++ b/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk @@ -1,13 +1,13 @@ -# $NetBSD: Linux.sys.mk,v 1.5 2015/06/11 09:20:56 joerg Exp $ +# $NetBSD: Linux.sys.mk,v 1.6 2015/08/31 09:03:19 jperkin Exp $ # NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp # @(#)sys.mk 8.2 (Berkeley) 3/21/94 -unix?= We run Unix. +unix?= We run Unix OS?= Linux .SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h .SUFFIXES: .sh .m4 - + .LIBS: .a AR?= ar @@ -16,18 +16,34 @@ RANLIB?= ranlib AS?= as AFLAGS?= +.if ${MACHINE_ARCH} == "sparc64" +AFLAGS+= -Wa,-Av9a +.endif COMPILE.s?= ${CC} ${AFLAGS} -c LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} -CC?= gcc -DBG?= -O2 +CC?= cc +.if ${MACHINE_ARCH} == "alpha" || \ + ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm26" || \ + ${MACHINE_ARCH} == "arm32" || \ + ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_ARCH} == "m68k" || \ + ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ + ${MACHINE_ARCH} == "sparc" || \ + ${MACHINE_ARCH} == "vax" +DBG?= -O2 +.elif ${MACHINE_ARCH} == "x86_64" +DBG?= +.else +DBG?= -O +.endif CFLAGS?= ${DBG} COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -CXX?= g++ +CXX?= c++ CXXFLAGS?= ${CFLAGS} COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} @@ -38,8 +54,7 @@ COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} CPP?= cpp -NOLINT= 1 -CPPFLAGS?= +CPPFLAGS?= FC?= f77 FFLAGS?= -O diff --git a/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.own.mk.in b/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.own.mk.in index d737c9ca1df..7f322a35054 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.own.mk.in +++ b/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.own.mk.in @@ -1,4 +1,4 @@ -# $NetBSD: SunOS.bsd.own.mk.in,v 1.1 2013/09/12 10:56:36 jperkin Exp $ +# $NetBSD: SunOS.bsd.own.mk.in,v 1.2 2015/08/31 09:03:19 jperkin Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -118,6 +118,7 @@ NOPIC?=1 ${MACHINE_ARCH} == "i386" || \ ${MACHINE_ARCH} == "m68000" || \ ${MACHINE_ARCH} == "arm" || \ + !empty(MACHINE_ARCH:Mearm*) || \ ${MACHINE} == "next68k" || \ ${MACHINE} == "sun3" || \ ${MACHINE} == "mvme68k" || \ diff --git a/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk index d96eedb6d81..6f8a8ea1fe9 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk +++ b/pkgtools/bootstrap-mk-files/files/mods/SunOS.bsd.sys.mk @@ -1,4 +1,4 @@ -# $NetBSD: SunOS.bsd.sys.mk,v 1.3 2015/06/04 17:11:33 ryoon Exp $ +# $NetBSD: SunOS.bsd.sys.mk,v 1.4 2015/08/31 09:03:19 jperkin Exp $ # # Overrides used for NetBSD source tree builds. @@ -6,23 +6,20 @@ .if defined(WARNS) .if ${WARNS} > 0 -CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes +CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith # XXX Delete -Wuninitialized by default for now -- the compiler doesn't # XXX always get it right. CFLAGS+= -Wno-uninitialized .endif .if ${WARNS} > 1 -CFLAGS+= -Wreturn-type -Wpointer-arith +CFLAGS+=-Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings +CFLAGS+=-Wswitch -Wshadow .endif -.if ${WARNS} > 2 -CFLAGS+= -Wcast-qual -Wwrite-strings -.endif -CFLAGS+= -Wswitch -Wshadow .endif .if defined(WFORMAT) && defined(FORMAT_AUDIT) .if ${WFORMAT} > 1 -CFLAGS+= -Wnetbsd-format-audit -Wno-format-extra-args +CFLAGS+=-Wnetbsd-format-audit -Wno-format-extra-args .endif .endif @@ -36,6 +33,10 @@ CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include LINTFLAGS+= -d ${DESTDIR}/usr/include .endif +.if defined(AUDIT) +CPPFLAGS+= -D__AUDIT__ +.endif + .if defined(MKSOFTFLOAT) && (${MKSOFTFLOAT} != "no") COPTS+= -msoft-float FOPTS+= -msoft-float @@ -43,10 +44,6 @@ FOPTS+= -msoft-float .endif # gcc -.if defined(AUDIT) -CPPFLAGS+= -D__AUDIT__ -.endif - # Helpers for cross-compiling HOST_CC?= cc HOST_CFLAGS?= -O diff --git a/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk index 8d1942c585d..99e4f7b10fb 100644 --- a/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk +++ b/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk @@ -1,13 +1,13 @@ -# $NetBSD: SunOS.sys.mk,v 1.6 2013/08/30 14:47:29 jperkin Exp $ +# $NetBSD: SunOS.sys.mk,v 1.7 2015/08/31 09:03:19 jperkin Exp $ # NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp # @(#)sys.mk 8.2 (Berkeley) 3/21/94 -unix?= We run Unix. -OS?= SunOS.5 +unix?= We run Unix +OS?= SunOS .SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h .SUFFIXES: .sh .m4 - + .LIBS: .a AR?= ar @@ -16,6 +16,9 @@ RANLIB?= ranlib AS?= as AFLAGS?= +.if ${MACHINE_ARCH} == "sparc64" +AFLAGS+= -Wa,-Av9a +.endif COMPILE.s?= ${CC} ${AFLAGS} -c LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} COMPILE.S?= ${AS} ${AFLAGS} ${CPPFLAGS} -P @@ -23,9 +26,20 @@ LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} # Unless told otherwise, assume GNU CC CC?= gcc - -DBG?= -O2 - +.if ${MACHINE_ARCH} == "alpha" || \ + ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm26" || \ + ${MACHINE_ARCH} == "arm32" || \ + ${MACHINE_ARCH} == "i386" || \ + ${MACHINE_ARCH} == "m68k" || \ + ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \ + ${MACHINE_ARCH} == "sparc" || \ + ${MACHINE_ARCH} == "vax" +DBG?= -O2 +.elif ${MACHINE_ARCH} == "x86_64" +DBG?= +.else +DBG?= -O +.endif CFLAGS?= ${DBG} COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} @@ -47,13 +61,7 @@ CPP?= cpp .else CPP?= ${CC} -E .endif -.if defined(NETBSD_COMPATIBLE) -CPPFLAGS?= -I${BSDDIR}/include -D__EXTENSIONS__ -D_XPG4_2 -DSUNOS_5 -HOST_CPPFLAGS?= ${CPPFLAGS} -NOLINT=1 -.else CPPFLAGS?= -.endif FC?= f77 FFLAGS?= -O |