This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH roland/configure-multiarch] Fix multiarch handling in sysdeps generation.


This fixes the treatment of "multiarch" subdirectories in sysdeps
generation to be what it always should have been.  The way it was
done originally was utterly bogus and only happened to work by luck
and simplicity of where we have actually put any multiarch subdirs.

It's essentially another level of submachine type, so it should be tried
everywhere that the machine terms are tried.

I've verified this does not change the actual sysdeps list for x86_64 or
i686.  The one thing that I think is almost certainly affected (or else
is already dead code) is this bizarre directory:
	sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/

No directory like that should ever have existed.  It's not a well-formed
part of the sysdeps hierarchy (OS parts after machine parts should never
happen).  Whatever purpose it's serving ought to be solved some different
way.  Dave, can you figure out what the story is with that and how the
issue its creation was intended to solve is affected by this change/branch?


Thanks,
Roland


2013-01-11  Roland McGrath  <roland@hack.frob.com>

	* configure.in (sysnames): Use $multi_arch_d in setting up $mach list,
	not in the main loop.
	* configure: Regenerated.

--- a/configure
+++ b/configure
@@ -4295,6 +4295,7 @@ if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then
     multi_arch=no
   fi
 fi
+multi_arch_d=
 if test x"$multi_arch" != xno; then
   multi_arch_d=/multiarch
 fi
@@ -4347,11 +4348,16 @@ while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
   set $m
   # Prepend the machine's FPU directory unless --without-fp.
   if test "$with_fp" = yes; then
-    mach="$mach /$1/fpu"
+    maybe_fpu=/fpu
   else
-    mach="$mach /$1/nofpu"
+    maybe_fpu=/nofpu
   fi
-  mach="$mach /$1"
+  # For each machine term, try it with and then without /multiarch.
+  for try_fpu in $maybe_fpu ''; do
+    for try_multi in $multi_arch_d ''; do
+      mach="$mach /$1$try_fpu$try_multi"
+    done
+  done
   tail="$2"
 done
 
@@ -4365,7 +4371,7 @@ for b in $base ''; do
       test "$v" = / && continue
       for o in /$ostry ''; do
 	test "$o" = / && continue
-	for m in $multi_arch_d $mach ''; do
+	for m in $mach ''; do
 	  for d in $add_ons_pfx ''; do
 	    for a in $add_ons_sfx ''; do
 	      try_suffix="$m0$b$v$o$m"
--- a/configure.in
+++ b/configure.in
@@ -633,6 +633,7 @@ if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then
     multi_arch=no
   fi
 fi
+multi_arch_d=
 if test x"$multi_arch" != xno; then
   multi_arch_d=/multiarch
 fi
@@ -686,11 +687,16 @@ while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
   set $m
   # Prepend the machine's FPU directory unless --without-fp.
   if test "$with_fp" = yes; then
-    mach="$mach /$1/fpu"
+    maybe_fpu=/fpu
   else
-    mach="$mach /$1/nofpu"
+    maybe_fpu=/nofpu
   fi
-  mach="$mach /$1"
+  # For each machine term, try it with and then without /multiarch.
+  for try_fpu in $maybe_fpu ''; do
+    for try_multi in $multi_arch_d ''; do
+      mach="$mach /$1$try_fpu$try_multi"
+    done
+  done
   tail="$2"
 done
 
@@ -706,7 +712,7 @@ for b in $base ''; do
       test "$v" = / && continue
       for o in /$ostry ''; do
 	test "$o" = / && continue
-	for m in $multi_arch_d $mach ''; do
+	for m in $mach ''; do
 	  for d in $add_ons_pfx ''; do
 	    for a in $add_ons_sfx ''; do
 	      try_suffix="$m0$b$v$o$m"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]