This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] in pluign mode, send gengtype output to a user specified file


Rafael Espindola wrote:
This patch changes gengtype to output all plugin information to a single file
specified in the command line.

2009-09-24  Basile Starynkevitch  <basile@starynkevitch.net>
            Rafael Avila de Espindola  <espindola@google.com>

	* gengtype.c (plugin_output): New.
	(get_output_file_with_visibility): Return plugin_output for plugins.
	(main): Parse and use the -P option.
	* gty.texi: Update the command line format.


I am not in position to OK that, but I hope it will be accepted. However, I am still observing a crash from gengtype.


I just build the rev 152265 of the trunk, and I believe I have a crash in gengtype while processing MELT as a branch. To reproduce it, go into your trunk's build directory, then

#################################################
# go into the gcc subdirectory
cd gcc

# retrieve 4 files from the MELT branch; these are enough
# to reproduce the crash :
# The 4 MELT files are
# melt-runtime.c melt-runtime.h melt-predef.list make-melt-predefh.awk

for f in melt-runtime.c melt-runtime.h \
      melt-predef.list make-melt-predefh.awk ; do
  svn cat svn://gcc.gnu.org/svn/gcc/branches/melt-branch/gcc/$f > $f
  ls $f
done


## manually build melt-predef.h using GNU awk gawk -f make-melt-predefh.awk melt-predef.list > melt-predef.h

## file melt-predef.h is only useful when compiling the plugin.
## gengtype should crash before.

# now run gengtype, replacing appropriately $GCCTRUNKSOURCETREE
build/gengtype -p $GCCTRUNKSOURCETREE/gcc gtyp-input.list \
   melt-runtime.h melt-runtime.c
####################################################


On my system (Linux Debian/Sid/AMD64) this crashes with gengtype: Internal error: abort in create_file, at gengtype.c:1490

Can anyone reproduce this bug?

(If gengtype went ok, one could even try to compile melt-runtime.c as a melt.so plugin)

My perhaps wrong intuition is that the in_plugin flag was important in my original patch http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01108.html
But I understood that Rafael might believe they are not needed anymore.


Even if PCH routines are not generated (neither I nor Rafael needs them) it seems that knowing what type descriptor is coming from the plugin files is important.

Regards.

PS at time of writing the MELT files are at revision 152265 of the MELT branch.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]