diff options
author | Sébastien Szymanski <sebastien.szymanski@armadeus.com> | 2019-06-07 17:02:55 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-08-29 17:50:54 +0200 |
commit | a73f6e2fbe8077811ea9546e0d44a7533111f0ba (patch) | |
tree | e0da297b30c352efb4e66eacd7161ac55a92909c /tools/power/cpupower/Makefile | |
parent | cpupower: Add missing newline at end of file (diff) | |
download | linux-a73f6e2fbe8077811ea9546e0d44a7533111f0ba.tar.xz linux-a73f6e2fbe8077811ea9546e0d44a7533111f0ba.zip |
tools/power/cpupower: fix 64bit detection when cross-compiling
When cross-compiling cpupower, 64bit detection is done with the host
compiler instead of the cross-compiler and libcpupower.so.0 ends up in
/usr/lib64 instead of /usr/lib for 32bit target. Fix this by moving
64bit detection after CC is defined.
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/power/cpupower/Makefile')
-rw-r--r-- | tools/power/cpupower/Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile index 9063fca480b3..c8622497ef23 100644 --- a/tools/power/cpupower/Makefile +++ b/tools/power/cpupower/Makefile @@ -18,7 +18,6 @@ OUTDIR := $(shell cd $(OUTPUT) && pwd) $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) endif -include ../../scripts/Makefile.arch # --- CONFIGURATION BEGIN --- @@ -69,11 +68,6 @@ bindir ?= /usr/bin sbindir ?= /usr/sbin mandir ?= /usr/man includedir ?= /usr/include -ifeq ($(IS_64_BIT), 1) -libdir ?= /usr/lib64 -else -libdir ?= /usr/lib -endif localedir ?= /usr/share/locale docdir ?= /usr/share/doc/packages/cpupower confdir ?= /etc/ @@ -100,6 +94,14 @@ RANLIB = $(CROSS)ranlib HOSTCC = gcc MKDIR = mkdir +# 64bit library detection +include ../../scripts/Makefile.arch + +ifeq ($(IS_64_BIT), 1) +libdir ?= /usr/lib64 +else +libdir ?= /usr/lib +endif # Now we set up the build system # |