]> gcc.gnu.org Git - gcc.git/commitdiff
re PR other/7956 (unreadable error on -m64 with --disable-multilib)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sat, 20 Dec 2003 07:40:24 +0000 (08:40 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 20 Dec 2003 07:40:24 +0000 (07:40 +0000)
PR other/7956
* genmultilib: New variable disable_multilib.  Set it to 'yes'
if enable_multilib was set to 'no'.  Emit DISABLE_MULTILIB
if disable_multilib was set to 'yes'.
* gcc.c: Include multilib.h before tm.h.
* config/sparc/sol2-bi.h (LINK_ARCH_SPEC): Emit an error
message for multiarch options if DISABLE_MULTILIB is set.
* config/sparc/sol2-gld-bi.h (LINK_ARCH_SPEC): Likewise.

From-SVN: r74875

gcc/ChangeLog
gcc/config/sparc/sol2-bi.h
gcc/config/sparc/sol2-gld-bi.h
gcc/gcc.c
gcc/genmultilib

index a61b4935d39ff57ac404469bd1b3eb44b472351f..c7f9559625ea5b3876b7b48b3c48b7ca052ab54f 100644 (file)
@@ -1,3 +1,14 @@
+2003-12-20  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR other/7956
+       * genmultilib: New variable disable_multilib.  Set it to 'yes'
+       if enable_multilib was set to 'no'.  Emit DISABLE_MULTILIB
+       if disable_multilib was set to 'yes'.
+       * gcc.c: Include multilib.h before tm.h.
+       * config/sparc/sol2-bi.h (LINK_ARCH_SPEC): Emit an error
+       message for multiarch options if DISABLE_MULTILIB is set.
+       * config/sparc/sol2-gld-bi.h (LINK_ARCH_SPEC): Likewise.
+
 2003-12-20  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR c/12085
index 369c1acde7a8a31d732b71e1d652220fc43c6509..0a763748d854981b0f01378507f1a620dd901bcc 100644 (file)
 #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
 
 #undef LINK_ARCH_SPEC
+#if DISABLE_MULTILIB
+#if DEFAULT_ARCH32_P
 #define LINK_ARCH_SPEC "\
 %{m32:%(link_arch32)} \
+%{m64:%edoes not support multilib} \
+%{!m32:%{!m64:%(link_arch_default)}} \
+"
+#else
+#define LINK_ARCH_SPEC "\
+%{m32:%edoes not support multilib} \
 %{m64:%(link_arch64)} \
 %{!m32:%{!m64:%(link_arch_default)}} \
 "
+#endif
+#else
+#define LINK_ARCH_SPEC "\
+%{m32:%(link_arch32)} \
+%{m64:%(link_arch64)} \
+%{!m32:%{!m64:%(link_arch_default)}} \
+"
+#endif
 
 #define LINK_ARCH_DEFAULT_SPEC \
 (DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
index 26cf24c856c23a037706edb4c72a3e076272946a..aa9a40bdfcb7ed5dfff0c8ffe383f55d9124fd3c 100644 (file)
   LINK_ARCH64_SPEC_BASE "%{!static: -rpath-link %R/usr/lib/sparcv9}"
 
 #undef LINK_ARCH_SPEC
+#if DISABLE_MULTILIB
+#if DEFAULT_ARCH32_P
+#define LINK_ARCH_SPEC "\
+%{m32:-m elf32_sparc %(link_arch32)} \
+%{m64:%edoes not support multilib} \
+%{!m32:%{!m64:%(link_arch_default)}} \
+"
+#else
+#define LINK_ARCH_SPEC "\
+%{m32:%edoes not support multilib} \
+%{m64:-m elf64_sparc %(link_arch64)} \
+%{!m32:%{!m64:%(link_arch_default)}} \
+"
+#endif
+#else
 #define LINK_ARCH_SPEC "\
 %{m32:-m elf32_sparc %(link_arch32)} \
 %{m64:-m elf64_sparc %(link_arch64)} \
 %{!m32:%{!m64:%(link_arch_default)}} \
 "
+#endif
 
index 5832c4852363ad04eb595bdddf4ac4c358731b52..321ffa396f84f745843eafd61083657222a9e4f9 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -73,6 +73,7 @@ compilation is specified by a string called a "spec".  */
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "multilib.h" /* before tm.h */
 #include "tm.h"
 #include <signal.h>
 #if ! defined( SIGCHLD ) && defined( SIGCLD )
@@ -791,7 +792,6 @@ static const char *multilib_select;
 static const char *multilib_matches;
 static const char *multilib_defaults;
 static const char *multilib_exclusions;
-#include "multilib.h"
 
 /* Check whether a particular argument is a default argument.  */
 
index b5ffa9d4d52807dc514576b36e7c4a553bef869e..3cac4e9ad7a2b4938cecce58dc67a8cf5b2725c0 100644 (file)
@@ -323,6 +323,7 @@ for combo in ${combinations}; do
     osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'`
     if [ "x${enable_multilib}" != xyes ]; then
       dirout=".:${osdirout}"
+      disable_multilib=yes
     else
       case "${osdirout}" in
         !*)
@@ -403,6 +404,12 @@ moptions=`echo ${options} | sed -e 's,[    ][      ]*, ,g'`
 echo ""
 echo "static const char *multilib_options = \"${moptions}\";"
 
+# Finally output the disable flag if specified
+if [ "x${disable_multilib}" = xyes ]; then
+  echo ""
+  echo "#define DISABLE_MULTILIB  1"
+fi
+
 cd ..
 rm -r tmpmultilib.$$
 
This page took 0.08031 seconds and 5 git commands to generate.