Commit 0d24f4d1 by Zack Weinberg

Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or except.h.

	* Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or
	except.h.  Remove commands to define USING_SJLJ_EXCEPTIONS.
	(cppinit.o): Depend on except.h.
	(gencheck.h, options.h, specs.h, s-gencheck, s-options,
	s-specs): New rules.

	* configure.in: Don't AC_DEFINE_UNQUOTED PACKAGE or VERSION.
	Don't create specs.h/options.h/gencheck.h here.  Remove
	unnecessary variable settings from last argument of AC_OUTPUT.
	* config.in, configure: Regenerate.
	* intl.c: Hardcode package name as "gcc".

	* cppinit.c: Include except.h.
	(builtin_array): Define __USING_SJLJ_EXCEPTIONS__ when
	appropriate.
	* unwind-dw2.c, unwind-sjlj.c, config/ia64/unwind-ia64.c:
	Use #if(n)def __USING_SJLJ_EXCEPTIONS, not #if
	(!)USING_SJLJ_EXCEPTIONS.
	* doc/cpp.texi: Document __USING_SJLJ_EXCEPTIONS__.

From-SVN: r48651
parent ed722f66
...@@ -839,19 +839,10 @@ cs-hconfig.h: Makefile ...@@ -839,19 +839,10 @@ cs-hconfig.h: Makefile
TARGET_CPU_DEFAULT="$(target_cpu_default)" \ TARGET_CPU_DEFAULT="$(target_cpu_default)" \
$(SHELL) $(srcdir)/mkconfig.sh hconfig.h $(SHELL) $(srcdir)/mkconfig.sh hconfig.h
cs-tconfig.h: Makefile $(CONFIG_H) except.h cs-tconfig.h: Makefile
HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \ HEADERS="$(xm_file)" DEFINES="$(xm_defines)" \
TARGET_CPU_DEFAULT="" \ TARGET_CPU_DEFAULT="" \
$(SHELL) $(srcdir)/mkconfig.sh tconfig.h $(SHELL) $(srcdir)/mkconfig.sh tconfig.h
# ??? Need extra help to get this definition copied to where libgcc can
# see it. It shouldn't matter which compiler we use to get there.
echo '#include "config.h"' > conftest.c
echo '#include "except.h"' >> conftest.c
echo 'xyzzy USING_SJLJ_EXCEPTIONS' >> conftest.c
$(HOST_CC) -E conftest.c $(ALL_CFLAGS) $(INCLUDES) > conftest.out
sed -e 's/xyzzy/#define USING_SJLJ_EXCEPTIONS/' -e '/#define/p' \
-e d conftest.out >> tconfig.h
rm conftest.*
cs-tm_p.h: Makefile cs-tm_p.h: Makefile
HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \ HEADERS="$(tm_p_file)" DEFINES="" TARGET_CPU_DEFAULT="" \
...@@ -1273,6 +1264,30 @@ gencheck.o : gencheck.c gencheck.h tree.def $(HCONFIG_H) $(SYSTEM_H) \ ...@@ -1273,6 +1264,30 @@ gencheck.o : gencheck.c gencheck.h tree.def $(HCONFIG_H) $(SYSTEM_H) \
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \ $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
$(srcdir)/gencheck.c $(OUTPUT_OPTION) $(srcdir)/gencheck.c $(OUTPUT_OPTION)
gencheck.h : s-gencheck ; @true
s-gencheck : Makefile
for t in $(lang_tree_files); do \
echo "#include \"$$t\""; \
done | sed 's|$(srcdir)/||' > tmp-gencheck.h
$(SHELL) $(srcdir)/move-if-change tmp-gencheck.h gencheck.h
$(STAMP) s-gencheck
options.h : s-options ; @true
s-options : Makefile
for t in $(lang_options_files); do \
echo "#include \"$$t\""; \
done | sed 's|$(srcdir)/||' > tmp-options.h
$(SHELL) $(srcdir)/move-if-change tmp-options.h options.h
$(STAMP) s-options
specs.h : s-specs ; @true
s-specs : Makefile
for t in $(lang_specs_files); do \
echo "#include \"$$t\""; \
done | sed 's|$(srcdir)/||' > tmp-specs.h
$(SHELL) $(srcdir)/move-if-change tmp-specs.h specs.h
$(STAMP) s-specs
dumpvers: dumpvers.c dumpvers: dumpvers.c
version.o: version.c version.h version.o: version.c version.h
...@@ -1964,7 +1979,7 @@ cpplib.o: cpplib.c $(CONFIG_H) $(LIBCPP_DEPS) ...@@ -1964,7 +1979,7 @@ cpplib.o: cpplib.c $(CONFIG_H) $(LIBCPP_DEPS)
cpphash.o: cpphash.c $(CONFIG_H) $(LIBCPP_DEPS) cpphash.o: cpphash.c $(CONFIG_H) $(LIBCPP_DEPS)
cppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(SPLAY_TREE_H) mkdeps.h cppfiles.o: cppfiles.c $(CONFIG_H) $(LIBCPP_DEPS) $(SPLAY_TREE_H) mkdeps.h
cppinit.o: cppinit.c $(CONFIG_H) $(LIBCPP_DEPS) cppdefault.h \ cppinit.o: cppinit.c $(CONFIG_H) $(LIBCPP_DEPS) cppdefault.h \
mkdeps.h prefix.h version.h mkdeps.h prefix.h version.h except.h
cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) cppdefault.h Makefile cppdefault.o: cppdefault.c $(CONFIG_H) $(SYSTEM_H) cppdefault.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
......
/* config.in. Generated automatically from configure.in by autoheader. */ /* config.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if using alloca.c. */ /* Define if using alloca.c. */
#undef C_ALLOCA #undef C_ALLOCA
...@@ -468,12 +468,6 @@ ...@@ -468,12 +468,6 @@
/* Define if host mkdir takes a single argument. */ /* Define if host mkdir takes a single argument. */
#undef MKDIR_TAKES_ONE_ARG #undef MKDIR_TAKES_ONE_ARG
/* Define to the name of the distribution. */
#undef PACKAGE
/* Define to the version of the distribution. */
#undef VERSION
/* Define if you have the iconv() function. */ /* Define if you have the iconv() function. */
#undef HAVE_ICONV #undef HAVE_ICONV
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "unwind.h" #include "unwind.h"
#include "unwind-ia64.h" #include "unwind-ia64.h"
#if !USING_SJLJ_EXCEPTIONS #ifndef __USING_SJLJ_EXCEPTIONS__
#define UNW_VER(x) ((x) >> 48) #define UNW_VER(x) ((x) >> 48)
#define UNW_FLAG_MASK 0x0000ffff00000000 #define UNW_FLAG_MASK 0x0000ffff00000000
#define UNW_FLAG_OSMASK 0x0000f00000000000 #define UNW_FLAG_OSMASK 0x0000f00000000000
......
...@@ -908,10 +908,6 @@ changequote([,])dnl ...@@ -908,10 +908,6 @@ changequote([,])dnl
# Internationalization # Internationalization
PACKAGE=gcc PACKAGE=gcc
VERSION="$gcc_version" VERSION="$gcc_version"
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
[Define to the name of the distribution.])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
[Define to the version of the distribution.])
AC_SUBST(PACKAGE) AC_SUBST(PACKAGE)
AC_SUBST(VERSION) AC_SUBST(VERSION)
...@@ -2140,21 +2136,16 @@ AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj, ...@@ -2140,21 +2136,16 @@ AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj,
lang_specs_files= lang_specs_files=
lang_options_files= lang_options_files=
lang_tree_files= lang_tree_files=
rm -f specs.h options.h gencheck.h
touch specs.h options.h gencheck.h
for subdir in . $subdirs for subdir in . $subdirs
do do
if test -f $srcdir/$subdir/lang-specs.h; then if test -f $srcdir/$subdir/lang-specs.h; then
echo "#include \"$subdir/lang-specs.h\"" >>specs.h lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
fi fi
if test -f $srcdir/$subdir/lang-options.h; then if test -f $srcdir/$subdir/lang-options.h; then
echo "#include \"$subdir/lang-options.h\"" >>options.h lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
fi fi
if test -f $srcdir/$subdir/$subdir-tree.def; then if test -f $srcdir/$subdir/$subdir-tree.def; then
echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
fi fi
done done
...@@ -2464,35 +2455,7 @@ if test -f intl/libintl.h; then ...@@ -2464,35 +2455,7 @@ if test -f intl/libintl.h; then
echo creating libintl.h echo creating libintl.h
echo '#include "intl/libintl.h"' >libintl.h echo '#include "intl/libintl.h"' >libintl.h
fi fi
], ],
[ [subdirs='$subdirs'
host='${host}' symbolic_link='$symbolic_link'
build='${build}'
target='${target}'
target_alias='${target_alias}'
srcdir='${srcdir}'
subdirs='${subdirs}'
symbolic_link='${symbolic_link}'
program_transform_set='${program_transform_set}'
program_transform_name='${program_transform_name}'
dep_host_xmake_file='${dep_host_xmake_file}'
host_xmake_file='${host_xmake_file}'
dep_tmake_file='${dep_tmake_file}'
tmake_file='${tmake_file}'
thread_file='${thread_file}'
gcc_config_arguments='${gcc_config_arguments}'
gcc_version='${gcc_version}'
gcc_version_full='${gcc_version_full}'
gcc_version_trigger='${gcc_version_trigger}'
local_prefix='${local_prefix}'
build_install_headers_dir='${build_install_headers_dir}'
build_exeext='${build_exeext}'
host_exeext='${host_exeext}'
out_file='${out_file}'
gdb_needs_out_file_path='${gdb_needs_out_file_path}'
SET_MAKE='${SET_MAKE}'
target_list='${target_list}'
target_overrides='${target_overrides}'
host_overrides='${host_overrides}'
cpp_install_dir='${cpp_install_dir}'
]) ])
...@@ -28,6 +28,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ...@@ -28,6 +28,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "version.h" #include "version.h"
#include "mkdeps.h" #include "mkdeps.h"
#include "cppdefault.h" #include "cppdefault.h"
#include "except.h" /* for USING_SJLJ_EXCEPTIONS */
/* Predefined symbols, built-in macros, and the default include path. */ /* Predefined symbols, built-in macros, and the default include path. */
...@@ -641,6 +642,10 @@ static const struct builtin builtin_array[] = ...@@ -641,6 +642,10 @@ static const struct builtin builtin_array[] =
X("__USER_LABEL_PREFIX__", ULP), X("__USER_LABEL_PREFIX__", ULP),
C("__REGISTER_PREFIX__", REGISTER_PREFIX), C("__REGISTER_PREFIX__", REGISTER_PREFIX),
C("__HAVE_BUILTIN_SETJMP__", "1"), C("__HAVE_BUILTIN_SETJMP__", "1"),
#if USING_SJLJ_EXCEPTIONS
/* libgcc needs to know this. */
C("__USING_SJLJ_EXCEPTIONS__","1"),
#endif
#ifndef NO_BUILTIN_SIZE_TYPE #ifndef NO_BUILTIN_SIZE_TYPE
C("__SIZE_TYPE__", SIZE_TYPE), C("__SIZE_TYPE__", SIZE_TYPE),
#endif #endif
......
...@@ -1975,6 +1975,10 @@ typedefs, respectively. They exist to make the standard header files ...@@ -1975,6 +1975,10 @@ typedefs, respectively. They exist to make the standard header files
these macros directly; instead, include the appropriate headers and use these macros directly; instead, include the appropriate headers and use
the typedefs. the typedefs.
@item __USING_SJLJ_EXCEPTIONS__
This macro is defined, with value 1, if the compiler uses the old
mechanism based on @code{setjmp} and @code{longjmp} for exception
handling.
@end table @end table
@node System-specific Predefined Macros @node System-specific Predefined Macros
......
...@@ -39,8 +39,8 @@ gcc_init_libintl () ...@@ -39,8 +39,8 @@ gcc_init_libintl ()
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
#endif #endif
(void) bindtextdomain (PACKAGE, LOCALEDIR); (void) bindtextdomain ("gcc", LOCALEDIR);
(void) textdomain (PACKAGE); (void) textdomain ("gcc");
} }
#endif #endif
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "gthr.h" #include "gthr.h"
#if !USING_SJLJ_EXCEPTIONS #ifndef __USING_SJLJ_EXCEPTIONS__
#ifndef STACK_GROWS_DOWNWARD #ifndef STACK_GROWS_DOWNWARD
#define STACK_GROWS_DOWNWARD 0 #define STACK_GROWS_DOWNWARD 0
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "unwind.h" #include "unwind.h"
#include "gthr.h" #include "gthr.h"
#if USING_SJLJ_EXCEPTIONS #ifdef __USING_SJLJ_EXCEPTIONS__
#ifdef DONT_USE_BUILTIN_SETJMP #ifdef DONT_USE_BUILTIN_SETJMP
#ifndef inhibit_libc #ifndef inhibit_libc
......
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