Patchwork [2/7] ed: Fix EXTRA_OECONF to ensure right compiler is found

login
register
mail settings
Submitter Saul Wold
Date Dec. 15, 2011, 1:50 a.m.
Message ID <7645ba6589957af6afa3fbe8766fb1ca6f1b004f.1323911699.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/16957/
State Accepted
Commit b23ab297906d7241d737f7c5e81c674deca45e32
Headers show

Comments

Saul Wold - Dec. 15, 2011, 1:50 a.m.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-extended/ed/ed_0.5.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Khem Raj - Dec. 15, 2011, 6:56 a.m.
On Wed, Dec 14, 2011 at 5:50 PM, Saul Wold <sgw@linux.intel.com> wrote:
>
> +EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
> +

hmm why doesnt it pick it from environment in configure ?
Saul Wold - Dec. 15, 2011, 8:37 a.m.
On 12/14/2011 10:56 PM, Khem Raj wrote:
> On Wed, Dec 14, 2011 at 5:50 PM, Saul Wold<sgw@linux.intel.com>  wrote:
>>
>> +EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
>> +
>
> hmm why doesnt it pick it from environment in configure ?
>
That's a really good question!  But it does not seem to, when I do the 
build with non-gplv3, it gets CC=/usr/bin/gcc!  So clearly it's not 
getting the environment, otherwise I would not have made this patch.

This is an old-school configure script.

Sau!

> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Saul Wold - Dec. 15, 2011, 7:23 p.m.
On 12/15/2011 12:37 AM, Saul Wold wrote:
> On 12/14/2011 10:56 PM, Khem Raj wrote:
>> On Wed, Dec 14, 2011 at 5:50 PM, Saul Wold<sgw@linux.intel.com> wrote:
>>>
>>> +EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}'
>>> 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
>>> +
>>
>> hmm why doesnt it pick it from environment in configure ?
>>
> That's a really good question! But it does not seem to, when I do the
> build with non-gplv3, it gets CC=/usr/bin/gcc! So clearly it's not
> getting the environment, otherwise I would not have made this patch.
>
> This is an old-school configure script.
>
Just a further explanation of this comment, the configure script in ed 
is a very old script, not autotools based at all.  It hard codes the 
CC="" in the script so the environment is not picked up correct, but it 
does read those properly from the command line.

Sau!

> Sau!
>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb
index 205822f..d251e4e 100644
--- a/meta/recipes-extended/ed/ed_0.5.bb
+++ b/meta/recipes-extended/ed/ed_0.5.bb
@@ -5,7 +5,7 @@  LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \
                     file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e"
 
-PR = "r1"
+PR = "r2"
 SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/ed/ed-${PV}.tar.bz2"
 
 SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632"
@@ -13,6 +13,9 @@  SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056f
 
 inherit autotools
 
+EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
+
 CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
 CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
 
+