From owner-svn-src-head@freebsd.org Fri Feb 23 04:04:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F433F24A7C; Fri, 23 Feb 2018 04:04:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 265FA6A7F7; Fri, 23 Feb 2018 04:04:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 215701175B; Fri, 23 Feb 2018 04:04:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1N44RLc053847; Fri, 23 Feb 2018 04:04:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1N44PiD053834; Fri, 23 Feb 2018 04:04:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201802230404.w1N44PiD053834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 23 Feb 2018 04:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329859 - in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys sy... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys sys/x86/include X-SVN-Commit-Revision: 329859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 04:04:27 -0000 Author: imp Date: Fri Feb 23 04:04:25 2018 New Revision: 329859 URL: https://svnweb.freebsd.org/changeset/base/329859 Log: Do not include float interfaces when using libsa. We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more accidental seepage. Modified: head/contrib/compiler-rt/lib/builtins/int_types.h head/include/time.h head/stand/defs.mk head/stand/lua.mk head/sys/arm/include/_types.h head/sys/arm64/include/_types.h head/sys/mips/include/_types.h head/sys/powerpc/include/_types.h head/sys/powerpc/include/pcb.h head/sys/riscv/include/_types.h head/sys/sparc64/include/_types.h head/sys/sys/_types.h head/sys/x86/include/_types.h Modified: head/contrib/compiler-rt/lib/builtins/int_types.h ============================================================================== --- head/contrib/compiler-rt/lib/builtins/int_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/contrib/compiler-rt/lib/builtins/int_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -114,6 +114,7 @@ static __inline tu_int make_tu(du_int h, du_int l) { #endif /* CRT_HAS_128BIT */ +#ifndef _STANDALONE typedef union { su_int u; @@ -125,6 +126,7 @@ typedef union udwords u; double f; } double_bits; +#endif typedef struct { @@ -137,6 +139,7 @@ typedef struct #endif /* _YUGA_LITTLE_ENDIAN */ } uqwords; +#ifndef _STANDALONE typedef union { uqwords u; @@ -159,6 +162,7 @@ typedef struct { long double real, imaginary; } Lcompl #define COMPLEX_REAL(x) (x).real #define COMPLEX_IMAGINARY(x) (x).imaginary +#endif #endif #endif /* INT_TYPES_H */ Modified: head/include/time.h ============================================================================== --- head/include/time.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/include/time.h Fri Feb 23 04:04:25 2018 (r329859) @@ -146,7 +146,9 @@ __BEGIN_DECLS char *asctime(const struct tm *); clock_t clock(void); char *ctime(const time_t *); +#ifndef _STANDALONE double difftime(time_t, time_t); +#endif /* XXX missing: getdate() */ struct tm *gmtime(const time_t *); struct tm *localtime(const time_t *); Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Fri Feb 23 04:04:18 2018 (r329858) +++ head/stand/defs.mk Fri Feb 23 04:04:25 2018 (r329859) @@ -51,6 +51,9 @@ CFLAGS+= -I${BOOTOBJ}/libsa .endif CFLAGS+= -I${SASRC} -D_STANDALONE CFLAGS+= -I${SYSDIR} +# Spike the floating point interfaces +CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=boaty-mcboatface + # GELI Support, with backward compat hooks (mostly) .if defined(HAVE_GELI) Modified: head/stand/lua.mk ============================================================================== --- head/stand/lua.mk Fri Feb 23 04:04:18 2018 (r329858) +++ head/stand/lua.mk Fri Feb 23 04:04:25 2018 (r329859) @@ -3,5 +3,4 @@ # Common flags to build lua related files CFLAGS+= -I${LUASRC} -I${LDRSRC} -I${LIBLUASRC} -# CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=poison-shake -D__OMIT_FLOAT CFLAGS+= -DLUA_FLOAT_TYPE=LUA_FLOAT_INT64 Modified: head/sys/arm/include/_types.h ============================================================================== --- head/sys/arm/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/arm/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -70,8 +70,10 @@ typedef unsigned long long __uint64_t; */ typedef __uint32_t __clock_t; /* clock()... */ typedef __int32_t __critical_t; +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif typedef __int32_t __intfptr_t; typedef __int64_t __intmax_t; typedef __int32_t __intptr_t; Modified: head/sys/arm64/include/_types.h ============================================================================== --- head/sys/arm64/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/arm64/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -56,8 +56,10 @@ typedef unsigned long __uint64_t; */ typedef __int32_t __clock_t; /* clock()... */ typedef __int64_t __critical_t; +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif typedef __int64_t __intfptr_t; typedef __int64_t __intmax_t; typedef __int64_t __intptr_t; Modified: head/sys/mips/include/_types.h ============================================================================== --- head/sys/mips/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/mips/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -75,8 +75,10 @@ typedef unsigned long long __uint64_t; * Standard type definitions. */ typedef __int32_t __clock_t; /* clock()... */ +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif #ifdef __mips_n64 typedef __int64_t __critical_t; typedef __int64_t __intfptr_t; Modified: head/sys/powerpc/include/_types.h ============================================================================== --- head/sys/powerpc/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/powerpc/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -74,8 +74,10 @@ typedef unsigned long long __uint64_t; * Standard type definitions. */ typedef __uint32_t __clock_t; /* clock()... */ +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif #ifdef __LP64__ typedef __int64_t __critical_t; typedef __int64_t __intfptr_t; Modified: head/sys/powerpc/include/pcb.h ============================================================================== --- head/sys/powerpc/include/pcb.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/powerpc/include/pcb.h Fri Feb 23 04:04:25 2018 (r329859) @@ -39,6 +39,7 @@ #include +#ifndef _STANDALONE struct pcb { register_t pcb_context[20]; /* non-volatile r14-r31 */ register_t pcb_cr; /* Condition register */ @@ -81,6 +82,7 @@ struct pcb { } booke; } pcb_cpu; }; +#endif #ifdef _KERNEL Modified: head/sys/riscv/include/_types.h ============================================================================== --- head/sys/riscv/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/riscv/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -56,8 +56,10 @@ typedef unsigned long __uint64_t; */ typedef __int32_t __clock_t; /* clock()... */ typedef __int64_t __critical_t; +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif typedef __int64_t __intfptr_t; typedef __int64_t __intmax_t; typedef __int64_t __intptr_t; Modified: head/sys/sparc64/include/_types.h ============================================================================== --- head/sys/sparc64/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/sparc64/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -58,8 +58,10 @@ typedef unsigned long __uint64_t; */ typedef __int32_t __clock_t; /* clock()... */ typedef __int64_t __critical_t; +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif typedef __int64_t __intfptr_t; typedef __int64_t __intmax_t; typedef __int64_t __intptr_t; Modified: head/sys/sys/_types.h ============================================================================== --- head/sys/sys/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/sys/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -104,7 +104,9 @@ typedef __uint_least32_t __char32_t; typedef struct { long long __max_align1 __aligned(_Alignof(long long)); +#ifndef _STANDALONE long double __max_align2 __aligned(_Alignof(long double)); +#endif } __max_align_t; typedef __uint64_t __dev_t; /* device number */ Modified: head/sys/x86/include/_types.h ============================================================================== --- head/sys/x86/include/_types.h Fri Feb 23 04:04:18 2018 (r329858) +++ head/sys/x86/include/_types.h Fri Feb 23 04:04:25 2018 (r329859) @@ -74,15 +74,19 @@ typedef unsigned long long __uint64_t; #ifdef __LP64__ typedef __int32_t __clock_t; /* clock()... */ typedef __int64_t __critical_t; +#ifndef _STANDALONE typedef double __double_t; typedef float __float_t; +#endif typedef __int64_t __intfptr_t; typedef __int64_t __intptr_t; #else typedef unsigned long __clock_t; typedef __int32_t __critical_t; +#ifndef _STANDALONE typedef long double __double_t; typedef long double __float_t; +#endif typedef __int32_t __intfptr_t; typedef __int32_t __intptr_t; #endif