diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2006-12-18 05:40:01 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2006-12-18 05:40:01 +0000 |
commit | 25bc13b7367e813ef4d53432a4e4383099e93ba0 (patch) | |
tree | 5ded8ca022a55b5ca759f3341c1e05289fb61a08 /lib/libelf/Makefile | |
parent | fdbeae7cd48d220f22f51d00a1b3c7c6525973ee (diff) | |
download | FreeBSD-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/Makefile')
-rw-r--r-- | lib/libelf/Makefile | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/libelf/Makefile b/lib/libelf/Makefile index 7a4a492..ae1ad42 100644 --- a/lib/libelf/Makefile +++ b/lib/libelf/Makefile @@ -24,16 +24,19 @@ SRCS= elf_begin.c \ elf_strptr.c \ elf_update.c \ elf_version.c \ + gelf_cap.c \ gelf_checksum.c \ - gelf_fsize.c \ - gelf_getclass.c \ gelf_dyn.c \ gelf_ehdr.c \ + gelf_getclass.c \ + gelf_fsize.c \ + gelf_move.c \ gelf_phdr.c \ gelf_rel.c \ gelf_rela.c \ gelf_shdr.c \ gelf_sym.c \ + gelf_syminfo.c \ gelf_symshndx.c \ gelf_xlate.c \ libelf.c \ @@ -53,16 +56,8 @@ GENSRCS= libelf_fsize.c libelf_msize.c libelf_convert.c CLEANFILES= ${GENSRCS} CFLAGS+= -I. -I${.CURDIR} -OSRELDATE!= sysctl -n kern.osreldate - SHLIB_MAJOR= 1 -.if ${OSRELDATE} > 700009 -SRCS+= gelf_cap.c \ - gelf_move.c \ - gelf_syminfo.c -.endif - WARNS?= 6 MAN= elf.3 \ @@ -162,4 +157,4 @@ libelf_msize.c: elf_types.m4 libelf_msize.m4 # Keep the .SUFFIXES line after the include of bsd.lib.mk .SUFFIXES: .m4 .c .m4.c: - m4 -D SRCDIR=${.CURDIR} -D OSRELDATE=${OSRELDATE} ${.IMPSRC} > ${.TARGET} + m4 -D SRCDIR=${.CURDIR} ${.IMPSRC} > ${.TARGET} |