svn commit: r234048 - projects/arm_eabi/lib/libelf

Andrew Turner andrew at FreeBSD.org
Mon Apr 9 01:37:58 UTC 2012


Author: andrew
Date: Mon Apr  9 01:37:57 2012
New Revision: 234048
URL: http://svn.freebsd.org/changeset/base/234048

Log:
  We only need a subset of the header files from sys. We can link to the
  three header files we need rather than everything under sys.
  
  This fixes an issue where, while bootstrapping, a header file in sys/
  includes a machine dependent header that has changed from the FreeBSD
  version we are bootstrapping from.

Modified:
  projects/arm_eabi/lib/libelf/Makefile

Modified: projects/arm_eabi/lib/libelf/Makefile
==============================================================================
--- projects/arm_eabi/lib/libelf/Makefile	Mon Apr  9 01:20:50 2012	(r234047)
+++ projects/arm_eabi/lib/libelf/Makefile	Mon Apr  9 01:37:57 2012	(r234048)
@@ -55,9 +55,23 @@ SRCS=	elf_begin.c						\
 	${GENSRCS}
 INCS=	libelf.h gelf.h
 
+#
+# We need to link against the correct version of these files. One
+# solution is to include ../../sys in the include path. This causes
+# problems when a header file in sys depends on a file in another
+# part of the tree, e.g. a machine dependent header.
+#
+SRCS+=	sys/elf32.h sys/elf64.h sys/elf_common.h
+
 GENSRCS=	libelf_fsize.c libelf_msize.c libelf_convert.c
 CLEANFILES=	${GENSRCS}
-CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/../../sys
+CFLAGS+=	-I${.CURDIR} -I.
+
+sys/elf32.h sys/elf64.h sys/elf_common.h: sys
+	ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
+
+sys:
+	mkdir -p ${.OBJDIR}/sys
 
 SHLIB_MAJOR=	1
 


More information about the svn-src-projects mailing list