Thanks for the great utility!

I'm using powertop on a non-Intel target platform, and needed
to cross-compile for my board.  I found instructions for this
by Googling (this list), but I thought it might be handy
to document this and also support the use of the CROSS_COMPILE
environment variable (which is the same as what the kernel uses
for this).

Here's a patch.  Use, or not, at your discretion.
 -- Tim


Signed-off-by Tim Bird <[EMAIL PROTECTED]>

-----
diff -pu -pruN powertop-1.8.orig/Makefile powertop-1.8/Makefile
--- powertop-1.8.orig/Makefile  2007-08-19 10:43:08.000000000 -0700
+++ powertop-1.8/Makefile       2007-10-24 13:31:58.000000000 -0700
@@ -1,9 +1,21 @@
+# To cross-compile, specify CC on the make command line, like:
+#  $ make CC=arm-linux-unknown-gcc
+# Use the name of your cross-compiler for the value for CC.
+#
+# Or, you can set CROSS_COMPILE in your environment like so:
+#  $ export CROSS_COMPILE=arm-linux-unknown-
+#  $ make
+
 BINDIR=/usr/bin
 LOCALESDIR=/usr/share/locale
 MANDIR=/usr/share/man/man1
 WARNFLAGS=-Wall  -W -Wshadow
 CFLAGS?=-Os -g ${WARNFLAGS}
+#ifeq "$(origin CROSS_COMPILE)" "environment":
+CC=${CROSS_COMPILE}gcc
+#else
 CC?=gcc
+#endif


 #

_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to