Hello!

On Thu, Dec 07, 2006 at 12:14:53AM +0100, I wrote:
> On Wed, Nov 29, 2006 at 04:28:00PM -0800, Roland McGrath wrote:
> > Using gcc driver with a custom specs file is probably not really hard.
> 
> I had a look.  After having read about that specs file language I first
> was under the same impression and was full of enthousiasm to do that.
> But it now seems to me that the specs file language is not powerful
> enough to properly handle that task and also that

To elaborate on that a bit further: from
<http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html>: ``It is built into
GCC which switches take arguments and which do not.  [...]''.  This means
we can't convince it to a syntax like ``gcc -user FILE'' or (avoiding to
pollute general name spaces) ``gcc -Xmig-user FILE'', but would have to
use a syntax like ``gcc -Xmig-user=FILE'', which seems to be a bit
awkward to use.  So far I had no succes to get a syntax like ``gcc
-Wmig,-user,FILE'' to work.  Given all that, we'd still want to use a
(shell script) frontend that keeps up the current `mig' command line
interface.  But then I don't know if it's still worthwhile to do the
specs file dance at all.


> it might not be portable enough between different versions of GCC.

To complicate matters further this was confirmed by GCC's Andrew Pinski:
``specs are an internal format really.  It is very subject to change each
release.  Also some time in the future we might decide to get rid of the
specs.'', see <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30091#c2>.


> So, did you alread have specific ideas about how to do that?

Did you mean to do this task differently from what I've outlined above?


My unfinished specs file is attached to this email.


Regards,
 Thomas
# Copyright (C) 2006 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Written by Thomas Schwinge.

.defs:
@mig-with-cpp

.cli:
@mig-with-cpp

.srv:
@mig-with-cpp

@mig-with-cpp:
%(trad_capable_cpp) %(cpp_options) %{E|M|MM:%(cpp_debug_options)} \
  %{E:%{Xmig*:%nignorning all `-Xmig-*' flags because of `-E'}} \
  %{M*:%{E:%{o*:-MT %*; \
               :%ndependency tracking output file might not be accurate}; \
          :%{Xmig-user*:-MT %*} \
           %{Xmig-server=*:-MT %*} \
           %{Xmig-header=*:-MT %*} \
           %{Xmig-sheader=*:-MT %*} \
           %{Xmig-iheaderer=*:-MT %*}}} \
%{save-temps: | tee %b.i} \
%{E:; \
  c:| /home/thomas/tmp/source/mig/HEAD-install/build/install/libexec/migcom \
        %{Xmig-*:%*}; \
   :%ehave to use `-E' or `-c' when processing `MIG' files.}

# As a special hack, if -i is specified first we don't pass -user to migcom.
# We do use the -user argument for the dependencies.
# In this case, the -user argument can have whitespace.
#
# -MD ) sawMD=1; cppflags="$cppflags $1"; shift;;
# -q suppress warning statements
# -Q print warning statements [default]
# -v verbose
# -V compile silently [default]
# -t What's that?
# -T What's that?
# -r Pass to migcom?
# -R Pass to migcom?
# -s generate symbol table in Server.c code
# -S suppress symbol table in Server.c code [default]
# -n suppress default output file names, create only given files
# -prefix | -subrprefix ) migflags="$migflags $1 $2"; shift; shift;;
# -i generate separate files for each routine / # -i ) sawI=1; 
migflags="$migflags $1 $2"; shift; shift;;
# -user FILE generate user stubs in FILE / -user ) user="$2"; if [ ! "${sawI-}" 
]; then migflags="$migflags $1 $2"; fi; shift; shift;;
# -server FILE generate server stubs in FILE / -server ) server="$2"; 
migflags="$migflags $1 $2"; shift; shift;;
# -header FILE generate stub header file in FILE / -header ) header="$2"; 
migflags="$migflags $1 $2"; shift; shift;;
# -sheader ) sheader="$2"; migflags="$migflags $1 $2"; shift; shift;;
# -iheader ) iheader="$2"; migflags="$migflags $1 $2"; shift; shift;;
# -list FILE generate list of RPC names and message IDs in FILE / -list ) 
list="$2"; migflags="$migflags $1 $2"; shift; shift;;

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to