From be9ab3e5db75a4cd423b71216e85cd6f5902c01e Mon Sep 17 00:00:00 2001 From: eeh Date: Fri, 3 May 2002 00:06:55 +0000 Subject: [PATCH] Provide _LP64 definition if we are generating LP64 binaries. --- sys/arch/alpha/conf/std.alpha | 3 ++- sys/arch/alpha/include/types.h | 5 ++++- sys/arch/sparc64/include/types.h | 5 ++++- sys/arch/x86_64/conf/std.x86_64 | 3 ++- sys/arch/x86_64/include/types.h | 5 ++++- sys/conf/files | 8 +++++++- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/sys/arch/alpha/conf/std.alpha b/sys/arch/alpha/conf/std.alpha index 1f1d8463d50c..d59fc1db1710 100644 --- a/sys/arch/alpha/conf/std.alpha +++ b/sys/arch/alpha/conf/std.alpha @@ -1,4 +1,4 @@ -# $NetBSD: std.alpha,v 1.19 2000/06/22 20:27:49 fvdl Exp $ +# $NetBSD: std.alpha,v 1.20 2002/05/03 00:06:55 eeh Exp $ # # Standard/required configuration info for NetBSD/alpha. @@ -10,3 +10,4 @@ machine alpha options EXEC_ECOFF # (native) ECOFF binary support options EXEC_ELF64 # (native) ELF64 binary support options EXEC_SCRIPT # shell script support +options _LP64 # Always define this since we're 64-bit. diff --git a/sys/arch/alpha/include/types.h b/sys/arch/alpha/include/types.h index 8ac19117344c..8145d6333d7f 100644 --- a/sys/arch/alpha/include/types.h +++ b/sys/arch/alpha/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.22 2002/02/28 03:17:24 simonb Exp $ */ +/* $NetBSD: types.h,v 1.23 2002/05/03 00:06:56 eeh Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -49,6 +49,9 @@ typedef struct label_t { /* NB: This should probably be if defined(_KERNEL) */ #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) +#ifndef _LP64 +#define _LP64 1 +#endif typedef unsigned long paddr_t; typedef unsigned long psize_t; typedef unsigned long vaddr_t; diff --git a/sys/arch/sparc64/include/types.h b/sys/arch/sparc64/include/types.h index 7ad1a68f9012..8beafb36506a 100644 --- a/sys/arch/sparc64/include/types.h +++ b/sys/arch/sparc64/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.19 2002/02/28 03:17:31 simonb Exp $ */ +/* $NetBSD: types.h,v 1.20 2002/05/03 00:06:56 eeh Exp $ */ /* * Copyright (c) 1992, 1993 @@ -79,6 +79,9 @@ typedef unsigned long int vaddr_t; typedef vaddr_t vsize_t; #ifdef SUN4U #ifdef __arch64__ +#ifndef _LP64 +#define _LP64 1 /* Should this be 64? */ +#endif typedef unsigned long int paddr_t; #else /* LONGLONG */ diff --git a/sys/arch/x86_64/conf/std.x86_64 b/sys/arch/x86_64/conf/std.x86_64 index 54e0654af8af..241f0d40345e 100644 --- a/sys/arch/x86_64/conf/std.x86_64 +++ b/sys/arch/x86_64/conf/std.x86_64 @@ -1,4 +1,4 @@ -# $NetBSD: std.x86_64,v 1.2 2001/11/20 12:56:43 lukem Exp $ +# $NetBSD: std.x86_64,v 1.3 2002/05/03 00:06:56 eeh Exp $ # # standard, required NetBSD/x86_64 'options' @@ -6,3 +6,4 @@ machine x86_64 options EXEC_ELF64 # exec ELF binaries options EXEC_SCRIPT # exec #! scripts +options _LP64 # This is a 64-bit architecture diff --git a/sys/arch/x86_64/include/types.h b/sys/arch/x86_64/include/types.h index a258feae14d4..21fa64164f76 100644 --- a/sys/arch/x86_64/include/types.h +++ b/sys/arch/x86_64/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.2 2002/02/28 03:17:32 simonb Exp $ */ +/* $NetBSD: types.h,v 1.3 2002/05/03 00:06:56 eeh Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -49,6 +49,9 @@ typedef struct label_t { /* NB: This should probably be if defined(_KERNEL) */ #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) +#ifndef _LP64 +#define _LP64 1 +#endif typedef unsigned long paddr_t; typedef unsigned long psize_t; typedef unsigned long vaddr_t; diff --git a/sys/conf/files b/sys/conf/files index 9a227e7dfddf..ab84bea716cf 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.524 2002/05/02 17:55:48 thorpej Exp $ +# $NetBSD: files,v 1.525 2002/05/03 00:06:56 eeh Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -41,6 +41,12 @@ defflag opt_execfmt.h EXEC_AOUT EXEC_COFF EXEC_ECOFF EXEC_ELF32 EXEC_ELF64 EXEC_MACHO EXEC_SCRIPT EXEC_ELF_NOTELESS +# DO NOT defflag the _LP64. There is no point. LP64 and ILP32 should +# be completely different object code formats and require a complete +# recompile anyway. +# +#no defflag _LP64 + # compatibility options # defflag COMPAT_FREEBSD