+ifneq (,$(findstring $(DEB_HOST_ARCH), armel))
+       CFLAGS += -Wa,--defsym,USES_THUMB=1
+endif

To avoid breaking things in Debian, I believe USES_THUMB should not be
set for their armel target.

The best way might to be to see whether the compiler defaults to Thumb
(which could be done via configure or in the Makefile).

This would work in the Makefile for example (though it's pretty
ghastly):

ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
CFLAGS += $(shell $(CC) -dM -E -xc /dev/null | grep -q __thumb__ && echo 
-Wa,--defsym,INTERWORKING_NEEDED=1)
endif

(CFLAGS is deliberately omitted from the CC command line here: if the
toolchain _defaults_ to Thumb, we can expect to have to support
interworking, even someone decides to add -marm for this package or
specific files. I also renamed the symbol which gets defined to make the
meaning a bit clearer; but obviously that's just cosmetic.)

-- 
[arm] needs porting to thumb2
https://bugs.launchpad.net/bugs/513732
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to