Patchwork [1/1] libmad: force architecture-specific optimisations on AVR32

login
register
mail settings
Submitter gilles.talis@gmail.com
Date Feb. 22, 2013, 1:01 a.m.
Message ID <1361494881-27134-1-git-send-email-gilles.talis@gmail.com>
Download mbox | patch
Permalink /patch/222445/
State Superseded
Headers show

Comments

gilles.talis@gmail.com - Feb. 22, 2013, 1:01 a.m.
Fixes:
http://autobuild.buildroot.net/results/e01f5a5484299dce1797966445f3972583c67b22
http://autobuild.buildroot.net/results/7ed0563fbbfc19c93ec5be35d3b6a95e496b4c5d

Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
---
 package/libmad/Config.in |    1 +
 package/libmad/libmad.mk |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
Simon Dawson - Feb. 22, 2013, 8:21 a.m.
Hi Gilles,

On 22 February 2013 01:01, Gilles Talis <gilles.talis@gmail.com> wrote:
> Fixes:
> http://autobuild.buildroot.net/results/e01f5a5484299dce1797966445f3972583c67b22
> http://autobuild.buildroot.net/results/7ed0563fbbfc19c93ec5be35d3b6a95e496b4c5d
>
> Signed-off-by: Gilles Talis <gilles.talis@gmail.com>

This looks fine, but wouldn't it be simpler to just do

config BR2_PACKAGE_LIBMAD
  bool "libmad"
  select BR2_PACKAGE_LIBMAD_ASO if BR2_avr32

in the libmad Config.in?

Simon.
Benoît Thébaudeau - Feb. 22, 2013, 11:55 a.m.
On Friday, February 22, 2013 9:21:49 AM, Simon Dawson wrote:
> Hi Gilles,
> 
> On 22 February 2013 01:01, Gilles Talis <gilles.talis@gmail.com> wrote:
> > Fixes:
> > http://autobuild.buildroot.net/results/e01f5a5484299dce1797966445f3972583c67b22
> > http://autobuild.buildroot.net/results/7ed0563fbbfc19c93ec5be35d3b6a95e496b4c5d
> >
> > Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
> 
> This looks fine, but wouldn't it be simpler to just do
> 
> config BR2_PACKAGE_LIBMAD
>   bool "libmad"
>   select BR2_PACKAGE_LIBMAD_ASO if BR2_avr32
> 
> in the libmad Config.in?

I agree, all the more looking only at Config.in, one could think that this is
doing exactly the opposite.

Best regards,
Benoît
Peter Korsgaard - Feb. 22, 2013, 1:24 p.m.
>>>>> "Simon" == Simon Dawson <spdawson@gmail.com> writes:

 Simon> Hi Gilles,
 Simon> On 22 February 2013 01:01, Gilles Talis <gilles.talis@gmail.com> wrote:
 >> Fixes:
 >> http://autobuild.buildroot.net/results/e01f5a5484299dce1797966445f3972583c67b22
 >> http://autobuild.buildroot.net/results/7ed0563fbbfc19c93ec5be35d3b6a95e496b4c5d
 >> 
 >> Signed-off-by: Gilles Talis <gilles.talis@gmail.com>

 Simon> This looks fine, but wouldn't it be simpler to just do

 Simon> config BR2_PACKAGE_LIBMAD
 Simon>   bool "libmad"
 Simon>   select BR2_PACKAGE_LIBMAD_ASO if BR2_avr32

 Simon> in the libmad Config.in?

Indeed. That or simply hiding (forcing) the option on avr32, E.G.:

config BR2_PACKAGE_LIBMAD_ASO
 	bool "Architecture-specific optimizations" if !BR2_avr32
 	default y
gilles.talis@gmail.com - Feb. 22, 2013, 6:55 p.m.
Dear Simon, Benoit and Peter,

2013/2/22 Peter Korsgaard <jacmet@uclibc.org>:
>>>>>> "Simon" == Simon Dawson <spdawson@gmail.com> writes:
>
>  Simon> Hi Gilles,
>  Simon> On 22 February 2013 01:01, Gilles Talis <gilles.talis@gmail.com> wrote:
>  >> Fixes:
>  >> http://autobuild.buildroot.net/results/e01f5a5484299dce1797966445f3972583c67b22
>  >> http://autobuild.buildroot.net/results/7ed0563fbbfc19c93ec5be35d3b6a95e496b4c5d
>  >>
>  >> Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
>
>  Simon> This looks fine, but wouldn't it be simpler to just do
>
>  Simon> config BR2_PACKAGE_LIBMAD
>  Simon>   bool "libmad"
>  Simon>   select BR2_PACKAGE_LIBMAD_ASO if BR2_avr32
>
>  Simon> in the libmad Config.in?
>
> Indeed. That or simply hiding (forcing) the option on avr32, E.G.:
>
> config BR2_PACKAGE_LIBMAD_ASO
>         bool "Architecture-specific optimizations" if !BR2_avr32
>         default y
>
> --
> Bye, Peter Korsgaard
Thanks for your valuable comments. Will send a second version of the
patch with your suggestions later on.

Gilles.

Patch

diff --git a/package/libmad/Config.in b/package/libmad/Config.in
index d0edc49..b713cd1 100644
--- a/package/libmad/Config.in
+++ b/package/libmad/Config.in
@@ -37,6 +37,7 @@  config BR2_PACKAGE_LIBMAD_SSO
 
 config BR2_PACKAGE_LIBMAD_ASO
 	bool "Architecture-specific optimizations"
+	depends on !BR2_avr32
 	default y
 	help
 	  Use certain architecture-specific optimizations.
diff --git a/package/libmad/libmad.mk b/package/libmad/libmad.mk
index 09f3cdb..651afb6 100644
--- a/package/libmad/libmad.mk
+++ b/package/libmad/libmad.mk
@@ -35,7 +35,13 @@  LIBMAD_CONF_OPT = \
 		$(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_SPEED),--enable-speed) \
 		$(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_ACCURACY),--enable-accuracy) \
 		--$(if $(BR2_PACKAGE_LIBMAD_SSO),enable,disable)-sso \
-		--$(if $(BR2_PACKAGE_LIBMAD_ASO),enable,disable)-aso \
 		--$(if $(BR2_PACKAGE_LIBMAD_STRICT_ISO),enable,disable)-strict-iso
 
+ifeq ($(BR2_avr32),y)
+# AVR32: Force architecture-specific optimisations
+LIBMAD_CONF_OPT += --enable-aso
+else
+LIBMAD_CONF_OPT += --$(if $(BR2_PACKAGE_LIBMAD_ASO),enable,disable)-aso
+endif
+
 $(eval $(autotools-package))