summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIdwer Vollering <vidwer@gmail.com>2020-08-28 23:16:28 +0200
committerCommit Bot <commit-bot@chromium.org>2020-09-11 01:29:19 +0000
commitade6151a678c59e270c89bcca37f61cfdd41700d (patch)
tree446f2f41581df2f1939abaa544b4ead71a36417a /Makefile
parent176e01ded3bcefb6cb8baa984a158d42562bb1e9 (diff)
downloadvboot-ade6151a678c59e270c89bcca37f61cfdd41700d.tar.gz
portability fixes: support building vboot on FreeBSD
Built on FreeBSD 12.1-RELEASE, 13-CURRENT, using gcc9 installed from packages. Change-Id: Ifa8bb343c7e916c1b545cf6c1e4bd0a18ea391cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2382790 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f77e79e9..637ca873 100644
--- a/Makefile
+++ b/Makefile
@@ -325,7 +325,7 @@ export BUILD_RUN
.PHONY: all
all: fwlib futil utillib hostlib cgpt tlcl \
$(if ${SDK_BUILD},utils_sdk,utils_board) \
- $(if $(filter x86_64,${ARCH}),fuzzers) \
+ $(if $(filter x86_64,${ARCH}),$(if $(filter clang,${CC}),fuzzers)) \
$(if ${COV},coverage)
##############################################################################
@@ -944,6 +944,8 @@ ${CGPT_WRAPPER}: ${CGPT_WRAPPER_OBJS} ${UTILLIB}
.PHONY: cgpt
cgpt: ${CGPT} ${CGPT_WRAPPER}
+# on FreeBSD: install misc/e2fsprogs-libuuid from ports,
+# or e2fsprogs-libuuid from its binary package system.
${CGPT}: LDLIBS += -luuid
${CGPT}: ${CGPT_OBJS} ${UTILLIB}
@@ -1116,6 +1118,9 @@ ${UTIL_DEFAULTS}:
# Some utilities need external crypto functions
CRYPTO_LIBS := $(shell ${PKG_CONFIG} --libs libcrypto)
+ifeq ($(shell uname -s), FreeBSD)
+CRYPTO_LIBS += -lcrypto
+endif
${BUILD}/utility/dumpRSAPublicKey: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/utility/pad_digest_utility: LDLIBS += ${CRYPTO_LIBS}