Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sébastien Szymanski and committed by
Shuah Khan
a73f6e2f 828f369d

+8 -6
+8 -6
tools/power/cpupower/Makefile
··· 18 18 $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 19 19 endif 20 20 21 - include ../../scripts/Makefile.arch 22 21 23 22 # --- CONFIGURATION BEGIN --- 24 23 ··· 68 69 sbindir ?= /usr/sbin 69 70 mandir ?= /usr/man 70 71 includedir ?= /usr/include 71 - ifeq ($(IS_64_BIT), 1) 72 - libdir ?= /usr/lib64 73 - else 74 - libdir ?= /usr/lib 75 - endif 76 72 localedir ?= /usr/share/locale 77 73 docdir ?= /usr/share/doc/packages/cpupower 78 74 confdir ?= /etc/ ··· 94 100 HOSTCC = gcc 95 101 MKDIR = mkdir 96 102 103 + # 64bit library detection 104 + include ../../scripts/Makefile.arch 105 + 106 + ifeq ($(IS_64_BIT), 1) 107 + libdir ?= /usr/lib64 108 + else 109 + libdir ?= /usr/lib 110 + endif 97 111 98 112 # Now we set up the build system 99 113 #