summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-11-15 09:56:20 +0100
committerRichard Levitte <richard@levitte.org>2016-11-16 14:11:11 +0100
commit760c969584bb52f1c88f11563c59a2c5efad66d7 (patch)
tree7ab53c3546ce40f38fa60efe6640419a44682b91 /config
parenta68382de5e2e528d5026d29666f4abbc7c43743a (diff)
On x86 machines where the compiler supports -m32, use 'linux-x86'
The rationale is that the linux-x86 is the most likely config target to evolve and should therefore be chosen when possible, while linux-elf is mostly reserved for older Linux machines. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1924) (cherry picked from commit 27a451e3739d8331b9c180b0373b88ab6c382409)
Diffstat (limited to 'config')
-rwxr-xr-xconfig9
1 files changed, 8 insertions, 1 deletions
diff --git a/config b/config
index eef07d8436..1341fd622d 100755
--- a/config
+++ b/config
@@ -636,7 +636,14 @@ case "$GUESSOS" in
else
OUT="linux-x86_64"
fi ;;
- *86-*-linux2) OUT="linux-elf" ;;
+ *86-*-linux2)
+ # On machines where the compiler understands -m32, prefer a
+ # config target that uses it
+ if $CC -m32 -E -x c /dev/null > /dev/null 2>&1; then
+ OUT="linux-x86"
+ else
+ OUT="linux-elf"
+ fi ;;
*86-*-linux1) OUT="linux-aout" ;;
*-*-linux?) OUT="linux-generic32" ;;
sun4[uv]*-*-solaris2)