mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC][PATCH 0/1] toolchain conflict for userspace tools
@ 2015-04-20 13:10 Stefan Müller-Klieser
  2015-04-20 13:10 ` [RFC][PATCH 1/1] scripts/Makefile: add TARGETCC Stefan Müller-Klieser
  2015-04-23  7:07 ` [RFC][PATCH 0/1] toolchain conflict for userspace tools Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Müller-Klieser @ 2015-04-20 13:10 UTC (permalink / raw)
  To: barebox

Dear bareboxers,

I ask for help with a problem I am facing. If the buildsystem compiles
gcc with multilib support, gcc can support the float abi callconvention
to be generated dynamically, as yocto starting with v1.7 does. So we
don't have the usual default "--with-float=hard", but gcc sets the
mfloat-abi at runtime for every package.
This seems to work well in general, e.g. modern autotools and the
Kconfig infrastructure for kernel and barebox. However this fails
for the target tools in the barebox script folder. They need to have
the --with-float=hard set, or they will try to compile as softfloat.
I think the general solution would be to give the user the possibility
to redefine the CC for the userspace tools, as this is very specific
to the environment where the barebox gets compiled.
But maybe someone with a deeper knowledge of the Makefile infrastructure
can recommend a better long term solution.

Regards,
Stefan

Stefan Müller-Klieser (1):
  scripts/Makefile: add TARGETCC

 scripts/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [RFC][PATCH 1/1] scripts/Makefile: add TARGETCC
  2015-04-20 13:10 [RFC][PATCH 0/1] toolchain conflict for userspace tools Stefan Müller-Klieser
@ 2015-04-20 13:10 ` Stefan Müller-Klieser
  2015-04-23  7:07 ` [RFC][PATCH 0/1] toolchain conflict for userspace tools Sascha Hauer
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Müller-Klieser @ 2015-04-20 13:10 UTC (permalink / raw)
  To: barebox

This gives the buildsystem the ability to hand down user space toolchain
settings to target tools in the scripts folder, if necessary.

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
---
 scripts/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile b/scripts/Makefile
index 74c2213..872cd99 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -40,8 +40,10 @@ targetprogs-$(CONFIG_IMD_TARGET) += bareboximd-target
 # Let clean descend into subdirs
 subdir-	+= basic kconfig setupmbr
 
+TARGETCC ?= $(CC)
+
 quiet_cmd_csingle	= CC      $@
-      cmd_csingle	= $(CC) -Wp,-MD,$(depfile) $(CFLAGS) -o $@ $<
+      cmd_csingle	= $(TARGETCC) -Wp,-MD,$(depfile) $(CFLAGS) -o $@ $<
 
 __targetprogs	:= $(sort $(targetprogs-y) $(targetprogs-m))
 target-csingle	:= $(foreach m,$(__targetprogs),$(if $($(m)-objs),,$(m)))
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [RFC][PATCH 0/1] toolchain conflict for userspace tools
  2015-04-20 13:10 [RFC][PATCH 0/1] toolchain conflict for userspace tools Stefan Müller-Klieser
  2015-04-20 13:10 ` [RFC][PATCH 1/1] scripts/Makefile: add TARGETCC Stefan Müller-Klieser
@ 2015-04-23  7:07 ` Sascha Hauer
  2015-04-23  8:49   ` Antwort: " PHYTEC Mailinglists
  1 sibling, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2015-04-23  7:07 UTC (permalink / raw)
  To: Stefan Müller-Klieser; +Cc: barebox

Hi Stefan,

On Mon, Apr 20, 2015 at 03:10:26PM +0200, Stefan Müller-Klieser wrote:
> Dear bareboxers,
> 
> I ask for help with a problem I am facing. If the buildsystem compiles
> gcc with multilib support, gcc can support the float abi callconvention
> to be generated dynamically, as yocto starting with v1.7 does. So we
> don't have the usual default "--with-float=hard", but gcc sets the
> mfloat-abi at runtime for every package.
> This seems to work well in general, e.g. modern autotools and the
> Kconfig infrastructure for kernel and barebox. However this fails
> for the target tools in the barebox script folder. They need to have
> the --with-float=hard set, or they will try to compile as softfloat.
> I think the general solution would be to give the user the possibility
> to redefine the CC for the userspace tools, as this is very specific
> to the environment where the barebox gets compiled.
> But maybe someone with a deeper knowledge of the Makefile infrastructure
> can recommend a better long term solution.

We discussed this here and came to the conclusion that not CC should be
exchanged but rather we should have userspace specific CFLAGS. The
currently used CFLAGS contains stuff not suitable for userspace anyway.
Would introducing CFLAGS_USERSPACE work for you?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Antwort: Re: [RFC][PATCH 0/1] toolchain conflict for userspace tools
  2015-04-23  7:07 ` [RFC][PATCH 0/1] toolchain conflict for userspace tools Sascha Hauer
@ 2015-04-23  8:49   ` PHYTEC Mailinglists
  0 siblings, 0 replies; 4+ messages in thread
From: PHYTEC Mailinglists @ 2015-04-23  8:49 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox, barebox

Hi Sascha,

"barebox" <barebox-bounces@lists.infradead.org> wrote on 04/23/2015 
09:07:28 AM:

> Von: Sascha Hauer <s.hauer@pengutronix.de>
> An: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
> Kopie: barebox@lists.infradead.org
> Datum: 04/23/2015 09:08 AM
> Betreff: Re: [RFC][PATCH 0/1] toolchain conflict for userspace tools
> Gesendet von: "barebox" <barebox-bounces@lists.infradead.org>
> 
> Hi Stefan,
> 
> On Mon, Apr 20, 2015 at 03:10:26PM +0200, Stefan Müller-Klieser wrote:
> > Dear bareboxers,
> > 
> > I ask for help with a problem I am facing. If the buildsystem compiles
> > gcc with multilib support, gcc can support the float abi 
callconvention
> > to be generated dynamically, as yocto starting with v1.7 does. So we
> > don't have the usual default "--with-float=hard", but gcc sets the
> > mfloat-abi at runtime for every package.
> > This seems to work well in general, e.g. modern autotools and the
> > Kconfig infrastructure for kernel and barebox. However this fails
> > for the target tools in the barebox script folder. They need to have
> > the --with-float=hard set, or they will try to compile as softfloat.
> > I think the general solution would be to give the user the possibility
> > to redefine the CC for the userspace tools, as this is very specific
> > to the environment where the barebox gets compiled.
> > But maybe someone with a deeper knowledge of the Makefile 
infrastructure
> > can recommend a better long term solution.
> 
> We discussed this here and came to the conclusion that not CC should be
> exchanged but rather we should have userspace specific CFLAGS. The
> currently used CFLAGS contains stuff not suitable for userspace anyway.
> Would introducing CFLAGS_USERSPACE work for you?

Sure, that sounds intuitive. Thanks!
Stefan

> 
> Sascha
> 
> -- 
> Pengutronix e.K.                           | |
> Industrial Linux Solutions                 | http://www.pengutronix.de/ 
|
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 
|
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2015-04-23  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 13:10 [RFC][PATCH 0/1] toolchain conflict for userspace tools Stefan Müller-Klieser
2015-04-20 13:10 ` [RFC][PATCH 1/1] scripts/Makefile: add TARGETCC Stefan Müller-Klieser
2015-04-23  7:07 ` [RFC][PATCH 0/1] toolchain conflict for userspace tools Sascha Hauer
2015-04-23  8:49   ` Antwort: " PHYTEC Mailinglists

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