This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to allow use of cpplib without linking it into cc1
- To: Zack Weinberg <zack at rabi dot columbia dot edu>
- Subject: Re: PATCH to allow use of cpplib without linking it into cc1
- From: Dave Brolley <brolley at cygnus dot com>
- Date: Tue, 29 Sep 1998 16:34:07 -0400
- CC: egcs-patches at cygnus dot com
- Organization: Cygnus Solutions Canada Ltd
- References: <199809261903.PAA10159@rabi.phys.columbia.edu>
This patch looks OK to me.
Dave
Zack Weinberg wrote:
> This patch adds a configure option, --enable-cpplib, that turns cpp
> into cpplib+cppmain, but doesn't link cpplib into cc1. In this mode I
> can find bugs in cpplib without having to worry about whether they're
> actually in the interaction between cpplib and c-lex.c.
>
> --enable-c-cpplib is unchanged.
>
> zw
>
> 1998-09-26 15:01 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
>
> * configure.in: Add --enable-cpplib option which uses cpplib
> for cpp, but doesn't link cpplib into cc1. Make help text
> capitalization consistent.
>
> Index: gcc/configure.in
> ===================================================================
> RCS file: /egcs/carton/cvsfiles/egcs/gcc/configure.in,v
> retrieving revision 1.162
> diff -u -r1.162 configure.in
> --- configure.in 1998/09/24 02:44:53 1.162
> +++ configure.in 1998/09/26 18:59:10
> @@ -152,10 +152,18 @@
> *) AC_MSG_ERROR(bad value ${enableval} given for checking option) ;;
> esac])
>
> -# Enable use of cpplib for C.
> +# Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
> cpp_main=cccp
> +AC_ARG_ENABLE(cpplib,
> +[ --enable-cpplib use cpplib for the C preprocessor.],
> +if test x$enable_cpplib != xno; then
> + cpp_main=cppmain
> +fi)
> +
> +# Link cpplib into the compiler proper, for C/C++/ObjC.
> AC_ARG_ENABLE(c-cpplib,
> -[ --enable-c-cpplib Use cpplib for C and C++.],
> +[ --enable-c-cpplib link cpplib directly into C and C++ compilers
> + (implies --enable-cpplib).],
> if test x$enable_c_cpplib != xno; then
> extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
> extra_c_objs="${extra_c_objs} prefix.o"
> @@ -163,32 +171,32 @@
> extra_c_flags=-DUSE_CPPLIB=1
> cpp_main=cppmain
> fi)
> -
> +
> # Enable Multibyte Characters for C/C++
> AC_ARG_ENABLE(c-mbchar,
> -[ --enable-c-mbchar Enable multibyte characters for C and C++.],
> +[ --enable-c-mbchar enable multibyte characters for C and C++.],
> if test x$enable_c_mbchar != xno; then
> extra_c_flags=-DMULTIBYTE_CHARS=1
> fi)
>
> # Enable Haifa scheduler.
> AC_ARG_ENABLE(haifa,
> -[ --enable-haifa Use the experimental scheduler.
> - --disable-haifa Don't use the experimental scheduler for the
> +[ --enable-haifa use the experimental scheduler.
> + --disable-haifa don't use the experimental scheduler for the
> targets which normally enable it.])
> # Fast fixincludes
> #
> # This is a work in progress...
> AC_ARG_WITH(fast-fixincludes,
> -[ --with-fast-fixincludes Use a faster fixinclude program. Experimental],
> +[ --with-fast-fixincludes use a faster fixinclude program (experimental)],
> fast_fixinc="$with_fast_fixincludes",
> fast_fixinc=no)
>
> # Enable init_priority.
> AC_ARG_ENABLE(init-priority,
> -[ --enable-init-priority Use attributes to assign initialization order
> +[ --enable-init-priority use attributes to assign initialization order
> for static objects.
> - --disable-init-priority Conform to ISO C++ rules for ordering static objects
> + --disable-init-priority conform to ISO C++ rules for ordering static objects
> (i.e. initialized in order of declaration). ],
> if test x$enable_init_priority != xno; then
> extra_c_flags=-DUSE_INIT_PRIORITY