Enable building with -mthumb for ARM by default
authorSteven Luo <steven+maemo@steven676.net>
Mon, 22 Feb 2010 10:06:00 +0000 (02:06 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Mon, 22 Feb 2010 10:06:00 +0000 (02:06 -0800)
The Diablo autobuilder passes an invalid DEB_BUILD_OPTIONS (options
should be space-separated, not comma-separated), and the Fremantle
autobuilder doesn't pass "thumb" in DEB_BUILD_OPTIONS at all, so the
existing code was an effective no-op.  We know we want Thumb
instructions by default, so build with -mthumb by default and offer a
"nothumb" option to turn it off.

debian/rules

index e467af0..e5c9873 100755 (executable)
@@ -12,8 +12,8 @@
 # Optimize for N8x0 CPUs if building for armel
 ifeq ($(DEB_HOST_ARCH),armel)
        EXTRA_CFLAGS += -mcpu=arm1136jf-s
 # Optimize for N8x0 CPUs if building for armel
 ifeq ($(DEB_HOST_ARCH),armel)
        EXTRA_CFLAGS += -mcpu=arm1136jf-s
-       # Use Thumb for smaller binaries if requested
-       ifneq (,$(filter thumb,$(DEB_BUILD_OPTIONS)))
+       # Use Thumb for smaller binaries unless otherwise requested
+       ifeq (,$(filter nothumb,$(DEB_BUILD_OPTIONS)))
                EXTRA_CFLAGS += -mthumb
        endif
 endif
                EXTRA_CFLAGS += -mthumb
        endif
 endif