OSDN Git Service

PR other/7956
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Dec 2003 07:40:24 +0000 (07:40 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Dec 2003 07:40:24 +0000 (07:40 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74875 138bc75d-0d04-0410-961f-82ee72b054a4

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

index a61b493..c7f9559 100644 (file)
@@ -1,5 +1,16 @@
 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
        * c-typeck.c (build_function_call): Issue a warning if a
        function is called through an incompatible prototype and
index 369c1ac..0a76374 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 26cf24c..aa9a40b 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 5832c48..321ffa3 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 b5ffa9d..3cac4e9 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.$$