diff options
Diffstat (limited to 'gcc/gcc.cc')
-rw-r--r-- | gcc/gcc.cc | 98 |
1 files changed, 18 insertions, 80 deletions
@@ -45,6 +45,7 @@ compilation is specified by a string called a "spec". */ #include "filenames.h" #include "spellcheck.h" #include "opts-jobserver.h" +#include "common/common-target.h" @@ -830,21 +831,11 @@ proper position among the other output files. */ #define LINK_COMPRESS_DEBUG_SPEC \ " %{gz*:%e-gz is not supported in this configuration} " #elif HAVE_LD_COMPRESS_DEBUG == 1 -/* GNU style on input, GNU ld options. Reject, not useful. */ -#define LINK_COMPRESS_DEBUG_SPEC \ - " %{gz*:%e-gz is not supported in this configuration} " -#elif HAVE_LD_COMPRESS_DEBUG == 2 -/* GNU style, GNU gold options. */ -#define LINK_COMPRESS_DEBUG_SPEC \ - " %{gz|gz=zlib-gnu:" LD_COMPRESS_DEBUG_OPTION "=zlib}" \ - " %{gz=none:" LD_COMPRESS_DEBUG_OPTION "=none}" \ - " %{gz=zlib:%e-gz=zlib is not supported in this configuration} " -#elif HAVE_LD_COMPRESS_DEBUG == 3 /* ELF gABI style. */ #define LINK_COMPRESS_DEBUG_SPEC \ " %{gz|gz=zlib:" LD_COMPRESS_DEBUG_OPTION "=zlib}" \ " %{gz=none:" LD_COMPRESS_DEBUG_OPTION "=none}" \ - " %{gz=zlib-gnu:" LD_COMPRESS_DEBUG_OPTION "=zlib-gnu} " + " %{gz=zlib-gnu:}" /* Ignore silently zlib-gnu option value. */ #else #error Unknown value for HAVE_LD_COMPRESS_DEBUG. #endif @@ -884,31 +875,25 @@ proper position among the other output files. */ #endif /* Assembler options for compressed debug sections. */ -#if HAVE_LD_COMPRESS_DEBUG < 2 +#if HAVE_LD_COMPRESS_DEBUG == 0 /* Reject if the linker cannot write compressed debug sections. */ #define ASM_COMPRESS_DEBUG_SPEC \ " %{gz*:%e-gz is not supported in this configuration} " -#else /* HAVE_LD_COMPRESS_DEBUG >= 2 */ +#else /* HAVE_LD_COMPRESS_DEBUG >= 1 */ #if HAVE_AS_COMPRESS_DEBUG == 0 /* No assembler support. Ignore silently. */ #define ASM_COMPRESS_DEBUG_SPEC \ " %{gz*:} " #elif HAVE_AS_COMPRESS_DEBUG == 1 -/* GNU style, GNU as options. */ -#define ASM_COMPRESS_DEBUG_SPEC \ - " %{gz|gz=zlib-gnu:" AS_COMPRESS_DEBUG_OPTION "}" \ - " %{gz=none:" AS_NO_COMPRESS_DEBUG_OPTION "}" \ - " %{gz=zlib:%e-gz=zlib is not supported in this configuration} " -#elif HAVE_AS_COMPRESS_DEBUG == 2 /* ELF gABI style. */ #define ASM_COMPRESS_DEBUG_SPEC \ " %{gz|gz=zlib:" AS_COMPRESS_DEBUG_OPTION "=zlib}" \ " %{gz=none:" AS_COMPRESS_DEBUG_OPTION "=none}" \ - " %{gz=zlib-gnu:" AS_COMPRESS_DEBUG_OPTION "=zlib-gnu} " + " %{gz=zlib-gnu:}" /* Ignore silently zlib-gnu option value. */ #else #error Unknown value for HAVE_AS_COMPRESS_DEBUG. #endif -#endif /* HAVE_LD_COMPRESS_DEBUG >= 2 */ +#endif /* HAVE_LD_COMPRESS_DEBUG >= 1 */ /* Define ASM_DEBUG_SPEC to be a spec suitable for translating '-g' to the assembler, when compiling assembly sources only. */ @@ -927,26 +912,11 @@ proper position among the other output files. */ # else # define ASM_DEBUG_DWARF_OPTION "--gdwarf2" # endif -# if defined(DBX_DEBUGGING_INFO) && defined(DWARF2_DEBUGGING_INFO) \ - && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) && defined(HAVE_AS_GSTABS_DEBUG_FLAG) -# define ASM_DEBUG_SPEC \ - (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG \ - ? "%{%:debug-level-gt(0):" \ - "%{gdwarf*:" ASM_DEBUG_DWARF_OPTION "};" \ - ":%{g*:--gstabs}}" ASM_MAP \ - : "%{%:debug-level-gt(0):" \ - "%{gstabs*:--gstabs;" \ - ":%{g*:" ASM_DEBUG_DWARF_OPTION "}}}" ASM_MAP) -# else -# if defined(DBX_DEBUGGING_INFO) && defined(HAVE_AS_GSTABS_DEBUG_FLAG) -# define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):--gstabs}}" ASM_MAP -# endif # if defined(DWARF2_DEBUGGING_INFO) && defined(HAVE_AS_GDWARF2_DEBUG_FLAG) # define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):" \ ASM_DEBUG_DWARF_OPTION "}}" ASM_MAP # endif # endif -#endif #ifndef ASM_DEBUG_SPEC # define ASM_DEBUG_SPEC "" #endif @@ -960,14 +930,7 @@ proper position among the other output files. */ "%:dwarf-version-gt(3):--gdwarf-4 ;" \ "%:dwarf-version-gt(2):--gdwarf-3 ;" \ ":--gdwarf2 }" -# if defined(DBX_DEBUGGING_INFO) && defined(DWARF2_DEBUGGING_INFO) -# define ASM_DEBUG_OPTION_SPEC \ - (PREFERRED_DEBUGGING_TYPE == DBX_DEBUG \ - ? "%{%:debug-level-gt(0):" \ - "%{gdwarf*:" ASM_DEBUG_OPTION_DWARF_OPT "}}" \ - : "%{%:debug-level-gt(0):" \ - "%{!gstabs*:%{g*:" ASM_DEBUG_OPTION_DWARF_OPT "}}}") -# elif defined(DWARF2_DEBUGGING_INFO) +# if defined(DWARF2_DEBUGGING_INFO) # define ASM_DEBUG_OPTION_SPEC "%{g*:%{%:debug-level-gt(0):" \ ASM_DEBUG_OPTION_DWARF_OPT "}}" # endif @@ -3585,42 +3548,6 @@ execute (void) } } -/* Find all the switches given to us - and make a vector describing them. - The elements of the vector are strings, one per switch given. - If a switch uses following arguments, then the `part1' field - is the switch itself and the `args' field - is a null-terminated vector containing the following arguments. - Bits in the `live_cond' field are: - SWITCH_LIVE to indicate this switch is true in a conditional spec. - SWITCH_FALSE to indicate this switch is overridden by a later switch. - SWITCH_IGNORE to indicate this switch should be ignored (used in %<S). - SWITCH_IGNORE_PERMANENTLY to indicate this switch should be ignored. - SWITCH_KEEP_FOR_GCC to indicate that this switch, otherwise ignored, - should be included in COLLECT_GCC_OPTIONS. - in all do_spec calls afterwards. Used for %<S from self specs. - The `known' field describes whether this is an internal switch. - The `validated' field describes whether any spec has looked at this switch; - if it remains false at the end of the run, the switch must be meaningless. - The `ordering' field is used to temporarily mark switches that have to be - kept in a specific order. */ - -#define SWITCH_LIVE (1 << 0) -#define SWITCH_FALSE (1 << 1) -#define SWITCH_IGNORE (1 << 2) -#define SWITCH_IGNORE_PERMANENTLY (1 << 3) -#define SWITCH_KEEP_FOR_GCC (1 << 4) - -struct switchstr -{ - const char *part1; - const char **args; - unsigned int live_cond; - bool known; - bool validated; - bool ordering; -}; - static struct switchstr *switches; static int n_switches; @@ -9849,6 +9776,17 @@ set_multilib_dir (void) ++p; } + multilib_dir = + targetm_common.compute_multilib ( + switches, + n_switches, + multilib_dir, + multilib_defaults, + multilib_select, + multilib_matches, + multilib_exclusions, + multilib_reuse); + if (multilib_dir == NULL && multilib_os_dir != NULL && strcmp (multilib_os_dir, ".") == 0) { |