diff options
author | Richard Sandiford <richard@codesourcery.com> | 2006-03-29 21:29:55 +0000 |
---|---|---|
committer | Richard Sandiford <richard@codesourcery.com> | 2006-03-29 21:29:55 +0000 |
commit | d234b75c8d131f9aac8411666c681a51c398628c (patch) | |
tree | 4a4e8fa5657cad25f9eea1c1b50620c2acdcf983 | |
parent | ddd8d7b1f45dbba9a8ea3ebb29416f5cc5708494 (diff) |
* gcc/configure.ac: Allow $tm_file to contain names of the form ./*.
Look for them in the build directory rather than $srcdir/config.
* gcc/configure: Regenerate.
* gcc/config.gcc (tm_file): Update commentary.
(m68k-*-uclinux*): Add ./sysroot-suffix.h to tm_file.
* gcc/config/m68k/print-sysroot-suffix.sh: New file.
* gcc/config/m68k/t-mlib-matches (sysroot-suffix.h): New rule.
* gcc/config/m68k/t-uclinux (MULTILIB_OPTIONS): Remove -mcpu=5206.
(MULTILIB_DIRNAMES): Update accordingly.
(NATIVE_SYSTEM_HEADER_DIR): Delete.
* gcc/config/m68k/uclinux.h (MULTILIB_DEFAULTS): Delete.
(SYSROOT_SUFFIX_SPEC): Delete.
(SYSROOT_HEADERS_SUFFIX_SPEC): Just undefine; don't redefine.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/coldfire-4_1@112509 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | ChangeLog.csl | 16 | ||||
-rw-r--r-- | gcc/config.gcc | 6 | ||||
-rw-r--r-- | gcc/config/m68k/print-sysroot-suffix.sh | 42 | ||||
-rw-r--r-- | gcc/config/m68k/t-mlib-matches | 7 | ||||
-rw-r--r-- | gcc/config/m68k/t-uclinux | 9 | ||||
-rw-r--r-- | gcc/config/m68k/uclinux.h | 21 | ||||
-rwxr-xr-x | gcc/configure | 5 | ||||
-rw-r--r-- | gcc/configure.ac | 5 |
8 files changed, 85 insertions, 26 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl index 2fd1569db46..4bc6494f8f6 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,5 +1,21 @@ 2006-03-29 Richard Sandiford <richard@codesourcery.com> + * gcc/configure.ac: Allow $tm_file to contain names of the form ./*. + Look for them in the build directory rather than $srcdir/config. + * gcc/configure: Regenerate. + * gcc/config.gcc (tm_file): Update commentary. + (m68k-*-uclinux*): Add ./sysroot-suffix.h to tm_file. + * gcc/config/m68k/print-sysroot-suffix.sh: New file. + * gcc/config/m68k/t-mlib-matches (sysroot-suffix.h): New rule. + * gcc/config/m68k/t-uclinux (MULTILIB_OPTIONS): Remove -mcpu=5206. + (MULTILIB_DIRNAMES): Update accordingly. + (NATIVE_SYSTEM_HEADER_DIR): Delete. + * gcc/config/m68k/uclinux.h (MULTILIB_DEFAULTS): Delete. + (SYSROOT_SUFFIX_SPEC): Delete. + (SYSROOT_HEADERS_SUFFIX_SPEC): Just undefine; don't redefine. + +2006-03-29 Richard Sandiford <richard@codesourcery.com> + * gcc/config.gcc (m68k-*-uclinux*): Reorder includes to match m68k-*-linux. Include linux.h and m68k/linux.h. Include linux.opt and define UCLIBC_DEFAULT. diff --git a/gcc/config.gcc b/gcc/config.gcc index d1b1d348125..2606d8357af 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -63,6 +63,10 @@ # This helps to keep OS specific stuff out of the CPU # defining header ${cpu_type}/${cpu_type.h}. # +# It is possible to include automatically-generated +# build-directory files by prefixing them with "./". +# All other files should relative to $srcdir/config. +# # tm_p_file Location of file with declarations for functions # in $out_file. # @@ -1424,7 +1428,7 @@ m68k*-*-openbsd*) use_collect2=yes ;; m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc - tm_file="m68k/m68k.h dbxelf.h elfos.h svr4.h linux.h flat.h m68k/linux.h m68k/uclinux.h" + tm_file="m68k/m68k.h dbxelf.h elfos.h svr4.h linux.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h" tm_defines="${tm_defines} MOTOROLA USE_GAS UCLIBC_DEFAULT=1" extra_options="${extra_options} linux.opt" tmake_file="m68k/t-uclinux m68k/t-mlib-matches" diff --git a/gcc/config/m68k/print-sysroot-suffix.sh b/gcc/config/m68k/print-sysroot-suffix.sh new file mode 100644 index 00000000000..071d002436f --- /dev/null +++ b/gcc/config/m68k/print-sysroot-suffix.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is part of GCC. + +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Fifth Floor, +# Boston MA 02110-1301, USA. + +# Go through the multilib matches in $matches. For each match of the +# form mcpu?<core>=<option>, check whether the sysroot in $sysroot +# has a subdirectory called m<core>. Use that subdirectory for +# <option> if so. +set -e +spec= +for match +do + case $match in + mcpu[?]*=*) + option=`echo "$match" | sed -e 's/.*=//' -e 's/?/=/g'` + suffix=`echo "$match" | sed -e 's/=.*//' -e 's/cpu?//g'` + if test -d "$sysroot/$suffix"; then + test -z "$spec" || spec="$spec;" + spec="$spec$option:/$suffix" + fi + ;; + esac +done +if test -n "$spec"; then + echo "#undef SYSROOT_SUFFIX_SPEC" + echo "#define SYSROOT_SUFFIX_SPEC \"%{$spec}\"" +fi diff --git a/gcc/config/m68k/t-mlib-matches b/gcc/config/m68k/t-mlib-matches index 6f91ba8e064..d44c4e9d7df 100644 --- a/gcc/config/m68k/t-mlib-matches +++ b/gcc/config/m68k/t-mlib-matches @@ -18,3 +18,10 @@ MULTILIB_MATCHES += $(shell $(AWK) 'BEGIN { FS="([()]|[ ,\t]+)"; ORS=" " } ; /^M MULTILIB_MATCHES += mcpu?5206e=march?isaa mcpu?5207=march?isaaplus \ mcpu?5407=march?isab + +# This rule uses MULTILIB_MATCHES to generate a definition of +# SYSROOT_SUFFIX_SPEC. +sysroot-suffix.h: $(srcdir)/config/m68k/print-sysroot-suffix.sh + sysroot="$(SYSTEM_HEADER_DIR)/../.." \ + $(SHELL) $(srcdir)/config/m68k/print-sysroot-suffix.sh \ + $(patsubst %,'%',$(MULTILIB_MATCHES)) > $@ diff --git a/gcc/config/m68k/t-uclinux b/gcc/config/m68k/t-uclinux index bb672ef00e6..01e631f99b2 100644 --- a/gcc/config/m68k/t-uclinux +++ b/gcc/config/m68k/t-uclinux @@ -15,14 +15,9 @@ xfgnulib.c: $(srcdir)/config/m68k/fpgnulib.c # crti and crtn are provided by uClibc. EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o -MULTILIB_OPTIONS = mcpu=5206/mcpu=5206e/mcpu=5207/mcpu=5211/mcpu=5307/mcpu=532x/mcpu=5407 -MULTILIB_DIRNAMES = m5206 m5206e m5207 m5211 m5307 m532x m5407 +MULTILIB_OPTIONS = mcpu=5206e/mcpu=5207/mcpu=5211/mcpu=5307/mcpu=532x/mcpu=5407 +MULTILIB_DIRNAMES = m5206e m5207 m5211 m5307 m532x m5407 MULTILIB_EXCEPTIONS = -# Arbitrarily pick one of the sysroots to act as the default one -# for fixincludes. Define OTHER_FIXINCLUDES_DIR to the full paths -# of all the other build-time sysroots. -NATIVE_SYSTEM_HEADER_DIR = /m5206/usr/include - LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/m68k/uclinux.h b/gcc/config/m68k/uclinux.h index d70efbf4cee..40e380632c7 100644 --- a/gcc/config/m68k/uclinux.h +++ b/gcc/config/m68k/uclinux.h @@ -39,26 +39,11 @@ Boston, MA 02110-1301, USA. */ } \ while (0) -/* Arbitrarily pick one multilib to be the default. The true default - is enforced by the with_cpu setting in config.gcc. */ -#undef MULTILIB_DEFAULTS -#define MULTILIB_DEFAULTS { "mcpu=5206" } - -#undef SYSROOT_SUFFIX_SPEC -#define SYSROOT_SUFFIX_SPEC \ - "%{mcpu=5206: /m5206 ; \ - mcpu=5206e: /m5206e ; \ - mcpu=5207: /m5207 ; \ - mcpu=5211: /m5211 ; \ - mcpu=5307: /m5307 ; \ - mcpu=532x: /m532x ; \ - mcpu=5407: /m5407}" - -#undef SYSROOT_HEADERS_SUFFIX_SPEC -#define SYSROOT_HEADERS_SUFFIX_SPEC "/m5206" - /* The uclinux binary format relies on relocations against a segment being within that segment. Conservatively apply this rule to individual sections. */ #undef M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P #define M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1 + +/* Undefine linux.h definition. */ +#undef SYSROOT_HEADERS_SUFFIX_SPEC diff --git a/gcc/configure b/gcc/configure index c2074172885..25560e2361b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -12615,6 +12615,11 @@ tm_file_list="options.h" tm_include_list="options.h" for f in $tm_file; do case $f in + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" + tm_include_list="${tm_include_list} $f" + ;; defaults.h ) tm_file_list="${tm_file_list} \$(srcdir)/$f" tm_include_list="${tm_include_list} $f" diff --git a/gcc/configure.ac b/gcc/configure.ac index a8f095ee9f6..0e1acc26ad1 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1567,6 +1567,11 @@ tm_file_list="options.h" tm_include_list="options.h" for f in $tm_file; do case $f in + ./* ) + f=`echo $f | sed 's/^..//'` + tm_file_list="${tm_file_list} $f" + tm_include_list="${tm_include_list} $f" + ;; defaults.h ) tm_file_list="${tm_file_list} \$(srcdir)/$f" tm_include_list="${tm_include_list} $f" |