summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in28
1 files changed, 16 insertions, 12 deletions
diff --git a/configure.in b/configure.in
index 11f57c9f9f..bf2e2b1628 100644
--- a/configure.in
+++ b/configure.in
@@ -147,9 +147,9 @@ mach=
 tail=$machine
 while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
   set $m
-  # If using ELF, look for an `elf' subdirectory of each machine directory.
-  if test "$elf" = yes; then
-    mach="$mach /$1/elf"
+  # Prepend the machine's FPU directory unless --without-fp.
+  if test "$with_fp" = yes; then
+    mach="$mach /$1/fpu"
   fi
   mach="$mach /$1"
   tail="$2"
@@ -187,21 +187,25 @@ fi
 # We have now validated the configuration.
 
 
-# Remove the leading slashes.
-sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
-
-# Prepend the machine's FPU directory unless --without-fp.
-if test "$with_fp" = yes; then
-  fpu_dirs=
+# If using ELF, look for an `elf' subdirectory of each machine directory.
+# We prepend these rather than inserting them whereever the machine appears
+# because things specified by the machine's ELF ABI should override
+# OS-specific things, and should always be the same for any OS on the
+# machine (otherwise what's the point of an ABI?).
+if test "$elf" = yes; then
+  elf_dirs=
   for m in $mach; do
-    if test -d $sysdep_dir$m/fpu; then
-      fpu_dirs="$fpu_dirs $m/fpu"
+    if test -d $sysdep_dir$m/elf; then
+      elf_dirs="$elf_dirs $m/elf"
     fi
   done
-  sysnames="`echo $fpu_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
+  sysnames="`echo $elf_dirs | sed -e 's,^/,,' -e 's, /,,g'` $sysnames"
 fi
 
 
+# Remove the leading slashes.
+sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
+
 
 # Expand the list of system names into a full list of directories
 # from each element's parent name and Implies file (if present).