Makefile.in (cs-tconfig.h): Pass USED_FOR_TARGET to mkconfig.sh

* Makefile.in (cs-tconfig.h): Pass USED_FOR_TARGET to mkconfig.sh
	* aclocal.m4 (GCC_TARGET_TEMPLATE, AH_TEMPLATE): New.
	* configure.ac (enable_checking): Fix typos in runtime_checking.
	(ENABLE_RUNTIME_CHECKING): Mark as target template.
	(xm_file): Prepend auto-host.h
	(HAVE_GAS_HIDDEN, HAVE_LD_EH_FRAME_HDR): Mark as target template.
	* mkconfig.sh: Do not automatically define USED_FOR_TARGET in
	tconfig.h.
	* crtstuff.c: Do not include auto-host.h.
	(IN_LIBGCC2): Do not define.
	* gcov-io.h: Include tconfig.h, not auto-host.h.
	* libgcc2.c: Do not include auto-host.h.
	(abort): Do not undefine.
	* libgcov.c: Remove unneeded comment about config.h.
	* unwind-dw2-fde-glibc.c: Do not inlude auto-host.h.
	* config.in, configure: Regenerated.

Co-Authored-By: Paolo Bonzini <bonzini@gnu.org>

From-SVN: r99386
This commit is contained in:
Nathan Sidwell 2005-05-08 10:13:19 +00:00 committed by Nathan Sidwell
parent 56daab84ad
commit 232b67d9f8
12 changed files with 685 additions and 46 deletions

View File

@ -1,3 +1,23 @@
2005-05-08 Nathan Sidwell <nathan@codesourcery.com>
Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (cs-tconfig.h): Pass USED_FOR_TARGET to mkconfig.sh
* aclocal.m4 (GCC_TARGET_TEMPLATE, AH_TEMPLATE): New.
* configure.ac (enable_checking): Fix typos in runtime_checking.
(ENABLE_RUNTIME_CHECKING): Mark as target template.
(xm_file): Prepend auto-host.h
(HAVE_GAS_HIDDEN, HAVE_LD_EH_FRAME_HDR): Mark as target template.
* mkconfig.sh: Do not automatically define USED_FOR_TARGET in
tconfig.h.
* crtstuff.c: Do not include auto-host.h.
(IN_LIBGCC2): Do not define.
* gcov-io.h: Include tconfig.h, not auto-host.h.
* libgcc2.c: Do not include auto-host.h.
(abort): Do not undefine.
* libgcov.c: Remove unneeded comment about config.h.
* unwind-dw2-fde-glibc.c: Do not inlude auto-host.h.
* config.in, configure: Regenerated.
2005-05-08 Nathan Sidwell <nathan@codesourcery.com>
Falk Hueffner <falk@debian.org>

View File

@ -1086,7 +1086,7 @@ cs-bconfig.h: Makefile
cs-tconfig.h: Makefile
TARGET_CPU_DEFAULT="" \
HEADERS="$(xm_include_list)" DEFINES="$(xm_defines)" \
HEADERS="$(xm_include_list)" DEFINES="USED_FOR_TARGET $(xm_defines)" \
$(SHELL) $(srcdir)/mkconfig.sh tconfig.h
cs-tm.h: Makefile

22
gcc/aclocal.m4 vendored
View File

@ -654,3 +654,25 @@ AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
dnl GCC_TARGET_TEMPLATE(KEY)
dnl ------------------------
dnl Define KEY as a valid configure key on the target machine.
m4_define([GCC_TARGET_TEMPLATE],
[m4_define([GCC_TARGET_TEMPLATE($1)],[])])
dnl AH_TEMPLATE(KEY, DESCRIPTION)
dnl -----------------------------
dnl Issue an autoheader template for KEY, i.e., a comment composed of
dnl DESCRIPTION (properly wrapped), and then #undef KEY. Redefinition
dnl of the macro in autoheader.m4, to support definition of only a few
dnl keys while compiling target libraries.
m4_define([AH_TEMPLATE],
[AH_VERBATIM([$1],m4_text_wrap([$2 */], [ ], [/* ])
m4_ifdef([GCC_TARGET_TEMPLATE($1)],[],[#ifndef USED_FOR_TARGET
])[#undef $1]m4_ifdef([GCC_TARGET_TEMPLATE($1)],[],[
#endif
]))])

File diff suppressed because it is too large Load Diff

11
gcc/configure vendored
View File

@ -6292,12 +6292,12 @@ do
yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_fold_checking= ; ac_gc_checking=1 ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
ac_tree_checking=1 ; ac_valgrind_checking= ;;
no|none) ac_assert_checking= ; ac_checking= ;
ac_fold_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_chacking= ;
ac_rtlflag_checking= ; ac_runtime_checking= ;
ac_tree_checking= ; ac_valgrind_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
ac_fold_checking=1 ; ac_gc_checking=1 ;
@ -6344,6 +6344,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
if test x$ac_runtime_checking != x ; then
cat >>confdefs.h <<\_ACEOF
@ -7399,7 +7400,7 @@ if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
echo "configure:7402: version of makeinfo is $ac_prog_version" >&5
echo "configure:7403: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[2-9]*)
@ -12256,7 +12257,7 @@ host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
# put this back in temporarily.
xm_file="ansidecl.h ${xm_file}"
xm_file="auto-host.h ansidecl.h ${xm_file}"
# --------
# UNSORTED
@ -13394,6 +13395,7 @@ echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5
echo "${ECHO_T}$gcc_cv_ld_hidden" >&6
libgcc_visibility=no
if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
libgcc_visibility=yes
@ -15001,6 +15003,7 @@ elif test x$gcc_cv_ld != x; then
gcc_cv_ld_eh_frame_hdr=yes
fi
fi
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
cat >>confdefs.h <<\_ACEOF

View File

@ -421,12 +421,12 @@ do
yes) ac_assert_checking=1 ; ac_checking=1 ;
ac_fold_checking= ; ac_gc_checking=1 ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
ac_tree_checking=1 ; ac_valgrind_checking= ;;
no|none) ac_assert_checking= ; ac_checking= ;
ac_fold_checking= ; ac_gc_checking= ;
ac_gc_always_collect= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_chacking= ;
ac_rtlflag_checking= ; ac_runtime_checking= ;
ac_tree_checking= ; ac_valgrind_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
ac_fold_checking=1 ; ac_gc_checking=1 ;
@ -466,6 +466,7 @@ if test x$ac_assert_checking != x ; then
AC_DEFINE(ENABLE_ASSERT_CHECKING, 1,
[Define if you want assertions enabled. This is a cheap check.])
fi
GCC_TARGET_TEMPLATE(ENABLE_RUNTIME_CHECKING)
if test x$ac_runtime_checking != x ; then
AC_DEFINE(ENABLE_RUNTIME_CHECKING, 1,
[Define if you want runtime assertions enabled. This is a cheap check.])
@ -1402,7 +1403,7 @@ host_xm_file="auto-host.h ansidecl.h ${host_xm_file}"
build_xm_file="${build_auto} ansidecl.h ${build_xm_file}"
# We don't want ansidecl.h in target files, write code there in ISO/GNU C.
# put this back in temporarily.
xm_file="ansidecl.h ${xm_file}"
xm_file="auto-host.h ansidecl.h ${xm_file}"
# --------
# UNSORTED
@ -2140,6 +2141,7 @@ changequote([,])dnl
fi])
libgcc_visibility=no
AC_SUBST(libgcc_visibility)
GCC_TARGET_TEMPLATE([HAVE_GAS_HIDDEN])
if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then
libgcc_visibility=yes
AC_DEFINE(HAVE_GAS_HIDDEN, 1,
@ -2951,6 +2953,7 @@ elif test x$gcc_cv_ld != x; then
gcc_cv_ld_eh_frame_hdr=yes
fi
fi
GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR])
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
[Define if your linker supports --eh-frame-hdr option.])

View File

@ -51,15 +51,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
This file must be compiled with gcc. */
/* It is incorrect to include config.h here, because this file is being
compiled for the target, and hence definitions concerning only the host
do not apply. */
#define IN_LIBGCC2
/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
supposedly valid even though this is a "target" file. */
#include "auto-host.h"
#include "tconfig.h"
#include "tsystem.h"
#include "coretypes.h"

View File

@ -232,7 +232,7 @@ typedef HOST_WIDEST_INT gcov_type;
is not also used in a DSO. */
#if IN_LIBGCOV
#include "auto-host.h" /* for HAVE_GAS_HIDDEN */
#include "tconfig.h"
#define gcov_var __gcov_var
#define gcov_open __gcov_open

View File

@ -29,24 +29,11 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is
supposedly valid even though this is a "target" file. */
#include "auto-host.h"
/* It is incorrect to include config.h here, because this file is being
compiled for the target, and hence definitions concerning only the host
do not apply. */
#include "tconfig.h"
#include "tsystem.h"
#include "coretypes.h"
#include "tm.h"
/* Don't use `fancy_abort' here even if config.h says to use it. */
#ifdef abort
#undef abort
#endif
#ifdef HAVE_GAS_HIDDEN
#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))
#else

View File

@ -29,10 +29,6 @@ along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* It is incorrect to include config.h here, because this file is being
compiled for the target, and hence definitions concerning only the host
do not apply. */
#include "tconfig.h"
#include "tsystem.h"
#include "coretypes.h"

View File

@ -54,7 +54,7 @@ for def in $DEFINES; do
echo "#endif" >> ${output}T
done
# The first entry in HEADERS may be auto-host.h or auto-build.h;
# The first entry in HEADERS may be auto-FOO.h ;
# it wants to be included even when not -DIN_GCC.
if [ -n "$HEADERS" ]; then
set $HEADERS
@ -72,17 +72,11 @@ if [ -n "$HEADERS" ]; then
fi
fi
# If this is tconfig.h, now define USED_FOR_TARGET. If this is tm.h,
# now include insn-constants.h and insn-flags.h only if IN_GCC is
# defined but neither GENERATOR_FILE nor USED_FOR_TARGET is defined.
# (Much of this is temporary.)
# If this is tm.h, now include insn-constants.h and insn-flags.h only
# if IN_GCC is defined but neither GENERATOR_FILE nor USED_FOR_TARGET
# is defined. (Much of this is temporary.)
case $output in
tconfig.h )
cat >> ${output}T <<EOF
#define USED_FOR_TARGET
EOF
;;
tm.h )
cat >> ${output}T <<EOF
#if defined IN_GCC && !defined GENERATOR_FILE && !defined USED_FOR_TARGET

View File

@ -33,7 +33,6 @@
#define _GNU_SOURCE 1
#endif
#include "auto-host.h" /* For HAVE_LD_EH_FRAME_HDR. */
#include "tconfig.h"
#include "tsystem.h"
#ifndef inhibit_libc