* 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
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
#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)
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
#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 )
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. */
osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'`
if [ "x${enable_multilib}" != xyes ]; then
dirout=".:${osdirout}"
+ disable_multilib=yes
else
case "${osdirout}" in
!*)
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.$$