diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2017-03-03 01:56:55 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2017-03-03 01:56:55 +0000 |
commit | baf4abfc39b23cff5f51a217d67848605187f690 (patch) | |
tree | 8c31ab2452310d6587c36cc1203cd2d3c1039a10 /tools/build/cross-build | |
parent | 6d6e8a4a09747233468805ce373dc67ed37a8f49 (diff) | |
download | src-baf4abfc39b23cff5f51a217d67848605187f690.tar.gz src-baf4abfc39b23cff5f51a217d67848605187f690.zip |
Allow building mkimg as cross-tool
For linux the mmap offset must also be page aligned, and we
need to disable macros like __FBSDID()
Change the linux osdep_uuidgen() to use more portable gettimeofday().
Reviewed by: marcel
Notes
Notes:
svn path=/head/; revision=314577
Diffstat (limited to 'tools/build/cross-build')
-rw-r--r-- | tools/build/cross-build/mkimg/Makefile | 27 | ||||
-rw-r--r-- | tools/build/cross-build/mkimg/Makefile.depend | 11 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tools/build/cross-build/mkimg/Makefile b/tools/build/cross-build/mkimg/Makefile new file mode 100644 index 000000000000..932f6150f118 --- /dev/null +++ b/tools/build/cross-build/mkimg/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +# allow building mkimg as a host tool. + +MKIMG_SRC = ${SRCTOP}/usr.bin/mkimg +.PATH: ${MKIMG_SRC} + +.if ${.MAKE.OS} == "Linux" +WARNS= 0 + +CFLAGS+= \ + -D"__FBSDID(x)=" \ + -D_XOPEN_SOURCE -D_GNU_SOURCE + +.PATH: ${SRCTOP}/lib/libutil +SRCS+= expand_number.c + +.endif + +MK_STAGING=no +MK_TESTS= no + +.include <${MKIMG_SRC}/Makefile> + +.if ${.MAKE.OS} == "Linux" +LDADD+= -lbsd +.endif diff --git a/tools/build/cross-build/mkimg/Makefile.depend b/tools/build/cross-build/mkimg/Makefile.depend new file mode 100644 index 000000000000..f80275d86ab1 --- /dev/null +++ b/tools/build/cross-build/mkimg/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif |