Commit 9e57d5ca by Benjamin Kosnik Committed by Benjamin Kosnik

acinclude.m4 (GLIBCPP_CHECK_PCH): New.


2003-04-16  Benjamin Kosnik  <bkoz@redhat.com>

        * acinclude.m4 (GLIBCPP_CHECK_PCH): New.
        * aclocal.m4: Regenerated.
        * configure.in: Remove old demangler bits.
        Call pch checks.
        * configure: Regenerate.
        * config.h.in: Regenerate.
        * include/Makefile.am (allstamps): Now allstamped.
        (allcreated): Define this.
        (all-local): Use 'em.
        Conditionally define pch_build, pch_install based on
        GLIBCPP_BUILD_PCH.
        (${pch_output}): New rule.
        (install-pch): New rule.
        (install-headers): New rule.
        (install-data-local): Install headers and conditionally pch.
        * include/Makefile.in: Regenerate.
        * testsuite_flags.in (--build-cxx): Use pch file.

From-SVN: r65717
parent 8cbd5ce0
2003-04-16 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_PCH): New.
* aclocal.m4: Regenerated.
* configure.in: Remove old demangler bits.
Call pch checks.
* configure: Regenerate.
* config.h.in: Regenerate.
* include/Makefile.am (allstamps): Now allstamped.
(allcreated): Define this.
(all-local): Use 'em.
Conditionally define pch_build, pch_install based on
GLIBCPP_BUILD_PCH.
(${pch_output}): New rule.
(install-pch): New rule.
(install-headers): New rule.
(install-data-local): Install headers and conditionally pch.
* include/Makefile.in: Regenerate.
* testsuite_flags.in (--build-cxx): Use pch file.
2003-04-16 Jonathan Wakely <redi@gcc.gnu.org>
* docs/html/ext/sgiexts.html: Fix path to stylesheet.
......
......@@ -1425,6 +1425,36 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl
dnl Check to see if building and using a C++ precompiled header can be done.
dnl
dnl GLIBCPP_CHECK_PCH
dnl
dnl If it looks like it may work, flip bits on in include/Makefile.am
dnl
AC_DEFUN(GLIBCPP_CHECK_PCH, [
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
],
[ $1(0);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes)
])
dnl
dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
dnl We must stage the required headers so that they will be installed
dnl with the library (unlike libgcc, the STL implementation is provided
......
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
......@@ -1437,6 +1437,36 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl
dnl Check to see if building and using a C++ precompiled header can be done.
dnl
dnl GLIBCPP_CHECK_PCH
dnl
dnl If it looks like it may work, flip bits on in include/Makefile.am
dnl
AC_DEFUN(GLIBCPP_CHECK_PCH, [
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
],
[ $1(0);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes)
])
dnl
dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
dnl We must stage the required headers so that they will be installed
dnl with the library (unlike libgcc, the STL implementation is provided
......@@ -2308,7 +2338,7 @@ AC_MSG_RESULT($enable_symvers)
])
# isc-posix.m4 serial 2 (gettext-0.11.2)
# isc-posix.m4 serial 1 (gettext-0.10.40)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
......@@ -2316,8 +2346,6 @@ dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
......@@ -2378,8 +2406,7 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
......@@ -2395,42 +2422,13 @@ AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
# Copyright 2002 Free Software Foundation, Inc.
# This program 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.
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.4-p6])])
#
# Check to make sure that the build environment is sane.
#
......
......@@ -746,9 +746,6 @@
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -68,12 +68,9 @@ GLIBCPP_ENABLE_CXX_FLAGS
GLIBCPP_ENABLE_DEBUG([no])
GLIBCPP_ENABLE_DEBUG_FLAGS([none])
# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
AC_CHECK_HEADERS(string.h stdlib.h)
# No surprises, no surprises...
if test $ATOMICITYH = cpu/generic ; then
AC_MSG_WARN([No native atomic operations are provided yet for this platform.])
AC_MSG_WARN([No native atomic operations are provided for this platform.])
if test $target_thread_file = single; then
AC_MSG_WARN([They cannot be faked when thread support is disabled.])
AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
......@@ -402,12 +399,14 @@ else
# Check for available headers.
AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h sys/types.h])
machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h \
sys/types.h])
GLIBCPP_CHECK_COMPILER_FEATURES
GLIBCPP_CHECK_PCH
GLIBCPP_CHECK_LINKER_FEATURES
GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
GLIBCPP_CHECK_MATH_SUPPORT
GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
GLIBCPP_CHECK_WCHAR_T_SUPPORT
GLIBCPP_CHECK_STDLIB_SUPPORT
......
......@@ -343,15 +343,30 @@ thread_target_headers = \
pch_input = stdc++.h
pch_output = stdc++.h.gch
pch_source = ${glibcpp_srcdir}/include/${pch_input}
PCHFLAGS=-Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
if GLIBCPP_BUILD_PCH
pch_build = ${pch_output}
pch_install = install-pch
else
pch_build =
pch_install =
endif
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
allstamps = \
allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
stamp-backward stamp-ext stamp-target
stamp-backward stamp-ext stamp-target
# List of all files that are created by explicit building, editing, or
# catenation.
allcreated = \
${target_builddir}/c++config.h \
${thread_target_headers} \
${pch_build}
# Here are the rules for building the headers
all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
all-local: ${allstamped} ${allcreated}
# This rule is slightly different, in that we must change the name of the
# local file from std_foo.h to foo.
......@@ -367,14 +382,6 @@ stamp-std: ${std_headers}
echo `date` > stamp-std ;\
fi
PCHFLAGS=-Winvalid-pch -x c++-header $(CXXFLAGS)
stamp-stdc++-precompile: stamp-std ${target_builddir}/c++config.h ${pch_source}
if [ ! -f "${pch_output}" ]; then \
$(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output}; \
touch ${pch_input}; \
fi; \
touch stamp-stdc++-precompile
stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \
mkdir -p ${bits_builddir} ;\
......@@ -388,11 +395,11 @@ stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
@if [ ! -d "${c_base_builddir}" ]; then \
mkdir -p ${c_base_builddir} ;\
fi ;\
(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
@LN_S@ $$h ./$${official_name} || true ;\
done) ;\
if [ ! -f stamp-c_base ]; then \
(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
@LN_S@ $$h ./$${official_name} || true ;\
done) ;\
if [ ! -z "${c_base_headers_extra}" ]; then \
(cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
fi ;\
......@@ -492,6 +499,11 @@ ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
# Build a precompiled C++ include, stdc++.h.gch.
${pch_output}: ${allstamped} ${target_builddir}/c++config.h ${pch_source}
touch ${pch_input}; \
$(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output};
# For robustness sake (in light of junk files or in-source
# configuration), copy from the build or source tree to the install
# tree using only the human-maintained file lists and directory
......@@ -501,7 +513,10 @@ ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
# target_headers_extra are taken out of the build tree staging area;
# the rest are taken from the original source tree.
gxx_include_dir = @gxx_include_dir@
install-data-local:
install-data-local: install-headers ${pch_install}
install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir}
for file in ${bits_headers}; do \
......@@ -529,8 +544,11 @@ install-data-local:
${thread_target_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
install-pch:
$(INSTALL_DATA) ${std_builddir}/${pch_output} $(DESTDIR)${gxx_include_dir}/${std_builddir}
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.gch stamp-stdc++-precompile
CLEANFILES = *.gch
# Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled
......
......@@ -460,15 +460,26 @@ thread_target_headers = \
pch_input = stdc++.h
pch_output = stdc++.h.gch
pch_source = ${glibcpp_srcdir}/include/${pch_input}
PCHFLAGS = -Winvalid-pch -Wno-deprecated -x c++-header $(CXXFLAGS)
@GLIBCPP_BUILD_PCH_TRUE@pch_build = @GLIBCPP_BUILD_PCH_TRUE@${pch_output}
@GLIBCPP_BUILD_PCH_FALSE@pch_build =
@GLIBCPP_BUILD_PCH_TRUE@pch_install = @GLIBCPP_BUILD_PCH_TRUE@install-pch
@GLIBCPP_BUILD_PCH_FALSE@pch_install =
# List of all timestamp files. By keeping only one copy of this list, both
# CLEANFILES and all-local are kept up-to-date.
allstamps = \
allstamped = \
stamp-std stamp-bits stamp-c_base stamp-c_compatibility \
stamp-backward stamp-ext stamp-target
stamp-backward stamp-ext stamp-target
PCHFLAGS = -Winvalid-pch -x c++-header $(CXXFLAGS)
# List of all files that are created by explicit building, editing, or
# catenation.
allcreated = \
${target_builddir}/c++config.h \
${thread_target_headers} \
${pch_build}
# Target includes for threads
glibcpp_thread_h = @glibcpp_thread_h@
......@@ -485,7 +496,7 @@ uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
gxx_include_dir = @gxx_include_dir@
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.gch stamp-stdc++-precompile
CLEANFILES = *.gch
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in
......@@ -590,7 +601,7 @@ mostlyclean distclean maintainer-clean
# Here are the rules for building the headers
all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
all-local: ${allstamped} ${allcreated}
# This rule is slightly different, in that we must change the name of the
# local file from std_foo.h to foo.
......@@ -605,12 +616,6 @@ stamp-std: ${std_headers}
done) ;\
echo `date` > stamp-std ;\
fi
stamp-stdc++-precompile: stamp-std ${target_builddir}/c++config.h ${pch_source}
if [ ! -f "${pch_output}" ]; then \
$(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output}; \
touch ${pch_input}; \
fi; \
touch stamp-stdc++-precompile
stamp-bits: ${bits_headers}
@if [ ! -d "${bits_builddir}" ]; then \
......@@ -625,11 +630,11 @@ stamp-c_base: ${c_base_headers} ${c_base_headers_extra}
@if [ ! -d "${c_base_builddir}" ]; then \
mkdir -p ${c_base_builddir} ;\
fi ;\
(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
@LN_S@ $$h ./$${official_name} || true ;\
done) ;\
if [ ! -f stamp-c_base ]; then \
(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
@LN_S@ $$h ./$${official_name} || true ;\
done) ;\
if [ ! -z "${c_base_headers_extra}" ]; then \
(cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra} . || true) ;\
fi ;\
......@@ -724,7 +729,15 @@ ${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
-e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
-e 's,^#include "\(.*\)",#include <bits/\1>,g' \
< ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
install-data-local:
# Build a precompiled C++ include, stdc++.h.gch.
${pch_output}: ${allstamped} ${target_builddir}/c++config.h ${pch_source}
touch ${pch_input}; \
$(CXX) $(PCHFLAGS) $(INCLUDES) ${pch_source} -o ${pch_output};
install-data-local: install-headers ${pch_install}
install-headers:
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}
$(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${bits_builddir}
for file in ${bits_headers}; do \
......@@ -752,6 +765,9 @@ install-data-local:
${thread_target_headers}; do \
$(INSTALL_DATA) $${file} $(DESTDIR)${gxx_include_dir}/${target_builddir}; done
install-pch:
$(INSTALL_DATA) ${std_builddir}/${pch_output} $(DESTDIR)${gxx_include_dir}/${std_builddir}
# Stop implicit '.o' make rules from ever stomping on extensionless
# headers, in the improbable case where some foolish, crack-addled
# developer tries to create them via make in the include build
......
......@@ -43,8 +43,8 @@ case ${query} in
echo ${CXX}
;;
--build-cxx)
PCHFLAGS="-Winvalid-pch -include ${BUILD_DIR}/include/stdc++.h"
CC_build="@glibcpp_CXX@"
PCHFLAGS="-include ${BUILD_DIR}/include/stdc++.h"
CC_build="@glibcpp_CXX@ ${PCHFLAGS}"
CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
echo ${CXX}
;;
......
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