aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure b/configure
index 89df5c44ae..3770d7c263 100755
--- a/configure
+++ b/configure
@@ -4723,8 +4723,14 @@ EOF
if ! compile_object ""; then
error_exit "Failed to compile object file for LD_REL_FLAGS test"
fi
-if do_cc -nostdlib -Wl,-r -Wl,--no-relax -o $TMPMO $TMPO; then
- LD_REL_FLAGS="-Wl,--no-relax"
+for i in '-Wl,-r -Wl,--no-relax' -Wl,-r -r; do
+ if do_cc -nostdlib $i -o $TMPMO $TMPO; then
+ LD_REL_FLAGS=$i
+ break
+ fi
+done
+if test "$modules" = "yes" && test "$LD_REL_FLAGS" = ""; then
+ feature_not_found "modules" "Cannot find how to build relocatable objects"
fi
##########################################