summaryrefslogtreecommitdiffstats
path: root/lib/libelf/libelf_fsize.m4
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2006-12-18 05:40:01 +0000
committerjkoshy <jkoshy@FreeBSD.org>2006-12-18 05:40:01 +0000
commit25bc13b7367e813ef4d53432a4e4383099e93ba0 (patch)
tree5ded8ca022a55b5ca759f3341c1e05289fb61a08 /lib/libelf/libelf_fsize.m4
parentfdbeae7cd48d220f22f51d00a1b3c7c6525973ee (diff)
downloadFreeBSD-src-25bc13b7367e813ef4d53432a4e4383099e93ba0.zip
FreeBSD-src-25bc13b7367e813ef4d53432a4e4383099e93ba0.tar.gz
Use <osreldate.h> rather than the OS version reported by the kernel
to determine which Elf Types are to be handled. Change the M4 templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair around the generated code for each ELF data type, where `NNN' is the OS version where the ELF type was added to the source tree. This change allows cross-builds of old sources on newer FreeBSD systems to work correctly. Problem reported by: ru
Diffstat (limited to 'lib/libelf/libelf_fsize.m4')
-rw-r--r--lib/libelf/libelf_fsize.m413
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/libelf/libelf_fsize.m4 b/lib/libelf/libelf_fsize.m4
index 93d1d92..d9b11ec 100644
--- a/lib/libelf/libelf_fsize.m4
+++ b/lib/libelf/libelf_fsize.m4
@@ -27,6 +27,7 @@
*/
#include <libelf.h>
+#include <osreldate.h>
#include "_libelf.h"
@@ -54,14 +55,6 @@ define(`MOVEP_SIZE', 0)
define(`XWORD_SIZE32', 0)
define(`SXWORD_SIZE32', 0)
-ifelse(eval(OSRELDATE < 700009),1,
- `define(`CAP_SIZE', 0)
- define(`LWORD_SIZE', 0)
- define(`MOVE_SIZE', 0)
- define(`SYMINFO_SIZE', 0)
- define(`VDEF_SIZE', 0)
- define(`VNEED_SIZE', 0)',`')
-
/*
* FSZ{32,64} define the sizes of 32 and 64 bit file structures respectively.
*/
@@ -122,7 +115,9 @@ DEFINE_ELF_FSIZES(ELF_TYPE_LIST)
DEFINE_ELF_FSIZE(`IDENT',`') # `IDENT' is a pseudo type
define(`FSIZE',
- `[ELF_T_$1] = { .fsz32 = $1_SIZE32, .fsz64 = $1_SIZE64 },')
+ `#if __FreeBSD_version >= $3
+ [ELF_T_$1] = { .fsz32 = $1_SIZE32, .fsz64 = $1_SIZE64 },
+#endif')
define(`FSIZES',
`ifelse($#,1,`',
`FSIZE($1)
OpenPOWER on IntegriCloud