This is the mail archive of the 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: libtool for shared objects?

Andreas Schwab wrote:
Basile STARYNKEVITCH <> 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

What does this script do?

It just compile a (generated) C file, eg foo.c into a dynamically loadable shared object (at least on Linux)

On linux it would be probably
  #! /bin/sh
  # $1 is foo.c $2 is foo or
  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/ i.e; $(libexecsubdir)/melt-private-include/ see the 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/ (which is building cc1).


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]