Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
@ 2012-03-20  0:22 Denys Dmytriyenko
  2012-03-20 15:01 ` Darren Hart
  0 siblings, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2012-03-20  0:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Replace dependency on eglibc with virtual/libc
Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta/recipes-rt/rt-tests/rt-tests_0.83.bb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
index 6425027..3755c79 100644
--- a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
+++ b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "Real-Time preemption testcases"
 HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
 SECTION = "tests"
-DEPENDS = "linux-libc-headers eglibc"
+DEPENDS = "linux-libc-headers virtual/libc"
 LICENSE = "GPLv2 & GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=ce162fe491d19d2ec67dff6dbc938d50 \
@@ -11,13 +11,13 @@ SRCREV = "5f1e84f8b015df3ff950056494134eca3f640d70"
 
 # git -> 0.83 needs a PE bump
 PE = "1"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "git://github.com/clrkwllms/rt-tests.git"
 
 S = "${WORKDIR}/git"
 
-CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli ${LDFLAGS}"
+TARGET_CC_ARCH += "${LDFLAGS}"
 
 # calling 'uname -m' is broken on crossbuilds
 EXTRA_OEMAKE = "NUMA=0"
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20  0:22 [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing Denys Dmytriyenko
@ 2012-03-20 15:01 ` Darren Hart
  2012-03-20 15:11   ` Koen Kooi
  2012-03-20 15:28   ` Denys Dmytriyenko
  0 siblings, 2 replies; 11+ messages in thread
From: Darren Hart @ 2012-03-20 15:01 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Denys Dmytriyenko



On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> Replace dependency on eglibc with virtual/libc
> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
> 
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

Thanks Denys,

Looking through the rt-tests sources I don't see TARGET_CC_ARCH
anywhere. Have you confirmed that changes made there make their way into
the actual build?

What was the problem you ran into?

--
Darren

> ---
>  meta/recipes-rt/rt-tests/rt-tests_0.83.bb |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
> index 6425027..3755c79 100644
> --- a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
> +++ b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
> @@ -1,7 +1,7 @@
>  DESCRIPTION = "Real-Time preemption testcases"
>  HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
>  SECTION = "tests"
> -DEPENDS = "linux-libc-headers eglibc"
> +DEPENDS = "linux-libc-headers virtual/libc"
>  LICENSE = "GPLv2 & GPLv2+"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
>                      file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=ce162fe491d19d2ec67dff6dbc938d50 \
> @@ -11,13 +11,13 @@ SRCREV = "5f1e84f8b015df3ff950056494134eca3f640d70"
>  
>  # git -> 0.83 needs a PE bump
>  PE = "1"
> -PR = "r1"
> +PR = "r2"
>  
>  SRC_URI = "git://github.com/clrkwllms/rt-tests.git"
>  
>  S = "${WORKDIR}/git"
>  
> -CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli ${LDFLAGS}"
> +TARGET_CC_ARCH += "${LDFLAGS}"
>  
>  # calling 'uname -m' is broken on crossbuilds
>  EXTRA_OEMAKE = "NUMA=0"

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 15:01 ` Darren Hart
@ 2012-03-20 15:11   ` Koen Kooi
  2012-04-07  3:34     ` Khem Raj
  2012-03-20 15:28   ` Denys Dmytriyenko
  1 sibling, 1 reply; 11+ messages in thread
From: Koen Kooi @ 2012-03-20 15:11 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 20 mrt. 2012, om 16:01 heeft Darren Hart het volgende geschreven:

> 
> 
> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
>> From: Denys Dmytriyenko <denys@ti.com>
>> 
>> Replace dependency on eglibc with virtual/libc
>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
>> 
>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> 
> Thanks Denys,
> 
> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
> anywhere. Have you confirmed that changes made there make their way into
> the actual build?

TARGET_CC_ARCH is an OE thing, it's is what ends up in $CC.

regards,

Koen



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 15:01 ` Darren Hart
  2012-03-20 15:11   ` Koen Kooi
@ 2012-03-20 15:28   ` Denys Dmytriyenko
  2012-03-20 15:33     ` Darren Hart
  1 sibling, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2012-03-20 15:28 UTC (permalink / raw)
  To: Darren Hart
  Cc: Denys Dmytriyenko,
	Patches and discussions about the oe-core layer

On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
> 
> 
> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
> > From: Denys Dmytriyenko <denys@ti.com>
> > 
> > Replace dependency on eglibc with virtual/libc
> > Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
> > 
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> 
> Thanks Denys,
> 
> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
> anywhere. Have you confirmed that changes made there make their way into
> the actual build?

Darren,

TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
app's build process - grepping it would show many such cases in OE-Core and 
especially in meta-oe...

> What was the problem you ran into?

Not a problem per se, but it was not getting all the LDFLAGS being passed, 
more specifically:

-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed

BTW, in Classic OE it was failing on GNU Hash QA check w/o this.

-- 
Denys


> > ---
> >  meta/recipes-rt/rt-tests/rt-tests_0.83.bb |    6 +++---
> >  1 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
> > index 6425027..3755c79 100644
> > --- a/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
> > +++ b/meta/recipes-rt/rt-tests/rt-tests_0.83.bb
> > @@ -1,7 +1,7 @@
> >  DESCRIPTION = "Real-Time preemption testcases"
> >  HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
> >  SECTION = "tests"
> > -DEPENDS = "linux-libc-headers eglibc"
> > +DEPENDS = "linux-libc-headers virtual/libc"
> >  LICENSE = "GPLv2 & GPLv2+"
> >  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
> >                      file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=ce162fe491d19d2ec67dff6dbc938d50 \
> > @@ -11,13 +11,13 @@ SRCREV = "5f1e84f8b015df3ff950056494134eca3f640d70"
> >  
> >  # git -> 0.83 needs a PE bump
> >  PE = "1"
> > -PR = "r1"
> > +PR = "r2"
> >  
> >  SRC_URI = "git://github.com/clrkwllms/rt-tests.git"
> >  
> >  S = "${WORKDIR}/git"
> >  
> > -CFLAGS += "-I${S}/src/include -D_GNU_SOURCE -Wall -Wno-nonnulli ${LDFLAGS}"
> > +TARGET_CC_ARCH += "${LDFLAGS}"
> >  
> >  # calling 'uname -m' is broken on crossbuilds
> >  EXTRA_OEMAKE = "NUMA=0"
> 
> -- 
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 15:28   ` Denys Dmytriyenko
@ 2012-03-20 15:33     ` Darren Hart
  2012-03-20 16:09       ` Denys Dmytriyenko
  0 siblings, 1 reply; 11+ messages in thread
From: Darren Hart @ 2012-03-20 15:33 UTC (permalink / raw)
  To: Denys Dmytriyenko
  Cc: Denys Dmytriyenko,
	Patches and discussions about the oe-core layer



On 03/20/2012 08:28 AM, Denys Dmytriyenko wrote:
> On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
>>
>>
>> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
>>> From: Denys Dmytriyenko <denys@ti.com>
>>>
>>> Replace dependency on eglibc with virtual/libc
>>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
>>>
>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
>>
>> Thanks Denys,
>>
>> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
>> anywhere. Have you confirmed that changes made there make their way into
>> the actual build?
> 
> Darren,
> 
> TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
> Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
> historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
> app's build process - grepping it would show many such cases in OE-Core and 
> especially in meta-oe...


OK, thanks for the context. Will you be resubmitting with TARGET_LDFLAGS?


>> What was the problem you ran into?
> 
> Not a problem per se, but it was not getting all the LDFLAGS being passed, 
> more specifically:
> 
> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> 
> BTW, in Classic OE it was failing on GNU Hash QA check w/o this.
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 15:33     ` Darren Hart
@ 2012-03-20 16:09       ` Denys Dmytriyenko
  2012-03-20 16:22         ` Darren Hart
  2012-03-20 18:39         ` Darren Hart
  0 siblings, 2 replies; 11+ messages in thread
From: Denys Dmytriyenko @ 2012-03-20 16:09 UTC (permalink / raw)
  To: Darren Hart
  Cc: Denys Dmytriyenko,
	Patches and discussions about the oe-core layer

On Tue, Mar 20, 2012 at 08:33:14AM -0700, Darren Hart wrote:
> 
> 
> On 03/20/2012 08:28 AM, Denys Dmytriyenko wrote:
> > On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
> >>
> >>
> >> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
> >>> From: Denys Dmytriyenko <denys@ti.com>
> >>>
> >>> Replace dependency on eglibc with virtual/libc
> >>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
> >>>
> >>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> >>
> >> Thanks Denys,
> >>
> >> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
> >> anywhere. Have you confirmed that changes made there make their way into
> >> the actual build?
> > 
> > Darren,
> > 
> > TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
> > Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
> > historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
> > app's build process - grepping it would show many such cases in OE-Core and 
> > especially in meta-oe...
> 
> OK, thanks for the context. Will you be resubmitting with TARGET_LDFLAGS?

Nope, my bad, it's actually the other way around. From bitbake.conf:

export LDFLAGS = "${TARGET_LDFLAGS}"

So, appending to TARGET_CC_ARCH is the simplest way to pass flags, as that's 
embedded into $CC

Another option would have been to call make with -e flag to let environment 
variables override the ones in the Makefile, but that's less controlled...

-- 
Denys


> >> What was the problem you ran into?
> > 
> > Not a problem per se, but it was not getting all the LDFLAGS being passed, 
> > more specifically:
> > 
> > -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> > 
> > BTW, in Classic OE it was failing on GNU Hash QA check w/o this.
> > 
> 
> -- 
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 16:09       ` Denys Dmytriyenko
@ 2012-03-20 16:22         ` Darren Hart
  2012-03-20 18:39         ` Darren Hart
  1 sibling, 0 replies; 11+ messages in thread
From: Darren Hart @ 2012-03-20 16:22 UTC (permalink / raw)
  To: Denys Dmytriyenko
  Cc: Denys Dmytriyenko,
	Patches and discussions about the oe-core layer



On 03/20/2012 09:09 AM, Denys Dmytriyenko wrote:
> On Tue, Mar 20, 2012 at 08:33:14AM -0700, Darren Hart wrote:
>>
>>
>> On 03/20/2012 08:28 AM, Denys Dmytriyenko wrote:
>>> On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
>>>>
>>>>
>>>> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
>>>>> From: Denys Dmytriyenko <denys@ti.com>
>>>>>
>>>>> Replace dependency on eglibc with virtual/libc
>>>>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
>>>>>
>>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
>>>>
>>>> Thanks Denys,
>>>>
>>>> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
>>>> anywhere. Have you confirmed that changes made there make their way into
>>>> the actual build?
>>>
>>> Darren,
>>>
>>> TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
>>> Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
>>> historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
>>> app's build process - grepping it would show many such cases in OE-Core and 
>>> especially in meta-oe...
>>
>> OK, thanks for the context. Will you be resubmitting with TARGET_LDFLAGS?
> 
> Nope, my bad, it's actually the other way around. From bitbake.conf:
> 
> export LDFLAGS = "${TARGET_LDFLAGS}"
> 
> So, appending to TARGET_CC_ARCH is the simplest way to pass flags, as that's 
> embedded into $CC
> 
> Another option would have been to call make with -e flag to let environment 
> variables override the ones in the Makefile, but that's less controlled...

OK, from the context you've provided, the TARGET_CC_ARCH seems like the
most expedient option. Ultimately a patch to rt-tests to allow users to
provide LDFLAGS seems like the best approach. I can talk to Clark W.
about this.

So you have my ack:

Acked-by: Darren Hart <dvhart@linux.intel.com>

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 16:09       ` Denys Dmytriyenko
  2012-03-20 16:22         ` Darren Hart
@ 2012-03-20 18:39         ` Darren Hart
  2012-03-20 18:59           ` Denys Dmytriyenko
  1 sibling, 1 reply; 11+ messages in thread
From: Darren Hart @ 2012-03-20 18:39 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Denys Dmytriyenko

On 03/20/2012 09:09 AM, Denys Dmytriyenko wrote:
> On Tue, Mar 20, 2012 at 08:33:14AM -0700, Darren Hart wrote:
>>
>>
>> On 03/20/2012 08:28 AM, Denys Dmytriyenko wrote:
>>> On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
>>>>
>>>>
>>>> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
>>>>> From: Denys Dmytriyenko <denys@ti.com>
>>>>>
>>>>> Replace dependency on eglibc with virtual/libc
>>>>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
>>>>>
>>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
>>>>
>>>> Thanks Denys,
>>>>
>>>> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
>>>> anywhere. Have you confirmed that changes made there make their way into
>>>> the actual build?
>>>
>>> Darren,
>>>
>>> TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
>>> Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
>>> historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
>>> app's build process - grepping it would show many such cases in OE-Core and 
>>> especially in meta-oe...
>>
>> OK, thanks for the context. Will you be resubmitting with TARGET_LDFLAGS?
> 
> Nope, my bad, it's actually the other way around. From bitbake.conf:
> 
> export LDFLAGS = "${TARGET_LDFLAGS}"
> 
> So, appending to TARGET_CC_ARCH is the simplest way to pass flags, as that's 
> embedded into $CC
> 
> Another option would have been to call make with -e flag to let environment 
> variables override the ones in the Makefile, but that's less controlled...
> 

How about the follow patch against rt-tests? Clark W. said he's fine taking a
patch that allows such an override. Does this meet your needs?


From 9f1944b0751ccb398a47fc4c3652c459aab44f38 Mon Sep 17 00:00:00 2001
Message-Id: <9f1944b0751ccb398a47fc4c3652c459aab44f38.1332268655.git.darren@dvhart.com>
From: Darren Hart <darren@dvhart.com>
Date: Tue, 20 Mar 2012 11:34:08 -0700
Subject: [PATCH] rt-tests: Support user supplied CFLAGS and LDFLAGS

Accept user supplied CFLAGS and LDFLAGS, overwriting the
Makefile supplied versions. This can cause the build to
fail if the user does not provide at least what the Makefile
defines, but so be it.

Signed-off-by: Darren Hart <darren@dvhart.com>
CC: Denys Dmytriyenko <denis@denix.org>
---
 Makefile |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 4038dcc..e1edf6c 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,8 @@ ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
 NUMA 	:= 1
 endif
 
-CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
+CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
+LDFLAGS ?=
 
 PYLIB  := $(shell python -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
 
@@ -61,41 +62,41 @@ all: $(TARGETS) hwlatdetect
 -include $(sources:.c=.d)
 
 cyclictest: cyclictest.o rt-utils.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(NUMA_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(NUMA_LIBS)
 
 signaltest: signaltest.o rt-utils.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 pi_stress: pi_stress.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 hwlatdetect:  src/hwlatdetect/hwlatdetect.py
 	chmod +x src/hwlatdetect/hwlatdetect.py
 	ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect
 
 rt-migrate-test: rt-migrate-test.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 ptsematest: ptsematest.o rt-utils.o rt-get_cpu.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
 
 sigwaittest: sigwaittest.o rt-utils.o rt-get_cpu.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
 
 svsematest: svsematest.o rt-utils.o rt-get_cpu.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
 
 pmqtest: pmqtest.o rt-utils.o rt-get_cpu.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
 
 sendme: sendme.o rt-utils.o rt-get_cpu.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
 
 pip_stress: pip_stress.o error.o rt-utils.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 hackbench: hackbench.o
-	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 CLEANUP  = $(TARGETS) *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d
 CLEANUP += $(if $(wildcard .git), ChangeLog)
-- 
1.7.6.5


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 18:39         ` Darren Hart
@ 2012-03-20 18:59           ` Denys Dmytriyenko
  2012-03-20 19:03             ` Darren Hart
  0 siblings, 1 reply; 11+ messages in thread
From: Denys Dmytriyenko @ 2012-03-20 18:59 UTC (permalink / raw)
  To: Darren Hart
  Cc: Denys Dmytriyenko,
	Patches and discussions about the oe-core layer

On Tue, Mar 20, 2012 at 11:39:22AM -0700, Darren Hart wrote:
> On 03/20/2012 09:09 AM, Denys Dmytriyenko wrote:
> > On Tue, Mar 20, 2012 at 08:33:14AM -0700, Darren Hart wrote:
> >>
> >>
> >> On 03/20/2012 08:28 AM, Denys Dmytriyenko wrote:
> >>> On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
> >>>>
> >>>>
> >>>> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
> >>>>> From: Denys Dmytriyenko <denys@ti.com>
> >>>>>
> >>>>> Replace dependency on eglibc with virtual/libc
> >>>>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
> >>>>>
> >>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> >>>>
> >>>> Thanks Denys,
> >>>>
> >>>> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
> >>>> anywhere. Have you confirmed that changes made there make their way into
> >>>> the actual build?
> >>>
> >>> Darren,
> >>>
> >>> TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
> >>> Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
> >>> historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
> >>> app's build process - grepping it would show many such cases in OE-Core and 
> >>> especially in meta-oe...
> >>
> >> OK, thanks for the context. Will you be resubmitting with TARGET_LDFLAGS?
> > 
> > Nope, my bad, it's actually the other way around. From bitbake.conf:
> > 
> > export LDFLAGS = "${TARGET_LDFLAGS}"
> > 
> > So, appending to TARGET_CC_ARCH is the simplest way to pass flags, as that's 
> > embedded into $CC
> > 
> > Another option would have been to call make with -e flag to let environment 
> > variables override the ones in the Makefile, but that's less controlled...
> > 
> 
> How about the follow patch against rt-tests? Clark W. said he's fine taking a
> patch that allows such an override. Does this meet your needs?

It does look good. Especially if it gets upstreamed! :)

If those default CFLAGS should always be there, then you can do something 
like:

CFLAGS ?=
CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include

But that would mean there's no way to override those from outside, only add to 
them...

Thanks for taking time to upstream the fix. I'll need to re-submit my patch to 
only do the eglibc -> virtual/libc change.

-- 
Denys


> From 9f1944b0751ccb398a47fc4c3652c459aab44f38 Mon Sep 17 00:00:00 2001
> Message-Id: <9f1944b0751ccb398a47fc4c3652c459aab44f38.1332268655.git.darren@dvhart.com>
> From: Darren Hart <darren@dvhart.com>
> Date: Tue, 20 Mar 2012 11:34:08 -0700
> Subject: [PATCH] rt-tests: Support user supplied CFLAGS and LDFLAGS
> 
> Accept user supplied CFLAGS and LDFLAGS, overwriting the
> Makefile supplied versions. This can cause the build to
> fail if the user does not provide at least what the Makefile
> defines, but so be it.
> 
> Signed-off-by: Darren Hart <darren@dvhart.com>
> CC: Denys Dmytriyenko <denis@denix.org>
> ---
>  Makefile |   25 +++++++++++++------------
>  1 files changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 4038dcc..e1edf6c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -20,7 +20,8 @@ ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),)
>  NUMA 	:= 1
>  endif
>  
> -CFLAGS = -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
> +CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
> +LDFLAGS ?=
>  
>  PYLIB  := $(shell python -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
>  
> @@ -61,41 +62,41 @@ all: $(TARGETS) hwlatdetect
>  -include $(sources:.c=.d)
>  
>  cyclictest: cyclictest.o rt-utils.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(NUMA_LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(NUMA_LIBS)
>  
>  signaltest: signaltest.o rt-utils.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
>  
>  pi_stress: pi_stress.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
>  
>  hwlatdetect:  src/hwlatdetect/hwlatdetect.py
>  	chmod +x src/hwlatdetect/hwlatdetect.py
>  	ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect
>  
>  rt-migrate-test: rt-migrate-test.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
>  
>  ptsematest: ptsematest.o rt-utils.o rt-get_cpu.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
>  
>  sigwaittest: sigwaittest.o rt-utils.o rt-get_cpu.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
>  
>  svsematest: svsematest.o rt-utils.o rt-get_cpu.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
>  
>  pmqtest: pmqtest.o rt-utils.o rt-get_cpu.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
>  
>  sendme: sendme.o rt-utils.o rt-get_cpu.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS)
>  
>  pip_stress: pip_stress.o error.o rt-utils.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
>  
>  hackbench: hackbench.o
> -	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
> +	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
>  
>  CLEANUP  = $(TARGETS) *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d
>  CLEANUP += $(if $(wildcard .git), ChangeLog)
> -- 
> 1.7.6.5
> 
> 
> -- 
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 18:59           ` Denys Dmytriyenko
@ 2012-03-20 19:03             ` Darren Hart
  0 siblings, 0 replies; 11+ messages in thread
From: Darren Hart @ 2012-03-20 19:03 UTC (permalink / raw)
  To: Denys Dmytriyenko
  Cc: Denys Dmytriyenko,
	Patches and discussions about the oe-core layer



On 03/20/2012 11:59 AM, Denys Dmytriyenko wrote:
> On Tue, Mar 20, 2012 at 11:39:22AM -0700, Darren Hart wrote:
>> On 03/20/2012 09:09 AM, Denys Dmytriyenko wrote:
>>> On Tue, Mar 20, 2012 at 08:33:14AM -0700, Darren Hart wrote:
>>>>
>>>>
>>>> On 03/20/2012 08:28 AM, Denys Dmytriyenko wrote:
>>>>> On Tue, Mar 20, 2012 at 08:01:44AM -0700, Darren Hart wrote:
>>>>>>
>>>>>>
>>>>>> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
>>>>>>> From: Denys Dmytriyenko <denys@ti.com>
>>>>>>>
>>>>>>> Replace dependency on eglibc with virtual/libc
>>>>>>> Pass LDFLAGS to TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
>>>>>>>
>>>>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
>>>>>>
>>>>>> Thanks Denys,
>>>>>>
>>>>>> Looking through the rt-tests sources I don't see TARGET_CC_ARCH
>>>>>> anywhere. Have you confirmed that changes made there make their way into
>>>>>> the actual build?
>>>>>
>>>>> Darren,
>>>>>
>>>>> TARGET_CC_ARCH is not an rt-tests specific variable, it's used in OE. 
>>>>> Although, TARGET_LDFLAGS might be more appropriate for this purpose, 
>>>>> historically TARGET_CC_ARCH was heavily used to pass distro LDFLAGS to the 
>>>>> app's build process - grepping it would show many such cases in OE-Core and 
>>>>> especially in meta-oe...
>>>>
>>>> OK, thanks for the context. Will you be resubmitting with TARGET_LDFLAGS?
>>>
>>> Nope, my bad, it's actually the other way around. From bitbake.conf:
>>>
>>> export LDFLAGS = "${TARGET_LDFLAGS}"
>>>
>>> So, appending to TARGET_CC_ARCH is the simplest way to pass flags, as that's 
>>> embedded into $CC
>>>
>>> Another option would have been to call make with -e flag to let environment 
>>> variables override the ones in the Makefile, but that's less controlled...
>>>
>>
>> How about the follow patch against rt-tests? Clark W. said he's fine taking a
>> patch that allows such an override. Does this meet your needs?
> 
> It does look good. Especially if it gets upstreamed! :)
> 
> If those default CFLAGS should always be there, then you can do something 
> like:
> 
> CFLAGS ?=
> CFLAGS += -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
> 
> But that would mean there's no way to override those from outside, only add to 
> them...
> 
> Thanks for taking time to upstream the fix. I'll need to re-submit my patch to 
> only do the eglibc -> virtual/libc change.
> 

Great,

I'll submit to rt-users now then. We should be able to pull the patch
into oe-core as well.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing
  2012-03-20 15:11   ` Koen Kooi
@ 2012-04-07  3:34     ` Khem Raj
  0 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2012-04-07  3:34 UTC (permalink / raw)
  To: openembedded-core

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/20/2012 08:11 AM, Koen Kooi wrote:
> 
> Op 20 mrt. 2012, om 16:01 heeft Darren Hart het volgende 
> geschreven:
> 
>> 
>> 
>> On 03/19/2012 05:22 PM, Denys Dmytriyenko wrote:
>>> From: Denys Dmytriyenko <denys@ti.com>
>>> 
>>> Replace dependency on eglibc with virtual/libc Pass LDFLAGS to 
>>> TARGET_CC_ARCH, instead of CFLAGS as Makefile overrides it
>>> 
>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
>> 
>> Thanks Denys,
>> 
>> Looking through the rt-tests sources I don't see TARGET_CC_ARCH 
>> anywhere. Have you confirmed that changes made there make their 
>> way into the actual build?
> 
> TARGET_CC_ARCH is an OE thing, it's is what ends up in $CC.
> 

for record you should not need to pass LDFLAGS to TARGET_CC_ARCH in
OE-Core
if you were doing it to silence  hash style warnings
we have fixed toolchain for that


> regards,
> 
> Koen
> 
> _______________________________________________ Openembedded-core 
> mailing list Openembedded-core@lists.openembedded.org 
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9/ta8ACgkQuwUzVZGdMxQGeACgj4VzDL18gKXxxI6pp0zhTOKs
a6kAn0GccFNh94ttjzSWxp7Q6UYTY/4R
=yKil
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-04-07  3:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20  0:22 [PATCH] rt-tests: fix dependency on eglibc, clean LDFLAGS passing Denys Dmytriyenko
2012-03-20 15:01 ` Darren Hart
2012-03-20 15:11   ` Koen Kooi
2012-04-07  3:34     ` Khem Raj
2012-03-20 15:28   ` Denys Dmytriyenko
2012-03-20 15:33     ` Darren Hart
2012-03-20 16:09       ` Denys Dmytriyenko
2012-03-20 16:22         ` Darren Hart
2012-03-20 18:39         ` Darren Hart
2012-03-20 18:59           ` Denys Dmytriyenko
2012-03-20 19:03             ` Darren Hart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox