From 7d1c2b74a03e621f235e2cf282bf724259f364c5 Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Thu, 31 May 2018 22:26:55 +0000 Subject: [PATCH] libpmc/pmu: enable for i386 as well --- Makefile.inc1 | 2 +- Makefile.libcompat | 2 +- lib/libpmc/Makefile | 8 ++++---- lib/libpmc/libpmc_pmu_util.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 0419a3cbafe..efc55be7cde 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2030,7 +2030,7 @@ _tcsh=bin/csh _libmagic=lib/libmagic .endif -.if ${TARGET_ARCH} == "amd64" +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _jevents=lib/libpmc/pmu-events .endif diff --git a/Makefile.libcompat b/Makefile.libcompat index 35d804e9f65..52928e87d29 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -192,7 +192,7 @@ build${libcompat}: .PHONY DIRPRFX=${_dir}/ ${_t} .endfor .endfor -.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic +.for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic lib/libpmc/pmu-events ${_+_}cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 6eb2ad6863d..d6e771a39f4 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -8,13 +8,13 @@ INCS= pmc.h pmclog.h CFLAGS+= -I${.CURDIR} -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" -.if ${MACHINE_CPUARCH} == "aarch64" +.if ${MACHINE_ARCH} == "aarch64" EVENT_ARCH="arm64" -.elif ${MACHINE_CPUARCH} == "amd64" +.elif ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" EVENT_ARCH="x86" -.elif ${MACHINE_CPUARCH} == "powerpc" +.elif ${MACHINE_ARCH} == "powerpc" EVENT_ARCH="powerpc" .endif diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 9165caaa285..30565e9177d 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -40,7 +40,7 @@ #include #include "pmu-events/pmu-events.h" -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) struct pmu_alias { const char *pa_alias; const char *pa_name; -- 2.45.0