From 6f1f2b19310499cfdbf475aa124c574cac1b096e Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 15 Jun 2018 16:48:09 +0000 Subject: [PATCH] Only build jevents if MK_PMC is yes and only for amd64 in libcompat. Sponsored by: Dell EMC --- Makefile.inc1 | 3 ++- Makefile.libcompat | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index af67bcb84304..18bd7ecd3ac2 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2033,7 +2033,8 @@ _tcsh=bin/csh _libmagic=lib/libmagic .endif -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" +.if ${MK_PMC} != "no" && \ + (${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386") _jevents=lib/libpmc/pmu-events .endif diff --git a/Makefile.libcompat b/Makefile.libcompat index 52928e87d296..f63567b3d6de 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -155,6 +155,11 @@ _LC_INCDIRS= \ lib/ncurses/ncursesw \ ${_LC_LIBDIRS.yes} +.if ${MK_PMC} != "no" && ${TARGET_ARCH} == "amd64" +_jevents= lib/libpmc/pmu-events +.endif + + # Shared logic build${libcompat}: .PHONY @echo @@ -192,7 +197,7 @@ build${libcompat}: .PHONY DIRPRFX=${_dir}/ ${_t} .endfor .endfor -.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic lib/libpmc/pmu-events +.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic ${_jevents} ${_+_}cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \