re PR treelang/20326 (treelang does install the backend as a driver)
2005-03-06 James A. Morrison <phython@gcc.gnu.org> PR other/20326 * Make-lang.in (gtreelang, treelang/spec.o): New targets. * spec.c: New file. From-SVN: r95972
This commit is contained in:
parent
d7e5b287a0
commit
597eb1d72b
3 changed files with 86 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-03-06 James A. Morrison <phython@gcc.gnu.org>
|
||||
|
||||
PR other/20326
|
||||
* Make-lang.in (gtreelang, treelang/spec.o): New targets.
|
||||
* spec.c: New file.
|
||||
|
||||
2005-02-27 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* treelang.texi: Fix a typo.
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#
|
||||
# It should also provide rules for:
|
||||
#
|
||||
# - making any compiler driver (eg: GCC)
|
||||
# - the compiler proper (eg: treelang)
|
||||
# - making any compiler driver (eg: gcc)
|
||||
# - the compiler proper (eg: tree1)
|
||||
# - define the names for selecting the language in LANGUAGES.
|
||||
#
|
||||
|
||||
|
@ -54,7 +54,9 @@ GCC_EXTRAS = -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include
|
|||
# GCC_FOR_TREELANG = ./xgcc $(GCC_EXTRAS)
|
||||
|
||||
TREE_GENERATED = lex.c parse.c parse.h parse.output
|
||||
TREE_EXES = tree1
|
||||
# We need to use something other than treelang here because the directory
|
||||
# is called treelang
|
||||
TREE_EXES = gtreelang
|
||||
|
||||
#strict warnings for treelang
|
||||
treelang-warn = $(STRICT_WARN)
|
||||
|
@ -70,7 +72,7 @@ treelang/lex.o-warn = -Wno-error
|
|||
|
||||
treelang TREELANG:treelang.done
|
||||
|
||||
treelang.done: tree1$(exeext)
|
||||
treelang.done: gtreelang$(exeext) tree1$(exeext)
|
||||
$(STAMP) treelang.done
|
||||
|
||||
# no preprocessor
|
||||
|
@ -84,6 +86,14 @@ tree1$(exeext): treelang/tree1.o treelang/treetree.o treelang/tree-convert.o \
|
|||
treelang/lex.o treelang/parse.o \
|
||||
$(BACKEND) $(LIBS) attribs.o
|
||||
|
||||
# Create the compiler driver treelang.
|
||||
gtreelang$(exeext): gcc.o version.o prefix.o intl.o $(EXTRA_GCC_OBJS) \
|
||||
$(LIBDEPS) treelang/spec.o
|
||||
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ treelang/spec.o \
|
||||
gcc.o version.o prefix.o intl.o $(EXTRA_GCC_OBJS) $(LIBS)
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Compiling object files from source files.
|
||||
|
||||
|
@ -102,6 +112,9 @@ treelang/treetree.o: treelang/treetree.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
|||
treelang/tree-convert.o: treelang/tree-convert.c $(CONFIG_H) $(SYSTEM_H) \
|
||||
coretypes.h diagnostic.h $(TREE_H) flags.h toplev.h langhooks.h $(TM_H)
|
||||
|
||||
treelang/spec.o: treelang/spec.c $(CONFIG_H) $(SYSTEM_H) \
|
||||
coretypes.h diagnostic.h $(TREE_H) flags.h toplev.h langhooks.h $(TM_H)
|
||||
|
||||
treelang/parse.o: treelang/parse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
|
||||
$(TM_H) diagnostic.h treelang/treelang.h input.h treelang/treetree.h
|
||||
|
||||
|
|
63
gcc/treelang/spec.c
Normal file
63
gcc/treelang/spec.c
Normal file
|
@ -0,0 +1,63 @@
|
|||
/* Specific flags and argument handling of the Treelang front-end.
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GNU CC 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.
|
||||
|
||||
GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "gcc.h"
|
||||
|
||||
#include "coretypes.h"
|
||||
#include "tm.h"
|
||||
|
||||
const struct spec_function lang_specific_spec_functions[] = {{0,0}};
|
||||
|
||||
void
|
||||
lang_specific_driver (int *in_argc, const char *const **in_argv,
|
||||
int *in_added_libraries ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int argc = *in_argc, i;
|
||||
const char *const *argv = *in_argv;
|
||||
|
||||
for (i = 1; i < argc; ++i)
|
||||
{
|
||||
if (!strcmp (argv[i], "-fversion")) /* Really --version!! */
|
||||
{
|
||||
printf ("\
|
||||
GNU Treelang (GCC %s)\n\
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.\n\
|
||||
\n\
|
||||
GNU Treelang comes with NO WARRANTY, to the extent permitted by law.\n\
|
||||
You may redistribute copies of GNU Treelang\n\
|
||||
under the terms of the GNU General Public License.\n\
|
||||
For more information about these matters, see the file named COPYING\n\
|
||||
", version_string);
|
||||
exit (0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Called before linking. Returns 0 on success and -1 on failure. */
|
||||
int
|
||||
lang_specific_pre_link (void) /* Not used for Treelang. */
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Number of extra output files that lang_specific_pre_link may generate. */
|
||||
int lang_specific_extra_outfiles = 0; /* Not used for Treelang. */
|
Loading…
Add table
Reference in a new issue