pkgsrc/mk/defs.NetBSD.mk

134 lines
3.6 KiB
Makefile
Raw Normal View History

# $NetBSD: defs.NetBSD.mk,v 1.28 2002/09/04 14:47:33 agc Exp $
#
# Variable definitions for the NetBSD operating system.
AWK?= /usr/bin/awk
BASENAME?= /usr/bin/basename
CAT?= /bin/cat
CHMOD?= /bin/chmod
CHOWN?= /usr/sbin/chown
CHGRP?= /usr/bin/chgrp
CMP?= /usr/bin/cmp
CP?= /bin/cp
CUT?= /usr/bin/cut
DC?= /usr/bin/dc
DIRNAME?= /usr/bin/dirname
ECHO?= echo # Shell builtin
EGREP?= /usr/bin/egrep
FALSE?= false # Shell builtin
FILE_CMD?= /usr/bin/file
FIND?= /usr/bin/find
GMAKE?= ${LOCALBASE}/bin/gmake
GREP?= /usr/bin/grep
GTAR?= /usr/bin/tar
GUNZIP_CMD?= /usr/bin/gunzip -f
GZCAT?= /usr/bin/gzcat
GZIP?= -9
GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
HEAD?= /usr/bin/head
ID?= /usr/bin/id
LDCONFIG?= /sbin/ldconfig
LN?= /bin/ln
LS?= /bin/ls
MKDIR?= /bin/mkdir -p
MTREE?= /usr/sbin/mtree
MV?= /bin/mv
PATCH?= /usr/bin/patch
PAX?= /bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /bin/ps
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
SETENV?= /usr/bin/env
SH?= /bin/sh
SHLOCK= /usr/bin/shlock
SORT?= /usr/bin/sort
SU?= /usr/bin/su
TAIL?= /usr/bin/tail
TEST?= test # Shell builtin
TOUCH?= /usr/bin/touch
TR?= /usr/bin/tr
TRUE?= true # Shell builtin
TYPE?= type # Shell builtin
WC?= /usr/bin/wc
XARGS?= /usr/bin/xargs
.if exists(/usr/sbin/user)
USERADD?= /usr/sbin/useradd
GROUPADD?= /usr/sbin/groupadd
.else
USERADD?= ${LOCALBASE}/sbin/useradd
GROUPADD?= ${LOCALBASE}/sbin/groupadd
.if defined(USE_USERADD) || defined(USE_GROUPADD)
DEPENDS+= user>=20000313:../../sysutils/user
.endif
.endif
CPP_PRECOMP_FLAGS?= # unset
DEF_UMASK?= 0022
.if ${OBJECT_FMT} == "ELF"
EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table
.else
EXPORT_SYMBOLS_LDFLAGS?=-Wl,--export-dynamic
.endif
MOTIF_TYPE_DEFAULT?= openmotif # default 2.0 compatible libs type
MOTIF12_TYPE_DEFAULT?= lesstif12 # default 1.2 compatible libs type
NOLOGIN?= /sbin/nologin
PKG_TOOLS_BIN?= /usr/sbin
ROOT_CMD?= ${SU} - root -c
ROOT_USER?= root
ROOT_GROUP?= wheel
ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d`
ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m`
_DO_LIBINTL_CHECKS= yes # perform checks for valid libintl
_DO_SHLIB_CHECKS= yes # fixup PLIST for shared libs/run ldconfig
_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake
_OPSYS_HAS_GMAKE= no # GNU make is not standard
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
_PREFORMATTED_MAN_DIR= cat # directory where catman pages are
_USE_RPATH= yes # add rpath to LDFLAGS
.if !defined(DEBUG_FLAGS)
_STRIPFLAG_CC?= -s # cc(1) option to strip
_STRIPFLAG_INSTALL?= -s # install(1) option to strip
.endif
.if (${MACHINE_ARCH} == alpha)
DEFAULT_SERIAL_DEVICE?= /dev/ttyC0
SERIAL_DEVICES?= /dev/ttyC0 \
/dev/ttyC1
.elif (${MACHINE_ARCH} == "i386")
DEFAULT_SERIAL_DEVICE?= /dev/tty00
SERIAL_DEVICES?= /dev/tty00 \
/dev/tty01
.elif (${MACHINE_ARCH} == m68k)
DEFAULT_SERIAL_DEVICE?= /dev/tty00
SERIAL_DEVICES?= /dev/tty00 \
/dev/tty01
.elif (${MACHINE_ARCH} == mipsel)
DEFAULT_SERIAL_DEVICE?= /dev/ttyC0
SERIAL_DEVICES?= /dev/ttyC0 \
/dev/ttyC1
.elif (${MACHINE_ARCH} == "sparc")
DEFAULT_SERIAL_DEVICE?= /dev/ttya
SERIAL_DEVICES?= /dev/ttya \
/dev/ttyb
.else
DEFAULT_SERIAL_DEVICE?= /dev/null
SERIAL_DEVICES?= /dev/null
.endif
For NetBSD/alpha versions >= 1.5V add -mieee to both CFLAGS and FFLAGS. This will pass -mieee to those package which obey CFLAGS and FFLAGS. paraphrasing an email from Ross: The executive summary is: if i386 uses it (and it does) then alpha should also, or some programs will SIGFPE out on alpha when they don't on i386. If anyone asks, the details are as follows: The actual effect of -mieee is to put a software completion code bit into every floating point instruction, and to put trap barrier instructions in the code as necessary to ensure that traps are delivered before branches or other instructions make it impossible to trace backwards to the trapping op. The code bits have little effect on the hardware, mainly what happens is that when the hardware and palcode deliver a trap, they tell the trap handler whether the faulting op had a completion code. If it did, the kernel is suppose to trace backwards, find the op, and interpret it in SW, doing all the wacky ieee stuff that most chips don't do, stuff like denormal arithmetic and the generation of magic values (infinity, NaN) and the sticky flags. We do all that now except for a couple of truly obscure things that SoftFloat didn't support and which I haven't yet added. (And these are things that happen ONLY when you are taking overflow and underflow traps, which no one has every really done AFAICT. If you have the default behavior of gradual underflow and nontrapping infinity generation, we do everything.) This brings up the question of -mieee libraries, but that's not a pkgsrc problem. (Except to the extent that I recommend that libraries from pkgsrc, like everything else, also be compiled with -mieee. And in the case of libraries, it might be worth individually modifying the Makefile for the "not easy" case.)
2002-01-24 15:58:07 +01:00
# Add -mieee to CFLAGS and FFLAGS for NetBSD->=1.5V-alpha
.for __tmp__ in 1.5[V-Z] 1.5[A-Z][A-Z]* 1.[6-9]* [2-9].*
. if ${MACHINE_PLATFORM:MNetBSD-${__tmp__}-alpha} != ""
CFLAGS+= -mieee
FFLAGS+= -mieee
. endif # MACHINE_PLATFORM
.endfor # __tmp__