Andreas Schwab wrote:
Basile STARYNKEVITCH <[EMAIL PROTECTED]> writes:
Actually, I just want to generate (during the build process in gcc/ subdir
in build directory) a script (basilys-gcc) invoked by cc1 with two
arguments :
the full path of some C file to generate
the stripped path (without .so or .sl or .la) of the generated dynamic
stuff
What does this script do?
It just compile a (generated) C file, eg foo.c into a dynamically
loadable shared object foo.so (at least on Linux)
On linux it would be probably
#! /bin/sh
# $1 is foo.c $2 is foo or foo.so
gcc -fPIC -shared -I...someincludedir.... $1 -o `basename $2`.so
And the ...someincludedir.... above is exactly the value of
$(melt_private_include_dir) in my gcc/Makefile.in i.e;
$(libexecsubdir)/melt-private-include/ see the
http://gcc.gnu.org/ml/gcc/2008-02/msg00673.html thread
Since this script is internal to GCC MELT branch, I would believe it
might be installed as perhaps $(libexecsubdir)/melt-gcc-build but I am
open to other suggestions (in particular, I still don't understand the
relation between the -B argument to gcc and $(libexecsubdir)).
Why can't you generate it in a separate toplevel directory?
I am not sure to understand what exactly you mean. Do you suggest to
generate this script in the toplevel (top of gcc source directory)
Makefile.tpl or do you suggest it to be generated in a yet another new
subdirectory of the topdir. My (perhaps wrong) intuition was that since
it is intimately related to cc1 it should be built in gcc/Makefile.in
(which is building cc1).
Regards.
--
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} ***