diff --git a/configure b/configure
index 8cd5696c803324caaf8e2c5de44d38fb35e4ec96..fd94bc0dfc0e9492d6d2e108129386c574df83b2 100755
--- a/configure
+++ b/configure
@@ -3092,6 +3092,7 @@ if enabled alpha; then
 
 elif enabled arm; then
 
+    check_cpp_condition stddef.h "defined __thumb__" && enable_weak thumb
     enabled thumb && check_cflags -mthumb || check_cflags -marm
     nogas=die