Commit 1713a69f by Eric Botcazou Committed by Eric Botcazou

re PR other/7956 (unreadable error on -m64 with --disable-multilib)

	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
parent c96f4f73
2003-12-20 Eric Botcazou <ebotcazou@libertysurf.fr> 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 PR c/12085
* c-typeck.c (build_function_call): Issue a warning if a * c-typeck.c (build_function_call): Issue a warning if a
function is called through an incompatible prototype and function is called through an incompatible prototype and
......
...@@ -149,11 +149,27 @@ ...@@ -149,11 +149,27 @@
#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
#undef LINK_ARCH_SPEC #undef LINK_ARCH_SPEC
#if DISABLE_MULTILIB
#if DEFAULT_ARCH32_P
#define LINK_ARCH_SPEC "\ #define LINK_ARCH_SPEC "\
%{m32:%(link_arch32)} \ %{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)} \ %{m64:%(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \ %{!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 \ #define LINK_ARCH_DEFAULT_SPEC \
(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC) (DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
......
...@@ -10,9 +10,25 @@ ...@@ -10,9 +10,25 @@
LINK_ARCH64_SPEC_BASE "%{!static: -rpath-link %R/usr/lib/sparcv9}" LINK_ARCH64_SPEC_BASE "%{!static: -rpath-link %R/usr/lib/sparcv9}"
#undef LINK_ARCH_SPEC #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 "\ #define LINK_ARCH_SPEC "\
%{m32:-m elf32_sparc %(link_arch32)} \ %{m32:-m elf32_sparc %(link_arch32)} \
%{m64:-m elf64_sparc %(link_arch64)} \ %{m64:-m elf64_sparc %(link_arch64)} \
%{!m32:%{!m64:%(link_arch_default)}} \ %{!m32:%{!m64:%(link_arch_default)}} \
" "
#endif
...@@ -73,6 +73,7 @@ compilation is specified by a string called a "spec". */ ...@@ -73,6 +73,7 @@ compilation is specified by a string called a "spec". */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "multilib.h" /* before tm.h */
#include "tm.h" #include "tm.h"
#include <signal.h> #include <signal.h>
#if ! defined( SIGCHLD ) && defined( SIGCLD ) #if ! defined( SIGCHLD ) && defined( SIGCLD )
...@@ -791,7 +792,6 @@ static const char *multilib_select; ...@@ -791,7 +792,6 @@ static const char *multilib_select;
static const char *multilib_matches; static const char *multilib_matches;
static const char *multilib_defaults; static const char *multilib_defaults;
static const char *multilib_exclusions; static const char *multilib_exclusions;
#include "multilib.h"
/* Check whether a particular argument is a default argument. */ /* Check whether a particular argument is a default argument. */
......
...@@ -323,6 +323,7 @@ for combo in ${combinations}; do ...@@ -323,6 +323,7 @@ for combo in ${combinations}; do
osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'` osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'`
if [ "x${enable_multilib}" != xyes ]; then if [ "x${enable_multilib}" != xyes ]; then
dirout=".:${osdirout}" dirout=".:${osdirout}"
disable_multilib=yes
else else
case "${osdirout}" in case "${osdirout}" in
!*) !*)
...@@ -403,6 +404,12 @@ moptions=`echo ${options} | sed -e 's,[ ][ ]*, ,g'` ...@@ -403,6 +404,12 @@ moptions=`echo ${options} | sed -e 's,[ ][ ]*, ,g'`
echo "" echo ""
echo "static const char *multilib_options = \"${moptions}\";" 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 .. cd ..
rm -r tmpmultilib.$$ rm -r tmpmultilib.$$
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment