diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-02 15:35:21 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-02 15:35:21 +0000 |
commit | d393a6b60b75df7091cf61cb2fede527ef9cbda9 (patch) | |
tree | 8d1b1ce7b791932a7d67f71ae4db1f96b6d614d5 | |
parent | 2ce3a412b2de0871d6cc10a564fe0d4a03352a4a (diff) | |
download | gcc-d393a6b60b75df7091cf61cb2fede527ef9cbda9.tar.gz |
2008-07-02 Basile Starynkevitch <basile@starynkevitch.net>
* gcc/basilys.h: added basilysgc_load_modulelist
* gcc/basilys.c: (basilysgc_load_modulelist) new function.
(do_initial_command) uses it.
(basilys_finalize) clear the temporary directory.
(dispatch_gate_basilys) added cast.
* gcc/doc/melt.texi: document the -fbasilys-init=@ trick to load a module list.
* gcc/Makefile.in: use module lists. warmelt*.modlis are removed on clean.
* gcc/configure.ac: corrected GDBM stuff.
* gcc/configure: regenerated.
* gcc/c-common.c: (handle_melt_attribute) new empty function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137358 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.melt | 18 | ||||
-rw-r--r-- | gcc/Makefile.in | 43 | ||||
-rw-r--r-- | gcc/basilys.c | 192 | ||||
-rw-r--r-- | gcc/basilys.h | 5 | ||||
-rw-r--r-- | gcc/c-common.c | 25 | ||||
-rwxr-xr-x | gcc/configure | 6 | ||||
-rw-r--r-- | gcc/configure.ac | 4 | ||||
-rw-r--r-- | gcc/doc/melt.texi | 15 |
8 files changed, 267 insertions, 41 deletions
diff --git a/gcc/ChangeLog.melt b/gcc/ChangeLog.melt index 4b4bb3efc98..393d024d13a 100644 --- a/gcc/ChangeLog.melt +++ b/gcc/ChangeLog.melt @@ -1,3 +1,21 @@ +2008-07-02 Basile Starynkevitch <basile@starynkevitch.net> + * basilys.h: added basilysgc_load_modulelist + + * basilys.c: (basilysgc_load_modulelist) new function. + (do_initial_command) uses it. + (basilys_finalize) clear the temporary directory. + (dispatch_gate_basilys) added cast. + + * doc/melt.texi: document the -fbasilys-init=@ trick to load a module list. + + * Makefile.in: use module lists. warmelt*.modlis are removed on clean. + + * configure.ac: corrected GDBM stuff. + + * configure: regenerated. + + * c-common.c: (handle_melt_attribute) new empty function. + 2008-07-01 Basile Starynkevitch <basile@starynkevitch.net> * basilys.c: added pass_basilys_ipa, pass_basilys_lowering, pass_basilys_earlyopt, pass_basilys_lateopt. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index b5e9aa10bd9..6bce468c5b6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1323,7 +1323,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \ protoize$(exeext) unprotoize$(exeext) \ $(SPECS) collect2$(exeext) \ - run-basilys.d \ + run-basilys.d warmelt*.modlis \ gcov-iov$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \ *.so \ *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a libgcc.mk @@ -4790,54 +4790,71 @@ warmelt-%.so: warmelt-%.c built-melt-cc-script echo Melt building $@ from $< ./built-melt-cc-script $< $@ -warmelt-%-1.c: $(srcdir)/melt/warmelt-%.bysl $(WARMELT_BASE0SO) cc1$(exeext) +warmelt0.modlis: $(WARMELT_BASE0SO) + date +"#$@ generated %c" > $@-tmp + for f in $(WARMELT_BASE0); do echo $$f >> $@-tmp; done + $(SHELL) $(srcdir)/../move-if-change $@-tmp $@ + +## + +warmelt1.modlis: $(WARMELT_BASE1SO) + date +"#$@ generated %c" > $@-tmp + for f in $(WARMELT_BASE1); do echo $$f >> $@-tmp; done + $(SHELL) $(srcdir)/../move-if-change $@-tmp $@ + +warmelt-%-1.c: $(srcdir)/melt/warmelt-%.bysl warmelt0.modlis cc1$(exeext) $(WARMELT_BASE0SO) @echo generating $@ using $(WARMELT_BASE0) -rm -f $@ - $(MELTBASILYSCCFILE1) -fbasilys-init="$(WARMELT_BASE0ROW)" \ + $(MELTBASILYSCCFILE1) -fbasilys-init=$(WARMELT_BASE0ROW) \ -fbasilys-arg=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \ -fbasilys-secondarg=$@ ls -l $@ -warmelt-first-1.c: $(srcdir)/melt/warmelt-first.bysl $(WARMELT_BASE0SO) cc1$(exeext) +warmelt-first-1.c: $(srcdir)/melt/warmelt-first.bysl warmelt0.modlis cc1$(exeext) $(WARMELT_BASE0SO) -rm -f $@ @echo generating warmelt-first using $(WARMELT_BASE0) @echo WARMELT_BASE0= $(WARMELT_BASE0) WARMELT_BASE0ROW= $(WARMELT_BASE0ROW) - $(MELTBASILYSCCINIT1) -fbasilys-init="$(WARMELT_BASE0ROW)" \ + $(MELTBASILYSCCINIT1) -fbasilys-init=$(WARMELT_BASE0ROW) \ -fbasilys-arg=$< \ -fbasilys-secondarg=$@ ls -l $@ #### -warmelt-%-2.c: $(srcdir)/melt/warmelt-%.bysl $(WARMELT_BASE1SO) cc1$(exeext) $(WARMELT_BASE1NSO) +warmelt2.modlis: $(WARMELT_BASE2SO) + date +"#$@ generated %c" > $@-tmp + for f in $(WARMELT_BASE2); do echo $$f >> $@-tmp; done + $(SHELL) $(srcdir)/../move-if-change $@-tmp $@ + +warmelt-%-2.c: $(srcdir)/melt/warmelt-%.bysl warmelt1.modlis $(WARMELT_BASE1SO) cc1$(exeext) $(WARMELT_BASE1NSO) @echo generating $@ using $(WARMELT_BASE1SO) -rm -f $@ - $(MELTBASILYSCCFILE1) -fbasilys-init="$(WARMELT_BASE1ROW)" \ + $(MELTBASILYSCCFILE1) -fbasilys-init="@warmelt1" \ -fbasilys-arg=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \ -fbasilys-secondarg=$@ ls -l $@ -warmelt-first-2.c: $(srcdir)/melt/warmelt-first.bysl $(WARMELT_BASE1SO) cc1$(exeext) +warmelt-first-2.c: $(srcdir)/melt/warmelt-first.bysl warmelt1.modlis $(WARMELT_BASE1SO) cc1$(exeext) -rm -f $@ @echo test showmdata using $(WARMELT_BASE1SO) - $(MELTBASILYSCCSHOW1) -fbasilys-init="$(WARMELT_BASE1ROW)" + $(MELTBASILYSCCSHOW1) -fbasilys-init="@warmelt1" @echo generating $@ using $(WARMELT_BASE1SO) - $(MELTBASILYSCCINIT1) -fbasilys-init="$(WARMELT_BASE1ROW)" \ + $(MELTBASILYSCCINIT1) -fbasilys-init="@warmelt1" \ -fbasilys-arg=$< \ -fbasilys-secondarg=$@ ls -l $@ #### -warmelt-%-3.c: $(srcdir)/melt/warmelt-%.bysl $(WARMELT_BASE2SO) cc1$(exeext) +warmelt-%-3.c: $(srcdir)/melt/warmelt-%.bysl warmelt2.modlis $(WARMELT_BASE2SO) cc1$(exeext) @echo generating $@ using $(WARMELT_BASE2SO) -rm -f $@ - $(MELTBASILYSCCFILE1) -fbasilys-init="$(WARMELT_BASE2ROW)" \ + $(MELTBASILYSCCFILE1) -fbasilys-init="@warmelt2" \ -fbasilys-arg=$< -frandom-seed=$(shell md5sum $< | cut -b-24) \ -fbasilys-secondarg=$@ ls -l $@ warmelt-first-3.c: $(srcdir)/melt/warmelt-first.bysl $(WARMELT_BASE2SO) cc1$(exeext) -rm -f $@ @echo generating $@ using $(WARMELT_BASE2SO) - $(MELTBASILYSCCINIT1) -fbasilys-init="$(WARMELT_BASE2ROW)" \ + $(MELTBASILYSCCINIT1) -fbasilys-init="@warmelt2" \ -fbasilys-arg=$< \ -fbasilys-secondarg=$@ ls -l $@ diff --git a/gcc/basilys.c b/gcc/basilys.c index 9cf5bdbce40..ee3a1e3f16d 100644 --- a/gcc/basilys.c +++ b/gcc/basilys.c @@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see #include "compiler-probe.h" +#include <dirent.h> #if HAVE_PARMAPOLY #include <ppl_c.h> @@ -995,7 +996,8 @@ forwarded_copy (basilys_ptr_t p) dst->entab = (struct entrybasicblocksbasilys_st *) ggc_alloc_cleared (siz * sizeof - (dst->entab + (dst-> + entab [0])); memcpy (dst->entab, src->entab, siz * sizeof (dst->entab[0])); } @@ -1446,15 +1448,15 @@ unsafe_index_mapobject (struct entryobjectsbasilys_st *tab, samehashcnt, (void *) attr, attr->obj_serial, (void *) curat, curat->obj_serial, curat->obj_hash, (void *) curat->obj_class, - basilys_string_str (curat->obj_class-> - obj_vartab[FNAMED_NAME])); + basilys_string_str (curat-> + obj_class->obj_vartab[FNAMED_NAME])); if (basilys_is_instance_of ((basilys_ptr_t) attr, (basilys_ptr_t) BASILYSGOB (CLASS_NAMED))) dbgprintf ("gotten attr named %s found attr named %s", basilys_string_str (attr->obj_vartab[FNAMED_NAME]), - basilys_string_str (curat-> - obj_vartab[FNAMED_NAME])); + basilys_string_str (curat->obj_vartab + [FNAMED_NAME])); basilys_dbgshortbacktrace ("gotten & found attr of same hash & class", 15); } @@ -1491,15 +1493,15 @@ unsafe_index_mapobject (struct entryobjectsbasilys_st *tab, samehashcnt, (void *) attr, attr->obj_serial, (void *) curat, curat->obj_serial, curat->obj_hash, (void *) curat->obj_class, - basilys_string_str (curat->obj_class-> - obj_vartab[FNAMED_NAME])); + basilys_string_str (curat-> + obj_class->obj_vartab[FNAMED_NAME])); if (basilys_is_instance_of ((basilys_ptr_t) attr, (basilys_ptr_t) BASILYSGOB (CLASS_NAMED))) dbgprintf ("gotten attr named %s found attr named %s", basilys_string_str (attr->obj_vartab[FNAMED_NAME]), - basilys_string_str (curat-> - obj_vartab[FNAMED_NAME])); + basilys_string_str (curat->obj_vartab + [FNAMED_NAME])); basilys_dbgshortbacktrace ("gotten & found attr of same hash & class", 15); } @@ -4685,6 +4687,101 @@ dylibfound: #undef modulv } + +#define MODLIS_SUFFIX ".modlis" + +basilys_ptr_t +basilysgc_load_modulelist (basilys_ptr_t modata_p, const char *modlistbase) +{ + char *modlistpath = 0; + FILE *filmod = 0; + /* @@@ ugly, we should have a getline function */ + char linbuf[1024]; + BASILYS_ENTERFRAME (1, NULL); + memset (linbuf, 0, sizeof (linbuf)); +#define mdatav curfram__.varptr[0] + mdatav = modata_p; + /* first check directly for the file */ + modlistpath = concat (modlistbase, MODLIS_SUFFIX, NULL); + if (IS_ABSOLUTE_PATH (modlistpath) || !access (modlistpath, R_OK)) + goto loadit; + free (modlistpath); + modlistpath = 0; + /* check for module list in melt_source_dir */ + modlistpath = concat (melt_source_dir, + "/", modlistbase, MODLIS_SUFFIX, NULL); + if (!access (modlistpath, R_OK)) + goto loadit; + free (modlistpath); + modlistpath = 0; + /* check for module list in dynamic library dir */ + if (basilys_dynlibdir_string && basilys_dynlibdir_string[0]) + { + modlistpath = concat (basilys_dynlibdir_string, + "/", modlistbase, MODLIS_SUFFIX, NULL); + if (!access (modlistpath, R_OK)) + goto loadit; + } + free (modlistpath); + modlistpath = 0; + /* check for module list in gensrcdir */ + if (basilys_gensrcdir_string && basilys_gensrcdir_string[0]) + { + /* check for modfile in the gensrcdir */ + modlistpath = + concat (basilys_gensrcdir_string, "/", modlistbase, MODLIS_SUFFIX, + NULL); + if (!access (modlistpath, R_OK)) + goto loadit; + } + free (modlistpath); + modlistpath = 0; + /* check in the temporary directory */ + modlistpath = basilys_tempdir_path (modlistbase); + modlistpath = reconcat (modlistpath, MODLIS_SUFFIX, NULL); + if (!access (modlistpath, R_OK)) + goto loadit; + free (modlistpath); + modlistpath = 0; + if (!modlistpath) + goto end; +loadit: + filmod = fopen (modlistpath, "r"); + dbgprintf ("reading module list '%s'", modlistpath); + if (!filmod) + fatal_error ("failed to open basilys module list file %s - %m", + modlistpath); +#if ENABLE_CHECKING + { + static char locbuf[80]; + memset (locbuf, 0, sizeof (locbuf)); + snprintf (locbuf, sizeof (locbuf) - 1, + "%s:%d:basilysgc_load_modulelist before reading module list : %s", + basename (__FILE__), __LINE__, modlistpath); + curfram__.flocs = locbuf; + } +#endif + while (!feof (filmod)) + { + char *pc = 0; + memset (linbuf, 0, sizeof (linbuf)); + fgets (linbuf, sizeof (linbuf) - 1, filmod); + pc = strchr (linbuf, '\n'); + if (pc) + *pc = (char) 0; + /* maybe we should not skip spaces */ + for (pc = linbuf; *pc && ISSPACE (*pc); pc++); + if (*pc == '#' || *pc == (char) 0) + continue; + dbgprintf ("in module list %s loading module '%s'", modlistbase, pc); + mdatav = basilysgc_compile_dyn ((basilys_ptr_t) mdatav, pc); + } +end: + BASILYS_EXITFRAME (); + return (basilys_ptr_t) mdatav; +#undef mdatav +} + /*************** initial load machinery *******************/ @@ -5633,7 +5730,7 @@ readval (struct reading_st *rd, bool * pgot) readv = readsexpr (rd, ']'); *pgot = TRUE; goto end; - } /* end if '(' */ + } /* end if '[' */ else if (c == '{') { rdnext (); @@ -5968,9 +6065,23 @@ load_basilys_modules_and_do_command (void) debugeprintf ("load_initial_basilys_modules curmod %s before", curmod); BASILYS_LOCATION_HERE ("load_initial_basilys_modules before compile_dyn"); - modatv = basilysgc_compile_dyn ((basilys_ptr_t) modatv, curmod); - debugeprintf ("load_initial_basilys_modules curmod %s loaded modatv %p", - curmod, (void *) modatv); + if (curmod[0] == '@' && curmod[1]) + { + /* read the file which contains a list of modules, one per + non empty, non comment line */ + modatv = + basilysgc_load_modulelist ((basilys_ptr_t) modatv, curmod + 1); + debugeprintf + ("load_initial_basilys_modules curmod %s loaded modulist %p", + curmod, (void *) modatv); + } + else + { + modatv = basilysgc_compile_dyn ((basilys_ptr_t) modatv, curmod); + debugeprintf + ("load_initial_basilys_modules curmod %s loaded modatv %p", + curmod, (void *) modatv); + } curmod = nextmod; } /** @@ -6088,6 +6199,10 @@ basilys_initialize (void) } +typedef char *char_p; + +DEF_VEC_P (char_p); +DEF_VEC_ALLOC_P (char_p, heap); /**** * finalize basilys. Called from toplevel.c after all is done @@ -6097,7 +6212,31 @@ basilys_finalize (void) { debugeprintf ("basilys_finalize with %ld GarbColl, %ld fullGc", basilys_nb_garbcoll, basilys_nb_full_garbcoll); -#warning we should clear our temporary directory here + if (tempdir_basilys) + { + DIR *tdir = opendir (tempdir_basilys); + VEC (char_p, heap) * dirvec = 0; + struct dirent *dent = 0; + if (!tdir) + fatal_error ("failed to open tempdir %s %m", tempdir_basilys); + dirvec = VEC_alloc (char_p, heap, 30); + while ((dent = readdir (tdir)) != NULL) + { + if (dent->d_name[0] && dent->d_name[0] != '.') + /* this skips '.' & '..' and we have no .* file */ + VEC_safe_push (char_p, heap, dirvec, + concat (tempdir_basilys, "/", dent->d_name, NULL)); + } + closedir (tdir); + while (!VEC_empty (char_p, dirvec)) + { + char *tfilnam = VEC_pop (char_p, dirvec); + remove (tfilnam); + free (tfilnam); + }; + VEC_free (char_p, heap, dirvec); + } + rmdir (tempdir_basilys); } @@ -6735,15 +6874,19 @@ dispatch_gate_basilys (const char *passname) basilys_object_nth_field ((basilys_ptr_t) BASILYSGOB (INITIAL_SYSTEM_DATA), FSYSDAT_PASS_DICT); - passv = basilys_get_mapstrings ((basilys_ptr_t) passdictv, passname); + passv = + basilys_get_mapstrings ((struct basilysmapstrings_st *) passdictv, + passname); if (basilys_is_instance_of - (passv, (basilys_ptr_t) BASILYSGOB (CLASS_GCC_PASS))) + ((basilys_ptr_t) passv, (basilys_ptr_t) BASILYSGOB (CLASS_GCC_PASS))) { gatev = basilys_object_nth_field ((basilys_ptr_t) passv, FGCCPASS_GATE); if (basilys_magic_discr ((basilys_ptr_t) gatev) == OBMAG_CLOSURE) { resvalv = - basilys_apply (gatev, passv, "", (union basilysparam_un *) 0, "", + basilys_apply ((struct basilysclosure_st *) gatev, + (basilys_ptr_t) passv, "", + (union basilysparam_un *) 0, "", (union basilysparam_un *) 0); res = (resvalv != NULL); /* force a minor GC to be sure that nothing is in the young region */ @@ -6775,9 +6918,11 @@ dispatch_execute_basilys (const char *passname) basilys_object_nth_field ((basilys_ptr_t) BASILYSGOB (INITIAL_SYSTEM_DATA), FSYSDAT_PASS_DICT); - passv = basilys_get_mapstrings ((basilys_ptr_t) passdictv, passname); + passv = + basilys_get_mapstrings ((struct basilysmapstrings_st *) passdictv, + passname); if (basilys_is_instance_of - (passv, (basilys_ptr_t) BASILYSGOB (CLASS_GCC_PASS))) + ((basilys_ptr_t) passv, (basilys_ptr_t) BASILYSGOB (CLASS_GCC_PASS))) { execuv = basilys_object_nth_field ((basilys_ptr_t) passv, FGCCPASS_EXEC); @@ -6787,9 +6932,11 @@ dispatch_execute_basilys (const char *passname) memset (&restab, 0, sizeof (restab)); restab[0].bp_longptr = &todol; /* apply with one extra long result */ - resvalv = basilys_apply (execuv, passv, "", - (union basilysparam_un *) 0, - BPARSTR_LONG "", restab); + resvalv = + basilys_apply ((struct basilysclosure_st *) execuv, + (basilys_ptr_t) passv, "", + (union basilysparam_un *) 0, BPARSTR_LONG "", + restab); if (resvalv) restodo = (unsigned int) todol; /* force a minor GC to be sure that nothing is in the young region */ @@ -6798,6 +6945,7 @@ dispatch_execute_basilys (const char *passname) } end: BASILYS_EXITFRAME (); + return restodo; } /* decide if basilys_lowering pass has to be run */ diff --git a/gcc/basilys.h b/gcc/basilys.h index 9f0951a2ca8..dddbbdef434 100644 --- a/gcc/basilys.h +++ b/gcc/basilys.h @@ -1842,6 +1842,11 @@ char* basilys_tempdir_path(const char* basnam); basilys_ptr_t basilysgc_compile_dyn (basilys_ptr_t modata_p, const char *srcfile); +/* load a list of modules from a file whose basename MODLISTBASE is + given without its suffix '.modlis' */ +basilys_ptr_t +basilysgc_load_modulelist(basilys_ptr_t modata_p, const char *modlistbase); + /* first_module_basilys is the function start_module_basilys in first-basilys.c */ basilys_ptr_t first_module_basilys (basilys_ptr_t); diff --git a/gcc/c-common.c b/gcc/c-common.c index 7bb614971d7..0b744389224 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -575,6 +575,10 @@ static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *); static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *); static tree handle_alloc_size_attribute (tree *, tree, tree, int, bool *); +#if ENABLE_BASILYSMELT +static tree handle_melt_attribute(tree *, tree, tree, int, bool *); +#endif + static void check_function_nonnull (tree, int, tree *); static void check_nonnull_arg (void *, tree, unsigned HOST_WIDE_INT); static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); @@ -684,6 +688,12 @@ const struct attribute_spec c_common_attribute_table[] = handle_error_attribute }, { "error", 1, 1, true, false, false, handle_error_attribute }, + +#if ENABLE_BASILYSMELT + { "melt", 1, 1, true, true, true, + handle_melt_attribute }, +#endif /* ENABLE_BASILYSMELT */ + { NULL, 0, 0, false, false, false, NULL } }; @@ -5885,6 +5895,21 @@ handle_tls_model_attribute (tree *node, tree name, tree args, return NULL_TREE; } + +/* handle a "melt" attribute + */ +static tree +handle_melt_attribute(tree *node, tree name, + tree ARG_UNUSED (args), + int ARG_UNUSED (flags), + bool *no_add_attrs) +{ + warning(0, "melt attribute not implemented"); + /* perhaps we should call some closure on it */ +#warning dont know how to handle_melt_attribute + return NULL_TREE; +} + /* Handle a "no_instrument_function" attribute; arguments as in struct attribute_spec.handler. */ diff --git a/gcc/configure b/gcc/configure index 8df2bc9076b..5c64f60cea3 100755 --- a/gcc/configure +++ b/gcc/configure @@ -7400,8 +7400,8 @@ 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 +echo "$as_me:$LINENO: checking for GDBM" >&5 +echo $ECHO_N "checking for GDBM... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7414,7 +7414,7 @@ main () { GDBM_FILE f; - f = gdb_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0); + f = gdbm_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0); ; return 0; diff --git a/gcc/configure.ac b/gcc/configure.ac index f5e50129fc8..c32af5ec3fe 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -482,10 +482,10 @@ saved_LDFLAGS="$LD_FLAGS" CFLAGS="$CFLAGS $gdbminc" LIBS="$LIBS $gdbmlibs" LDFLAGS="$LDFLAGS -rdynamic" -AC_MSG_CHECKING([for LibTool Dynamic Loader]) +AC_MSG_CHECKING([for GDBM]) AC_TRY_LINK([#include <gdbm.h>],[ GDBM_FILE f; - f = gdb_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0); + f = gdbm_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 diff --git a/gcc/doc/melt.texi b/gcc/doc/melt.texi index 534d065a13d..7084a0277ee 100644 --- a/gcc/doc/melt.texi +++ b/gcc/doc/melt.texi @@ -237,7 +237,20 @@ This flag sets the initial MELT modules. They are separated by semi-colons or (on Unix only) colons. So @code{-fbasilys-init=foo:bar} or @code{'-fbasilys-init=foo;bar'} (quotes are useful for the shell running GCC) load first the @code{foo} module and then the @code{bar} -module. +module. A module starting with an at sign @code{@@} is handled as a +module list file. The @code{.modlis} extension is added, and then a +file is seeked by that name. This file is read line by line (with +empty or blank lines skipped, and comment lines starting with an hash +@code{#} skipped). Each line is the name of a module do be load in +sequence. For example, @code{-fbasilys-init=@@mylist:bar} with a file +@file{mylist.modlis} containing +@example +# file mylist.modlis ; just a comment +alpha +beta +@end example +would have the same effect as @code{-fbasilys-init=alpha:beta:bar}. +Notice that modules are seeked in several directories. @item -fbasilys-tempdir= @gccoptlist{-fbasilys-tempdir=} |