diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.melt | 14 | ||||
-rw-r--r-- | gcc/Makefile.in | 9 | ||||
-rw-r--r-- | gcc/basilys.c | 59 | ||||
-rw-r--r-- | gcc/basilys.h | 14 | ||||
-rw-r--r-- | gcc/config.in | 6 | ||||
-rwxr-xr-x | gcc/configure | 254 | ||||
-rw-r--r-- | gcc/configure.ac | 81 |
7 files changed, 299 insertions, 138 deletions
diff --git a/gcc/ChangeLog.melt b/gcc/ChangeLog.melt index 37cab3be738..4844b3132ce 100644 --- a/gcc/ChangeLog.melt +++ b/gcc/ChangeLog.melt @@ -1,4 +1,18 @@ 2008-07-01 Basile Starynkevitch <basile@starynkevitch.net> + [added GDBM support in configure & configure.ac, + BASILYS_HAS_OBJ_TAB_FIELDS is now prohibited] + + * basilys.h: prohibit BASILYS_HAS_OBJ_TAB_FIELDS because of gengtype. + + * basilys.c: idem. + + * configure.ac: added GDBM support. + + * configure: regenerated. + + * Makefile.in: added GDBM. + +2008-07-01 Basile Starynkevitch <basile@starynkevitch.net> [MELT objects are by default fixed length unless BASILYS_HAS_OBJ_TAB_FIELDS is set in basilys.h] diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 96cd982fb64..6a58f08d77f 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -284,10 +284,15 @@ GMPINC = @GMPINC@ PPLLIBS = @ppllibs@ PPLINC = @pplinc@ -# How to file LTDL (LibTool DynLoader) +# How to find LTDL (LibTool DynLoader) LTDLLIBS = @ltdllibs@ LTDLINC = @ltdlinc@ LTDL_LDFLAGS= @ltdl_ldflags@ + +# How to file GDBM +GDBMLIBS = @gdbmlibs@ +GDBMINC = @gdbminc@ +GDBM_LDFLAGS= @gdbm_ldflags@ #### end of Basilys stuff CPPLIB = ../libcpp/libcpp.a @@ -891,7 +896,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) # How to link with both our special library facilities # and the system's installed libraries. LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \ - $(PPLLIBS) $(GMPLIBS) $(LTDLLIBS) $(GMPLIBS) + $(PPLLIBS) $(GMPLIBS) $(LTDLLIBS) $(GDBMLIBS) $(GMPLIBS) # Any system libraries needed just for GNAT. SYSLIBS = @GNAT_LIBEXC@ diff --git a/gcc/basilys.c b/gcc/basilys.c index 1a3429cdde3..d5b2c92130d 100644 --- a/gcc/basilys.c +++ b/gcc/basilys.c @@ -6620,35 +6620,6 @@ basilys_output_cfile_decl_impl (basilys_ptr_t unitnam, free (dotcpercentnam); } -/* this function decides if Basile's analysis is done. Currently we - check for -fbasilys flag; but we should also check for - -fwhole-program flag */ -static bool -gate_basilys (void) -{ -#if HAVE_PARMAPOLY && HAVE_LIBTOOLDYNL - /*@@@ we need to check the whole program flag @@@ */ - if (!flag_basilys) - return 0; - if (!flag_whole_program && flag_basilys) - { - static int warnedonce; - if (!warnedonce) - { - warnedonce = 1; - warning (OPT_Wall, "-fbasilys flag passed without -fwhole-program"); - }; - } - return flag_basilys; -#else /* no HAVE_PARMAPOLY or no HAVE_LIBTOOLDYNL */ -#warning no HAVE_PARMAPOLY or no HAVE_LIBTOOLDYNL - if (flag_basilys) - fatal_error ("-fbasilys flag specified, \ -but GCC configured without Parma Polyhedra Library or LibTool Dynamic Loader"); - return 0; -#endif -} - void basilys_assert_failed (const char *msg, const char *filnam, int lineno, const char *fun) @@ -6696,6 +6667,36 @@ basilys_check_failed (const char *msg, const char *filnam, } + +/* this function decides if Basile's analysis is done. Currently we + check for -fbasilys flag; but we should also check for + -fwhole-program flag */ +static bool +gate_basilys (void) +{ +#if HAVE_PARMAPOLY && HAVE_LIBTOOLDYNL + /*@@@ we need to check the whole program flag @@@ */ + if (!flag_basilys) + return 0; + if (!flag_whole_program && flag_basilys) + { + static int warnedonce; + if (!warnedonce) + { + warnedonce = 1; + warning (OPT_Wall, "-fbasilys flag passed without -fwhole-program"); + }; + } + return flag_basilys; +#else /* no HAVE_PARMAPOLY or no HAVE_LIBTOOLDYNL */ +#warning no HAVE_PARMAPOLY or no HAVE_LIBTOOLDYNL + if (flag_basilys) + fatal_error ("-fbasilys flag specified, \ +but GCC configured without Parma Polyhedra Library or LibTool Dynamic Loader"); + return 0; +#endif +} + /* this function does the bulk of the work; return additional TODOs to the pass machinery */ static unsigned int diff --git a/gcc/basilys.h b/gcc/basilys.h index a550b137b56..c36161401f8 100644 --- a/gcc/basilys.h +++ b/gcc/basilys.h @@ -331,20 +331,14 @@ GTY (()) #if ENABLE_CHECKING unsigned long obj_serial; #endif -#if BASILYS_HAS_OBJ_TAB_FIELDS - basilys_ptr_t *GTY ((length ("%h.obj_len"))) obj_vartab; - /* the following field is usually the value of obj_vartab (for - objects in the young zone), to allocate the object and its fields - at once; hence its GTY-ed length is zero */ - basilys_ptr_t GTY ((length ("0"))) obj__tabfields[FLEXIBLE_DIM]; -#else basilys_ptr_t GTY ((length ("%h.obj_len"))) obj_vartab[FLEXIBLE_DIM]; -#endif }; #if ENABLE_CHECKING #if BASILYS_HAS_OBJ_TAB_FIELDS +#error BASILYS_HAS_OBJ_TAB_FIELDS is no longer supported, because gengtype dislike CPP conditionals. +/* #define BASILYS_OBJECT_STRUCT(N) { \ basilysobject_ptr_t obj_class; \ unsigned obj_hash; \ @@ -354,6 +348,7 @@ GTY (()) basilys_ptr_t* obj_vartab; \ basilys_ptr_t obj__tabfields[N]; \ long _gap; } +*/ #else /*!BASILYS_HAS_OBJ_TAB_FIELDS*/ #define BASILYS_OBJECT_STRUCT(N) { \ basilysobject_ptr_t obj_class; \ @@ -370,6 +365,8 @@ void basilys_object_set_serial(basilysobject_ptr_t ob); #else /*!ENABLE_CHECKING*/ #if BASILYS_HAS_OBJ_TAB_FIELDS +#error BASILYS_HAS_OBJ_TAB_FIELDS is no longer supported, because gengtype dislike CPP conditionals. +/* #define BASILYS_OBJECT_STRUCT(N) { \ basilysobject_ptr_t obj_class; \ unsigned obj_hash; \ @@ -378,6 +375,7 @@ void basilys_object_set_serial(basilysobject_ptr_t ob); basilys_ptr_t* obj_vartab; \ basilys_ptr_t obj__tabfields[N]; \ long _gap; } +*/ #else /*!BASILYS_HAS_OBJ_TAB_FIELDS*/ #define BASILYS_OBJECT_STRUCT(N) { \ basilysobject_ptr_t obj_class; \ diff --git a/gcc/config.in b/gcc/config.in index 359026b4ab9..5e584c11fd7 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -892,6 +892,12 @@ #endif +/* Define if GDBM is in use. */ +#ifndef USED_FOR_TARGET +#undef HAVE_GDBM +#endif + + /* Define to 1 if you have the `getchar_unlocked' function. */ #ifndef USED_FOR_TARGET #undef HAVE_GETCHAR_UNLOCKED diff --git a/gcc/configure b/gcc/configure index 4f9a3f6eadd..8df2bc9076b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -458,7 +458,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP ppllibs pplinc ltdllibs ltdlinc ltdl_ldflags COMPILER_PROBE_OBJECT BASILYSMELT_OBJECT loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP ppllibs pplinc ltdllibs ltdlinc ltdl_ldflags gdbmlibs gdbminc gdbm_ldflags COMPILER_PROBE_OBJECT BASILYSMELT_OBJECT loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' ac_pwd=`pwd` @@ -1018,12 +1018,12 @@ Optional Features: this could slow down the compiler hence is disabled by default. - --enable-basilysmelt Enable Basilys/MELT passes; - This enable complex (sciptable) passes using the Middle End Lisp Translator feature - (which dynamically translates the MELT lisp dialect into C plug-in like code); - This requires PPL (Parma Polyhedra Library) and LTDL (LibTool Dynamic Loader) support. - The compiler-probe feature is also recommended. - + --enable-basilysmelt Enable Basilys/MELT +passes; This enable complex (sciptable) passes using the Middle End +Lisp Translator feature (which dynamically translates the MELT lisp +dialect into C plug-in like code); This requires PPL (Parma Polyhedra +Library), GDBM and LTDL (LibTool Dynamic Loader) support. The +compiler-probe feature is also recommended. --enable-werror-always enable -Werror despite compiler version --enable-checking=LIST enable expensive run-time checks. With LIST, @@ -1106,6 +1106,11 @@ Optional Packages: plus --with-ltdl-lib=PATH/lib --with-ltdl-include=PATH Specify directory for installed LTDL include files --with-ltdl-lib=PATH Specify the directory for the installed LTDL library + --with-gdbm=PATH Specify prefix directory for installed LibTool Dynamic Loader library + Equivalent to --with-gdbm-include=PATH/include + plus --with-gdbm-lib=PATH/lib + --with-gdbm-include=PATH Specify directory for installed GDBM include files + --with-gdbm-lib=PATH Specify the directory for the installed GDBM library --with-stabs arrange to use stabs instead of host debug format --with-dwarf2 force the default debug format to be DWARF 2 --with-build-sysroot=sysroot @@ -7347,6 +7352,140 @@ LDFLAGS="$saved_LDFLAGS" # for debugging only echo '%!%' after LTDL LIBS= $LIBS CFLAGS= $CFLAGS +################ +# Check for GDBM (GNU DBM - sort of database (actually inderxed file) +gdbmlibs="-lgdbm" +gdbminc= +have_gdbm=yes + + +# Check whether --with-gdbm or --without-gdbm was given. +if test "${with_gdbm+set}" = set; then + withval="$with_gdbm" + +fi; + + +# Check whether --with-gdbm_include or --without-gdbm_include was given. +if test "${with_gdbm_include+set}" = set; then + withval="$with_gdbm_include" + +fi; + +# Check whether --with-gdbm_lib or --without-gdbm_lib was given. +if test "${with_gdbm_lib+set}" = set; then + withval="$with_gdbm_lib" + +fi; + + +if test "x$with_gdbm" != x; then + gdbmlibs="-L$with_gdbm/lib -lgdbm" + gdbminc="-I$with_gdbm/include" +fi + +if test "x$gdbm_include" != x; then + gdbminc="-I$gdbm_include $gdbminc" +fi + +if test "x$gdbm_lib" != x; then + gdbmlibs="-L$gdbm_lib -lgdbm $gdbmlibs" +fi + +gdbm_ldflags="" + +saved_CFLAGS="$CFLAGS" +saved_LIBS="$LIBS" +saved_LDFLAGS="$LD_FLAGS" +CFLAGS="$CFLAGS $gdbminc" +LIBS="$LIBS $gdbmlibs" +LDFLAGS="$LDFLAGS -rdynamic" +echo "$as_me:$LINENO: checking for LibTool Dynamic Loader" >&5 +echo $ECHO_N "checking for LibTool Dynamic Loader... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <gdbm.h> +int +main () +{ + + GDBM_FILE f; + f = gdb_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; have_gdbm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; have_gdbm=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +if test "x$have_gdbm" != xyes; then + { echo "$as_me:$LINENO: WARNING: Some passes of GCC require GDBM. +Try the --with-gdbm option to specify the installed GDBM location. +Copies of this library source code can be found at its respective +hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. +See also http://gcc.gnu.org/install/prerequisites.html for additional info." >&5 +echo "$as_me: WARNING: Some passes of GCC require GDBM. +Try the --with-gdbm option to specify the installed GDBM location. +Copies of this library source code can be found at its respective +hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. +See also http://gcc.gnu.org/install/prerequisites.html for additional info." >&2;} +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GDBM 1 +_ACEOF + +fi + +CFLAGS="$saved_CFLAGS" +LIBS="$saved_LIBS" +LDFLAGS="$saved_LDFLAGS" + +# Flags needed for GDBM + + + + + +# for debugging only +echo '%!%' after GDBM LIBS= $LIBS CFLAGS= $CFLAGS + # ------------------------ # Compiler probing support # ------------------------ @@ -7523,7 +7662,7 @@ fi loose_warn= save_CFLAGS="$CFLAGS" for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ - -Wmissing-prototypes; do + -Wmissing-prototypes -Wcast-qual -Wc++-compat; do as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 @@ -7588,73 +7727,6 @@ fi done CFLAGS="$save_CFLAGS" -cxx_compat_warn= -save_CFLAGS="$CFLAGS" -for option in -Wc++-compat; do - as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` - - echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 -echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 -if eval "test \"\${$as_acx_Woption+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - CFLAGS="$option" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_acx_Woption=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_acx_Woption=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 - if test `eval echo '${'$as_acx_Woption'}'` = yes; then - cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option" -fi - - done -CFLAGS="$save_CFLAGS" - strict_warn= save_CFLAGS="$CFLAGS" for option in -Wold-style-definition \ @@ -15234,13 +15306,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:15237: $ac_compile\"" >&5) + (eval echo "\"\$as_me:15309: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:15240: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:15312: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:15243: output\"" >&5) + (eval echo "\"\$as_me:15315: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -16295,7 +16367,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 16298 "configure"' > conftest.$ac_ext + echo '#line 16370 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16915,11 +16987,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16918: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16990: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16922: \$? = $ac_status" >&5 + echo "$as_me:16994: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17237,11 +17309,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17240: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17312: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17244: \$? = $ac_status" >&5 + echo "$as_me:17316: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17342,11 +17414,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17345: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17417: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17349: \$? = $ac_status" >&5 + echo "$as_me:17421: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17397,11 +17469,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17400: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17472: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17404: \$? = $ac_status" >&5 + echo "$as_me:17476: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20194,7 +20266,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20197 "configure" +#line 20269 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -20294,7 +20366,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20297 "configure" +#line 20369 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -25062,10 +25134,12 @@ s,@pplinc@,$pplinc,;t t s,@ltdllibs@,$ltdllibs,;t t s,@ltdlinc@,$ltdlinc,;t t s,@ltdl_ldflags@,$ltdl_ldflags,;t t +s,@gdbmlibs@,$gdbmlibs,;t t +s,@gdbminc@,$gdbminc,;t t +s,@gdbm_ldflags@,$gdbm_ldflags,;t t s,@COMPILER_PROBE_OBJECT@,$COMPILER_PROBE_OBJECT,;t t s,@BASILYSMELT_OBJECT@,$BASILYSMELT_OBJECT,;t t s,@loose_warn@,$loose_warn,;t t -s,@cxx_compat_warn@,$cxx_compat_warn,;t t s,@strict_warn@,$strict_warn,;t t s,@warn_cflags@,$warn_cflags,;t t s,@nocommon_flag@,$nocommon_flag,;t t diff --git a/gcc/configure.ac b/gcc/configure.ac index ff400a1016c..f5e50129fc8 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -447,6 +447,71 @@ AC_SUBST(ltdl_ldflags) # for debugging only echo '%!%' after LTDL LIBS= $LIBS CFLAGS= $CFLAGS +################ +# Check for GDBM (GNU DBM - sort of database (actually inderxed file) +gdbmlibs="-lgdbm" +gdbminc= +have_gdbm=yes + +AC_ARG_WITH(gdbm, [ --with-gdbm=PATH Specify prefix directory for installed LibTool Dynamic Loader library + Equivalent to --with-gdbm-include=PATH/include + plus --with-gdbm-lib=PATH/lib]) + +AC_ARG_WITH(gdbm_include, [ --with-gdbm-include=PATH Specify directory for installed GDBM include files]) +AC_ARG_WITH(gdbm_lib, [ --with-gdbm-lib=PATH Specify the directory for the installed GDBM library]) + + +if test "x$with_gdbm" != x; then + gdbmlibs="-L$with_gdbm/lib -lgdbm" + gdbminc="-I$with_gdbm/include" +fi + +if test "x$gdbm_include" != x; then + gdbminc="-I$gdbm_include $gdbminc" +fi + +if test "x$gdbm_lib" != x; then + gdbmlibs="-L$gdbm_lib -lgdbm $gdbmlibs" +fi + +gdbm_ldflags="" + +saved_CFLAGS="$CFLAGS" +saved_LIBS="$LIBS" +saved_LDFLAGS="$LD_FLAGS" +CFLAGS="$CFLAGS $gdbminc" +LIBS="$LIBS $gdbmlibs" +LDFLAGS="$LDFLAGS -rdynamic" +AC_MSG_CHECKING([for LibTool Dynamic Loader]) +AC_TRY_LINK([#include <gdbm.h>],[ + GDBM_FILE f; + f = gdb_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0); +], [AC_MSG_RESULT([yes]); have_gdbm=yes], [AC_MSG_RESULT([no]); have_gdbm=no]) + +if test "x$have_gdbm" != xyes; then + AC_MSG_WARN([Some passes of GCC require GDBM. +Try the --with-gdbm option to specify the installed GDBM location. +Copies of this library source code can be found at its respective +hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. +See also http://gcc.gnu.org/install/prerequisites.html for additional info.]) +else + AC_DEFINE(HAVE_GDBM, 1, + [Define if GDBM is in use.]) +fi + +CFLAGS="$saved_CFLAGS" +LIBS="$saved_LIBS" +LDFLAGS="$saved_LDFLAGS" + +# Flags needed for GDBM +AC_SUBST(gdbmlibs) +AC_SUBST(gdbminc) +AC_SUBST(gdbm_ldflags) + + +# for debugging only +echo '%!%' after GDBM LIBS= $LIBS CFLAGS= $CFLAGS + # ------------------------ # Compiler probing support # ------------------------ @@ -521,15 +586,13 @@ AC_SUBST(COMPILER_PROBE_OBJECT) enabled_basilysmelt=no BASILYSMELT_OBJECT= -AC_ARG_ENABLE(basilysmelt, -[ --enable-basilysmelt Enable Basilys/MELT passes; - This enable complex (sciptable) passes using the Middle End Lisp Translator feature - (which dynamically translates the MELT lisp dialect into C plug-in like code); - This requires PPL (Parma Polyhedra Library) and LTDL (LibTool Dynamic Loader) support. - The compiler-probe feature is also recommended. -], -enabled_basilysmelt=$enableval, -enabled_basilysmelt=no) +AC_ARG_ENABLE(basilysmelt, [ --enable-basilysmelt Enable Basilys/MELT +passes; This enable complex (sciptable) passes using the Middle End +Lisp Translator feature (which dynamically translates the MELT lisp +dialect into C plug-in like code); This requires PPL (Parma Polyhedra +Library), GDBM and LTDL (LibTool Dynamic Loader) support. The +compiler-probe feature is also recommended. ], +enabled_basilysmelt=$enableval, enabled_basilysmelt=no) if test "$enabled_basilysmelt" = "yes" ; then AC_MSG_CHECKING([for features required for basilysmelt]) |