All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile.
@ 2012-08-15  1:25 Danomi Manchego
  2012-08-23 15:09 ` [Buildroot] [UNSURE] " François Perrad
  2012-08-26  9:20 ` [Buildroot] " Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Danomi Manchego @ 2012-08-15  1:25 UTC (permalink / raw)
  To: buildroot

The luajit amalgamation compile starts with building a host tool, and then
uses it to build itself. ?However, when CFLAGS is specified, as opposed to
TARGET_CFLAGS, then it is used for both HOST and TARGET builds. ?So if you
add something target specific into 'Target Optimizations' (for example,
'-mfpu=neon -mfloat-abi=softfp' for ARM Cortex-A8), then it gets into the
host tool compile, which then fails (because my build machine is not an
ARM Cortext-A8). ?This can be fixed by using TARGET_CFLAGS and
TARGET_LDFLAGS, instead of CFLAGS and LDFLAGS, respectively.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
 package/luajit/luajit.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index e4c46d8..913bc0c 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -42,8 +42,8 @@ define LUAJIT_BUILD_CMDS
 		TARGET_LD="$(TARGET_CC)" \
 		TARGET_AR="$(TARGET_AR) rcus" \
 		TARGET_STRIP="$(TARGET_STRIP)" \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		LDFLAGS="$(TARGET_LDFLAGS)" \
+		TARGET_CFLAGS="$(TARGET_CFLAGS)" \
+		TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
 		HOST_CC="$(LUAJIT_HOST_CC)" \
 		HOST_CFLAGS="$(HOST_CFLAGS)" \
 		HOST_LDFLAGS="$(HOST_LDFLAGS)" \
-- 
1.7.9.5

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

* [Buildroot] [UNSURE] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile.
  2012-08-15  1:25 [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile Danomi Manchego
@ 2012-08-23 15:09 ` François Perrad
  2012-08-26  9:20 ` [Buildroot] " Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: François Perrad @ 2012-08-23 15:09 UTC (permalink / raw)
  To: buildroot

Acked-by: Francois Perrad <francois.perrad@gadz.org>

2012/8/15 Danomi Manchego <danomimanchego123@gmail.com>:
> The luajit amalgamation compile starts with building a host tool, and then
> uses it to build itself.  However, when CFLAGS is specified, as opposed to
> TARGET_CFLAGS, then it is used for both HOST and TARGET builds.  So if you
> add something target specific into 'Target Optimizations' (for example,
> '-mfpu=neon -mfloat-abi=softfp' for ARM Cortex-A8), then it gets into the
> host tool compile, which then fails (because my build machine is not an
> ARM Cortext-A8).  This can be fixed by using TARGET_CFLAGS and
> TARGET_LDFLAGS, instead of CFLAGS and LDFLAGS, respectively.
>
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
> ---
>  package/luajit/luajit.mk |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
> index e4c46d8..913bc0c 100644
> --- a/package/luajit/luajit.mk
> +++ b/package/luajit/luajit.mk
> @@ -42,8 +42,8 @@ define LUAJIT_BUILD_CMDS
>                 TARGET_LD="$(TARGET_CC)" \
>                 TARGET_AR="$(TARGET_AR) rcus" \
>                 TARGET_STRIP="$(TARGET_STRIP)" \
> -               CFLAGS="$(TARGET_CFLAGS)" \
> -               LDFLAGS="$(TARGET_LDFLAGS)" \
> +               TARGET_CFLAGS="$(TARGET_CFLAGS)" \
> +               TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
>                 HOST_CC="$(LUAJIT_HOST_CC)" \
>                 HOST_CFLAGS="$(HOST_CFLAGS)" \
>                 HOST_LDFLAGS="$(HOST_LDFLAGS)" \
> --
> 1.7.9.5
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile.
  2012-08-15  1:25 [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile Danomi Manchego
  2012-08-23 15:09 ` [Buildroot] [UNSURE] " François Perrad
@ 2012-08-26  9:20 ` Thomas Petazzoni
  2012-08-26 16:14   ` Danomi Manchego
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2012-08-26  9:20 UTC (permalink / raw)
  To: buildroot

Le Tue, 14 Aug 2012 21:25:30 -0400,
Danomi Manchego <danomimanchego123@gmail.com> a ?crit :

> The luajit amalgamation compile starts with building a host tool, and then
> uses it to build itself. ?However, when CFLAGS is specified, as opposed to
> TARGET_CFLAGS, then it is used for both HOST and TARGET builds. ?So if you
> add something target specific into 'Target Optimizations' (for example,
> '-mfpu=neon -mfloat-abi=softfp' for ARM Cortex-A8), then it gets into the
> host tool compile, which then fails (because my build machine is not an
> ARM Cortext-A8). ?This can be fixed by using TARGET_CFLAGS and
> TARGET_LDFLAGS, instead of CFLAGS and LDFLAGS, respectively.
> 
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>

Applied, thanks. It fixes build issues like
http://autobuild.buildroot.net/results/022b73a989734d800225c91f419f18f4fc31c264/build-end.log.

Danomi, could you share what is your Buildroot configuration that uses
-mfpu=neon -mfloat-abi=softfp ? I might be interested in adding such a
configuration to the autobuilders.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile.
  2012-08-26  9:20 ` [Buildroot] " Thomas Petazzoni
@ 2012-08-26 16:14   ` Danomi Manchego
  0 siblings, 0 replies; 4+ messages in thread
From: Danomi Manchego @ 2012-08-26 16:14 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

> It fixes build issues like
>
http://autobuild.buildroot.net/results/022b73a989734d800225c91f419f18f4fc31c264/build-end.log.

This link doesn't work for me, but I'll take your word for it.

> could you share what is your Buildroot configuration that uses
> -mfpu=neon -mfloat-abi=softfp ?
0
Right now, we are on a rather old version of buildroot, but looking forward
to updating to the latest when 2012-08 is officially released.  So it's
probably best to wait until then.

There are a couple of reasons why we added these two flags to "Target
Optimizations".  For one, the options that are pre-baked into the external
toolchain wrapper don't capture enabling neon optimization.  But, more
importantly, I wasn't able to get ffmpeg to recognize that neon
optimizations were applicable until I (1) added the --cpu=cortex-a8 (for
which I submitted a patch, never got any comments,
http://patchwork.ozlabs.org/patch/154307/), and (2) passed in the softfp
option as part of the --extra-cflags specified during the package configure
step (for which I never actually submitted a patch).  Hopefully, ffmpeg is
unique in this regard ...

Danomi -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120826/cd57950e/attachment.html>

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

end of thread, other threads:[~2012-08-26 16:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15  1:25 [Buildroot] [PATCH] luajit: bug fix - prevent target CFLAGS from being used in host tool compile Danomi Manchego
2012-08-23 15:09 ` [Buildroot] [UNSURE] " François Perrad
2012-08-26  9:20 ` [Buildroot] " Thomas Petazzoni
2012-08-26 16:14   ` Danomi Manchego

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.