Skip to contentSkip to conversation

Use CC, LD etc that comes from OE.

PATCH Superseded Martin Ertsaas 2 participants 2 messages Jul 25, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use CC, LD etc that comes from OE.

Problem with just setting CROSS, is that it will unset all the flags that OE sets in CC, like float-abi=hard.

---
 .../cpufrequtils/0001-dont-unset-cflags.patch      |   30 ++++++++++++++++++++
 .../cpufrequtils/cpufrequtils_008.bb               |    1 +
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch
meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch new file +30 -0
new file mode 100644
index 0000000..fb2f07f
@@ -0,0 +1,30 @@
+--- git.old/Makefile	2012-04-17 13:29:46.280435340 +0200
++++ git/Makefile	2012-04-17 13:31:13.664433470 +0200
+@@ -77,17 +77,7 @@ INSTALL_PROGRAM = ${INSTALL}
+ INSTALL_DATA  = ${INSTALL} -m 644
+ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+ 
+-# If you are running a cross compiler, you may want to set this
+-# to something more interesting, like "arm-linux-".  If you want
+-# to compile vs uClibc, that can be done here as well.
+-CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
+-CC = $(CROSS)gcc
+-LD = $(CROSS)gcc
+-AR = $(CROSS)ar
+-STRIP = $(CROSS)strip
+-RANLIB = $(CROSS)ranlib
+-HOSTCC = gcc
+-
++HOSTCC = $(BUILD_CC)
+ 
+ # Now we set up the build system
+ #
+@@ -95,7 +85,7 @@ HOSTCC = gcc
+ # set up PWD so that older versions of make will work with our build.
+ PWD = $(shell pwd)
+ 
+-export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS
++export CFLAGS LDFLAGS LIB_OBJS
+ 
+ # check if compiler option is supported
+ cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
meta-oe/recipes-support/cpufrequtils/cpufrequtils_008.bb +1 -0
index 0cc3725..a7a48a8 100644
@@ -9,6 +9,7 @@ SRCREV = "a2f0c39d5f21596bb9f5223e895c0ff210b265d0"
 # SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/cpufreq/cpufrequtils.git \
 
 SRC_URI = "git://github.com/emagii/cpufrequtils.git \
+           file://0001-dont-unset-cflags.patch \
           "
 
 CFLAGS_append_libc-uclibc = " ${@['-DNLS', '-UNLS']['${USE_NLS}' == 'no']} "
Signature · 1 line
1.7.8.6
#1 lore raw
Quoted 79 lines · Martin Ertsaas

Problem with just setting CROSS, is that it will unset all the flags that OE sets in CC, like float-abi=hard.

---
 .../cpufrequtils/0001-dont-unset-cflags.patch      |   30
++++++++++++++++++++
 .../cpufrequtils/cpufrequtils_008.bb               |    1 +
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644

meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch

So this on cpufrequtils. Please state it in your subject.

diff --git a/meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch b/meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch new file mode 100644
index 0000000..fb2f07f
--- /dev/null
+++
b/meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch

meta-oe/recipes-support/cpufrequtils/cpufrequtils/0001-dont-unset-cflags.patch new file +30 -0
@@ -0,0 +1,30 @@
+--- git.old/Makefile   2012-04-17 13:29:46.280435340 +0200
++++ git/Makefile       2012-04-17 13:31:13.664433470 +0200
+@@ -77,17 +77,7 @@ INSTALL_PROGRAM = ${INSTALL}
+ INSTALL_DATA  = ${INSTALL} -m 644
+ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+
+-# If you are running a cross compiler, you may want to set this
+-# to something more interesting, like "arm-linux-".  If you want
+-# to compile vs uClibc, that can be done here as well.
+-CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
+-CC = $(CROSS)gcc
+-LD = $(CROSS)gcc
+-AR = $(CROSS)ar
+-STRIP = $(CROSS)strip
+-RANLIB = $(CROSS)ranlib
+-HOSTCC = gcc
+-
++HOSTCC = $(BUILD_CC)
+
+ # Now we set up the build system
+ #
+@@ -95,7 +85,7 @@ HOSTCC = gcc
+ # set up PWD so that older versions of make will work with our build.
+ PWD = $(shell pwd)
+
+-export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS
++export CFLAGS LDFLAGS LIB_OBJS
+
+ # check if compiler option is supported
+ cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null >

/dev/null 2>&1; then echo "$(1)"; fi;}

(quoted diff) +0 -0

cpufrequtils_008.bb
index 0cc3725..a7a48a8 100644

meta-oe/recipes-support/cpufrequtils/cpufrequtils_008.bb +1 -0
@@ -9,6 +9,7 @@ SRCREV = "a2f0c39d5f21596bb9f5223e895c0ff210b265d0"
 # SRC_URI = "git://
 git.kernel.org/pub/scm/utils/kernel/cpufreq/cpufrequtils.git \
 
 SRC_URI = "git://github.com/emagii/cpufrequtils.git \
+           file://0001-dont-unset-cflags.patch \
           "
 

CFLAGS_append_libc-uclibc = " ${@['-DNLS', '-UNLS']['${USE_NLS}' ==
'no']} "
--
1.7.8.6

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel