On Tue, May 10, 2011 at 04:54:11PM +0200, Loïc Minier wrote:
> On Tue, May 10, 2011, Pierre Habouzit wrote:
> > What should be done for that, s/arm/armel/ and add -marmv7a to the
> > CFLAGS at configure time, that's it?
> 
>  Yup; ideally, you would test whether the toolchain config supports
>  ARMv7, and if it doesn't you add -march=armv7-a to the CFLAGS.  This
>  means that no flags is added to e.g. Debian armhf or to Ubuntu's armel
>  or any Debian derivative which already turns on armv7-a (or higher).
> 
>  Something like this rules snippet would work I guess:
> 
> CROSS :=
> ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
>     CROSS :=  $(DEB_HOST_GNU_TYPE)-
> endif
> 
> # this outputs 0 or 1 depending on whether a piece of assembly can be compiled
> # with the *default* gcc flags; this is used to test the toolchain *default*
> # configuration
> check_asm = $(shell echo 'void foo(void) { __asm__ volatile("$(1)"); }' | 
> $(CROSS)gcc -x c -c - -o /dev/null 2>/dev/null && echo 1 || echo 0)
> 
> ifeq ($(DEB_HOST_ARCH_CPU),arm)
>     # whether the toolchain *default* configuration enables ARMv7
>     v7_asm := dmb
>     has_v7 := $(call check_asm, $(v7_asm))
> 
> ifneq ($(has_v7),1)
>     CFLAGS += -march=armv7-a
> endif
> endif

Sadly it doesn't work:
https://buildd.debian.org/status/fetch.php?pkg=valgrind&arch=armel&ver=1%3A3.6.1-2&stamp=1305095779

I have an arm at home so I'll try to see if I'm able to understand how
to cheat it, but if you have any clever idea, I'd love to hear it :)
-- 
·O·  Pierre Habouzit
··O                                                madco...@debian.org
OOO                                                http://www.madism.org



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to