diff --git a/configure b/configure
index e507034c0142e184085676d6f261ebaa92d7b0a4..e55cfdc2eceff5007f85996241060ba22fbec057 100755
--- a/configure
+++ b/configure
@@ -1871,7 +1871,8 @@ case $target_os in
         FFSERVERLDFLAGS=-Wl,-bind_at_load
         objformat="macho"
         enabled x86_64 && objformat="macho64"
-        enabled shared || check_cflags -mdynamic-no-pic
+        enabled shared ||
+            { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
         ;;
     mingw32*)
         if test $target_os = "mingw32ce"; then