summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-20 07:40:24 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-20 07:40:24 +0000
commit0a2326d6d6ed56c12e2cf1f458a40d8d43e0c9db (patch)
tree98af3c4457424fafdb93e9226d24dc790395de64 /gcc
parent59798ded393cd850a2bd5de06c99fabd564782f5 (diff)
downloadgcc-0a2326d6d6ed56c12e2cf1f458a40d8d43e0c9db.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/sparc/sol2-bi.h16
-rw-r--r--gcc/config/sparc/sol2-gld-bi.h16
-rw-r--r--gcc/gcc.c2
-rw-r--r--gcc/genmultilib7
5 files changed, 51 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a61b4935d39..c7f9559625e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/sparc/sol2-bi.h b/gcc/config/sparc/sol2-bi.h
index 369c1acde7a..0a763748d85 100644
--- a/gcc/config/sparc/sol2-bi.h
+++ b/gcc/config/sparc/sol2-bi.h
@@ -149,11 +149,27 @@
#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)
diff --git a/gcc/config/sparc/sol2-gld-bi.h b/gcc/config/sparc/sol2-gld-bi.h
index 26cf24c856c..aa9a40bdfcb 100644
--- a/gcc/config/sparc/sol2-gld-bi.h
+++ b/gcc/config/sparc/sol2-gld-bi.h
@@ -10,9 +10,25 @@
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
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 5832c485236..321ffa396f8 100644
--- 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. */
diff --git a/gcc/genmultilib b/gcc/genmultilib
index b5ffa9d4d52..3cac4e9ad7a 100644
--- a/gcc/genmultilib
+++ b/gcc/genmultilib
@@ -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.$$