Commit a73f6e2f authored by Sébastien Szymanski's avatar Sébastien Szymanski Committed by Shuah Khan

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: default avatarSébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 828f369d
...@@ -18,7 +18,6 @@ OUTDIR := $(shell cd $(OUTPUT) && pwd) ...@@ -18,7 +18,6 @@ OUTDIR := $(shell cd $(OUTPUT) && pwd)
$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) $(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
endif endif
include ../../scripts/Makefile.arch
# --- CONFIGURATION BEGIN --- # --- CONFIGURATION BEGIN ---
...@@ -69,11 +68,6 @@ bindir ?= /usr/bin ...@@ -69,11 +68,6 @@ bindir ?= /usr/bin
sbindir ?= /usr/sbin sbindir ?= /usr/sbin
mandir ?= /usr/man mandir ?= /usr/man
includedir ?= /usr/include includedir ?= /usr/include
ifeq ($(IS_64_BIT), 1)
libdir ?= /usr/lib64
else
libdir ?= /usr/lib
endif
localedir ?= /usr/share/locale localedir ?= /usr/share/locale
docdir ?= /usr/share/doc/packages/cpupower docdir ?= /usr/share/doc/packages/cpupower
confdir ?= /etc/ confdir ?= /etc/
...@@ -100,6 +94,14 @@ RANLIB = $(CROSS)ranlib ...@@ -100,6 +94,14 @@ RANLIB = $(CROSS)ranlib
HOSTCC = gcc HOSTCC = gcc
MKDIR = mkdir 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 # Now we set up the build system
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment