Make 'build.sh tools' work with the Sun Studio compiler, although bugs in
some of the generated tools still prevent building a full release using them.
This commit is contained in:
parent
2c266c8a4c
commit
7ce9d1c8ea
10
build.sh
10
build.sh
|
@ -1,5 +1,5 @@
|
|||
#! /usr/bin/env sh
|
||||
# $NetBSD: build.sh,v 1.201 2009/02/21 22:04:35 plunky Exp $
|
||||
# $NetBSD: build.sh,v 1.202 2009/02/24 22:25:24 sketch Exp $
|
||||
#
|
||||
# Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -172,6 +172,8 @@ initdefaults()
|
|||
uname_m=$(uname -m 2>/dev/null)
|
||||
uname_p=$(uname -p 2>/dev/null || uname -m 2>/dev/null)
|
||||
|
||||
id_u=$(id -u 2>/dev/null || /usr/xpg4/bin/id -u 2>/dev/null)
|
||||
|
||||
# If $PWD is a valid name of the current directory, POSIX mandates
|
||||
# that pwd return it by default which causes problems in the
|
||||
# presence of symlinks. Unsetting PWD is simpler than changing
|
||||
|
@ -1107,7 +1109,7 @@ validatemakeparams()
|
|||
fi
|
||||
if ${do_build} || ${do_distribution} || ${do_release}; then
|
||||
if ! ${do_expertmode} && \
|
||||
[ "$(id -u 2>/dev/null)" -ne 0 ] && \
|
||||
[ "$id_u" -ne 0 ] && \
|
||||
[ "${MKUNPRIVED}" = "no" ] ; then
|
||||
bomb "-U or -E must be set for build as an unprivileged user."
|
||||
fi
|
||||
|
@ -1118,7 +1120,7 @@ validatemakeparams()
|
|||
|
||||
# Install as non-root is a bad idea.
|
||||
#
|
||||
if ${do_install} && [ "$(id -u 2>/dev/null)" -ne 0 ] ; then
|
||||
if ${do_install} && [ "$id_u" -ne 0 ] ; then
|
||||
if ${do_expertmode}; then
|
||||
warning "Will install as an unprivileged user."
|
||||
else
|
||||
|
@ -1202,7 +1204,7 @@ createmakewrapper()
|
|||
eval cat <<EOF ${makewrapout}
|
||||
#! ${HOST_SH}
|
||||
# Set proper variables to allow easy "make" building of a NetBSD subtree.
|
||||
# Generated from: \$NetBSD: build.sh,v 1.201 2009/02/21 22:04:35 plunky Exp $
|
||||
# Generated from: \$NetBSD: build.sh,v 1.202 2009/02/24 22:25:24 sketch Exp $
|
||||
# with these arguments: ${_args}
|
||||
#
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ typedef long int64_t;
|
|||
AC_MSG_CHECKING(for gcc compiler warnings)
|
||||
AC_ARG_ENABLE(warnings,
|
||||
[ --disable-warnings disable compiler warnings],
|
||||
[if test "${enableval}" = no -o $GCC = no; then
|
||||
[if test "${enableval}" = no -o "$GCC" = no; then
|
||||
AC_MSG_RESULT(no)
|
||||
WARNINGS=
|
||||
else
|
||||
|
@ -124,7 +124,7 @@ else
|
|||
-Wsign-compare -Wreturn-type -Wswitch -Wshadow \
|
||||
-Wcast-qual -Wwrite-strings -Wextra -Wunused-parameter"
|
||||
fi], [
|
||||
if test $GCC = no; then
|
||||
if test "$GCC" = no; then
|
||||
WARNINGS=
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_defs.h,v 1.71 2009/02/03 05:18:42 dbj Exp $ */
|
||||
/* $NetBSD: compat_defs.h,v 1.72 2009/02/24 22:25:24 sketch Exp $ */
|
||||
|
||||
#ifndef __NETBSD_COMPAT_DEFS_H__
|
||||
#define __NETBSD_COMPAT_DEFS_H__
|
||||
|
@ -101,6 +101,8 @@ struct group;
|
|||
#if !defined(__packed)
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
#define __packed __attribute__((__packed__))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define __packed __attribute__((__packed__))
|
||||
#else
|
||||
#define __packed error: no __packed for this compiler
|
||||
#endif
|
||||
|
@ -232,6 +234,7 @@ void err(int, const char *, ...);
|
|||
void errx(int, const char *, ...);
|
||||
void warn(const char *, ...);
|
||||
void warnx(const char *, ...);
|
||||
void vwarnx(const char *, va_list);
|
||||
#endif
|
||||
|
||||
#if !HAVE_ESETFUNC
|
||||
|
@ -501,6 +504,10 @@ void *setmode(const char *);
|
|||
|
||||
/* Some definitions not available on all systems. */
|
||||
|
||||
#ifndef __inline
|
||||
#define __inline inline
|
||||
#endif
|
||||
|
||||
/* <errno.h> */
|
||||
|
||||
#ifndef EFTYPE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pwd_mkdb.c,v 1.37 2009/02/02 04:24:18 uebayasi Exp $ */
|
||||
/* $NetBSD: pwd_mkdb.c,v 1.38 2009/02/24 22:25:24 sketch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -91,7 +91,7 @@ __COPYRIGHT("@(#) Copyright (c) 2000, 2009\
|
|||
Copyright (c) 1991, 1993, 1994\
|
||||
The Regents of the University of California. All rights reserved.");
|
||||
__SCCSID("from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94");
|
||||
__RCSID("$NetBSD: pwd_mkdb.c,v 1.37 2009/02/02 04:24:18 uebayasi Exp $");
|
||||
__RCSID("$NetBSD: pwd_mkdb.c,v 1.38 2009/02/24 22:25:24 sketch Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#if HAVE_NBTOOL_CONFIG_H
|
||||
|
@ -195,7 +195,7 @@ static __inline uint64_t swap64(uint64_t sw) {
|
|||
#define SWAP(sw) \
|
||||
((sizeof(sw) == 2 ? (typeof(sw))swap16((uint16_t)sw) : \
|
||||
(sizeof(sw) == 4 ? (typeof(sw))swap32((uint32_t)sw) : \
|
||||
(sizeof(sw) == 8 ? (typeof(sw))swap64((uint64_t)sw) : abort(), 0))))
|
||||
(sizeof(sw) == 8 ? (typeof(sw))swap64((uint64_t)sw) : (abort(), 0)))))
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
Loading…
Reference in New Issue