summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 06:36:16 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-03 06:36:16 +0000
commitc5f9099f3c8c8e7e3a89952504f01eec289117bd (patch)
tree31e1ea273e9b3997678581b9800d1bb7d8fe5ef6 /gcc
parentc4aa078796bd9c7237e0ac5ea4ab7553106f199d (diff)
downloadgcc-c5f9099f3c8c8e7e3a89952504f01eec289117bd.tar.gz
2009-09-03 Basile Starynkevitch <basile@starynkevitch.net>
[painfully cleaned autoconf-ry so that MELT is enabled by default] * configure.ac: added more from trunk & testing for GDBM. * Makefile.def: added more from trunk, awk & sed... * Makefile.tpl: adding GDBM & more for trunk. * Makefile.in: regenerated. * configure: regenerated. [painfully cleaned autoconf-ry so that MELT is enabled by default; improved gengtype.] * gcc/configure.ac: MELT is always enabled. better GDBM support. Improved PPL stuff. Added more from trunk. * gcc/Makefile.in: added gtyp-real-input.list. Merged make dependencies from trunk. * gcc/gengtype.h: removed is_plugin_file & dbgprintf. * gcc/gengtype.c: minor fixes. See http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00047.html * gcc/melt-runtime.h: removed some #ifdef because MELT is always enabled. * gcc/run-melt.h: likewise. * gcc/common.opt: Removed Condition from every MELT option. * gcc/toplevel.c: removed some #ifdef because MELT is always enabled. (toplev_main): always initialize MELT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@151368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog.MELT18
-rw-r--r--gcc/Makefile.in60
-rw-r--r--gcc/common.opt24
-rw-r--r--gcc/config.in24
-rwxr-xr-xgcc/configure467
-rw-r--r--gcc/configure.ac209
-rw-r--r--gcc/gengtype.c117
-rw-r--r--gcc/gengtype.h7
-rw-r--r--gcc/melt-runtime.h17
-rw-r--r--gcc/run-melt.h14
-rw-r--r--gcc/toplev.c8
11 files changed, 194 insertions, 771 deletions
diff --git a/gcc/ChangeLog.MELT b/gcc/ChangeLog.MELT
index ec90e9980cf..67805b0a259 100644
--- a/gcc/ChangeLog.MELT
+++ b/gcc/ChangeLog.MELT
@@ -1,4 +1,22 @@
+2009-09-03 Basile Starynkevitch <basile@starynkevitch.net>
+ [painfully cleaned autoconf-ry so that MELT is enabled by default;
+ improved gengtype.]
+ * configure.ac: MELT is always enabled. better GDBM
+ support. Improved PPL stuff. Added more from trunk.
+ * Makefile.in: added gtyp-real-input.list. Merged make
+ dependencies from trunk.
+ * gengtype.h: removed is_plugin_file & dbgprintf.
+ * gengtype.c: minor fixes. See
+ http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00047.html
+ * melt-runtime.h: removed some #ifdef because MELT is always
+ enabled.
+ * run-melt.h: likewise.
+ * common.opt: Removed Condition from every MELT option.
+ * toplevel.c: removed some #ifdef because MELT is always
+ enabled.
+ (toplev_main): always initialize MELT.
+
2009-08-01 Basile Starynkevitch <basile@starynkevitch.net>
* melt-runtime.c (meltgc_register_pass): initialize plugpass
without C++ related warning on enum cast...
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index d2b2b4a2e62..000659dabf3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -305,15 +305,11 @@ GMPLIBS = @GMPLIBS@
GMPINC = @GMPINC@
-### for MELT
-# How to file GDBM
-GDBMLIBS = @gdbmlibs@
-GDBMINC = @gdbminc@
-GDBM_LDFLAGS= @gdbm_ldflags@
-#### end of MELT stuff
+# How to file GDBM for MELT
+GDBMLIBS = @GDBMLIBS@
+GDBMINC = @GDBMINC@
-### Graphite stuff
# How to find PPL
PPLLIBS = @PPLLIBS@
PPLINC = @PPLINC@
@@ -928,7 +924,7 @@ SCEV_H = tree-scalar-evolution.h $(GGC_H) tree-chrec.h $(PARAMS_H)
LAMBDA_H = lambda.h $(TREE_H) vec.h $(GGC_H)
TREE_DATA_REF_H = tree-data-ref.h $(LAMBDA_H) omega.h graphds.h $(SCEV_H)
VARRAY_H = varray.h $(MACHMODE_H) $(SYSTEM_H) coretypes.h $(TM_H)
-TREE_INLINE_H = tree-inline.h pointer-set.h
+TREE_INLINE_H = tree-inline.h $(GIMPLE_H)
REAL_H = real.h $(MACHMODE_H)
IRA_INT_H = ira.h ira-int.h $(CFGLOOP_H) alloc-pool.h
DBGCNT_H = dbgcnt.h dbgcnt.def
@@ -991,8 +987,8 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# How to link with both our special library facilities
# and the system's installed libraries.
LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
- $(HOST_LIBS) $(GDBMLIBS)
-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS)
+ $(HOST_LIBS)
+BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(GDBMLIBS) $(HOST_LIBS)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
@@ -1021,7 +1017,7 @@ BUILD_ERRORS = build/errors.o
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/../include @INCINTL@ \
$(CPPINC) $(GMPINC) $(DECNUMINC) \
- $(PPLINC) $(CLOOGINC)
+ $(PPLINC) $(CLOOGINC) $(GDBMINC)
.c.o:
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
@@ -1116,6 +1112,7 @@ C_OBJS = c-lang.o stub-objc.o $(C_AND_OBJC_OBJS)
# We put the insn-*.o files first so that a parallel make will build
# them sooner, because they are large and otherwise tend to be the
# last objects to finish building.
+# We then put the MELT object to be sure they are compiled early enough to catch configuration bugs...
OBJS-common = \
insn-attrtab.o \
insn-automata.o \
@@ -1128,10 +1125,10 @@ OBJS-common = \
insn-preds.o \
insn-recog.o \
$(GGC) \
+ $(MELT_OBJ) \
alias.o \
alloc-pool.o \
auto-inc-dec.o \
- $(MELT_OBJ) \
bb-reorder.o \
bitmap.o \
bt-load.o \
@@ -1421,17 +1418,17 @@ ALL_HOST_OBJS = $(GCC_OBJS) $(C_OBJS) $(OBJS) libbackend.o \
BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER)
-## gcc/configure.ac may set MELT_OBJECT to melt-runtime.o or leave it empty
-MELT_OBJ := @MELT_OBJECT@
-MELT_H= $(if $(MELT_OBJ), $(srcdir)/melt-runtime.h melt-predef.h)
-MELT_C= $(patsubst %.o, $(srcdir)/%.c, $(MELT_OBJ))
+## now we always have MELT enabled
+MELT_OBJ := melt-runtime.o
+MELT_H= $(srcdir)/melt-runtime.h melt-predef.h
+MELT_C= $(srcdir)/melt-runtime.c
MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
insn-attr.h insn-attrtab.c insn-opinit.c insn-preds.c insn-constants.h \
tm-preds.h tm-constrs.h \
tree-check.h min-insn-modes.c insn-modes.c insn-modes.h \
- genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list \
+ genrtl.c genrtl.h gt-*.h gtype-*.h gtype-desc.c gtyp-input.list gtyp-real-input.list \
xgcc$(exeext) cpp$(exeext) cc1$(exeext) cc1*-dummy$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
$(SPECS) collect2$(exeext) \
@@ -2633,7 +2630,6 @@ targhooks.o : targhooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TREE_H) \
#### added for MELT http://gcc.gnu.org/wiki/MiddleEndLispTranslator
## we pass the MELT_PRIVATE_INCLUDE_DIR
-ifdef MELT_OBJ
$(MELT_OBJ): $(MELT_C) \
$(CONFIG_H) $(SYSTEM_H) $(TIMEVAR_H) $(TM_H) $(TREE_H) $(GGC_H) \
tree-pass.h $(MELT_H) gt-melt-runtime.h $(PLUGIN_H)
@@ -2650,7 +2646,6 @@ melt-predef.h: $(srcdir)/make-melt-predefh.awk $(srcdir)/melt-predef.list
warmelt-predef.melt: $(srcdir)/melt-predef.list $(srcdir)/make-warmelt-predef.awk
$(AWK) -f $(srcdir)/make-warmelt-predef.awk $< > $@-tmp
$(SHELL) $(srcdir)/../move-if-change $@-tmp $@
-endif
### end of Melt stuff
bversion.h: s-bversion; @true
@@ -2703,7 +2698,7 @@ rtl.o : rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
print-rtl.o : print-rtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h $(BASIC_BLOCK_H) $(FLAGS_H) \
- $(BCONFIG_H) $(REAL_H) $(DIAGNOSTIC_H)
+ $(BCONFIG_H) $(REAL_H) $(DIAGNOSTIC_H) cselib.h
rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) \
$(RTL_H) hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) $(REAL_H) \
$(FLAGS_H) $(REGS_H) output.h $(TARGET_H) $(FUNCTION_H) $(TREE_H) \
@@ -2882,8 +2877,9 @@ coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(HASHTAB_H) tree-iterator.h $(CGRAPH_H) $(TREE_PASS_H) gcov-io.c $(TM_P_H)
cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(REGS_H) hard-reg-set.h $(FLAGS_H) $(REAL_H) insn-config.h $(RECOG_H) \
- $(EMIT_RTL_H) $(TOPLEV_H) output.h $(FUNCTION_H) cselib.h $(GGC_H) $(TM_P_H) \
- gt-cselib.h $(PARAMS_H) alloc-pool.h $(HASHTAB_H) $(TARGET_H)
+ $(EMIT_RTL_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TREE_PASS_H) \
+ cselib.h gt-cselib.h $(GGC_H) $(TM_P_H) $(PARAMS_H) alloc-pool.h \
+ $(HASHTAB_H) $(TARGET_H)
cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h $(FLAGS_H) insn-config.h $(RECOG_H) $(EXPR_H) $(TOPLEV_H) \
output.h $(FUNCTION_H) $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
@@ -2973,7 +2969,7 @@ regstat.o : regstat.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
var-tracking.o : var-tracking.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(TREE_H) hard-reg-set.h insn-config.h reload.h $(FLAGS_H) \
$(BASIC_BLOCK_H) output.h sbitmap.h alloc-pool.h $(FIBHEAP_H) $(HASHTAB_H) \
- $(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H)
+ $(REGS_H) $(EXPR_H) $(TIMEVAR_H) $(TREE_PASS_H) cselib.h $(TARGET_H)
profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) $(FUNCTION_H) \
$(TOPLEV_H) $(COVERAGE_H) $(TREE_FLOW_H) value-prof.h cfghooks.h \
@@ -3549,6 +3545,13 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(MELT_C) \
@all_gtfiles@
+
+## compute the real path of above GTFILES - keeping language tags as
+## before. There are cases where this don't work (e.g. some
+## automount-ed file systems). This could be useful in plugin mode of
+## gengtype.
+REALGTFILES = $(foreach f, $(GTFILES), $(if $(patsubst [%],,$f), $(realpath $f), $f))
+
# Compute the list of GT header files from the corresponding C sources,
# possibly nested within config or language subdirectories. Match gengtype's
# behavior in this respect: gt-LANG-file.h for "file" anywhere within a LANG
@@ -3570,10 +3573,17 @@ ALL_GTFILES_H := $(sort $(GTFILES_H) $(GTFILES_LANG_H))
$(ALL_GTFILES_H) gtype-desc.c gtype-desc.h : s-gtype ; @true
-gtyp-input.list: s-gtyp-input ; @true
+## we generate the gtyp-real-input.list only for convenience of
+## plugins needing GCC and using gengtype in plugin mode. The
+## gtyp-real-input.list file contains only absolute paths, it may not
+## work in some cases (e.g. perhaps when build tree is auto-mount-ed).
+
+gtyp-input.list gtyp-real-input.list: s-gtyp-input ; @true
s-gtyp-input: Makefile
@: $(call write_entries_to_file,$(GTFILES),tmp-gi.list)
$(SHELL) $(srcdir)/../move-if-change tmp-gi.list gtyp-input.list
+ @: $(call write_entries_to_file,$(REALGTFILES),tmp-realgi.list)
+ $(SHELL) $(srcdir)/../move-if-change tmp-realgi.list gtyp-real-input.list
$(STAMP) s-gtyp-input
s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
@@ -4119,7 +4129,7 @@ mostlyclean: lang.mostlyclean
# Delete core dumps.
-rm -f core */core
# Delete file generated for gengtype
- -rm -f gtyp-input.list
+ -rm -f gtyp-input.list t gtyp-real-input.list
# Delete files generated by gengtype.c
-rm -f gtype-*
-rm -f gt-*
diff --git a/gcc/common.opt b/gcc/common.opt
index a4f0645ec3c..5fd8e172955 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -332,64 +332,64 @@ Generate auto-inc/dec instructions
;;;;;; MELT stuff
; Midlle End Lisp Translator by Basile Starynkevitch (source file gcc/melt-runtime.c)
fmelt=
-Common Report Var(melt_mode_string) Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_mode_string) Joined
Basile's mode with command or analysis to run. Uses -fmelt=help for more.
; argument string for melt
fmelt-arg=
-Common Report Var(melt_argument_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_argument_string) RejectNegative Joined
Initial argument for melt analysis
; argument list string for melt
fmelt-arglist=
-Common Report Var(melt_arglist_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_arglist_string) RejectNegative Joined
Initial comma separated argument list for melt analysis
; compile script used to compile C files generated by melt
fmelt-compile-script=
-Common Report Var(melt_compile_script_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_compile_script_string) RejectNegative Joined
compile script invoked by melt on generated C files
; debug flag for above analysis
fmelt-debug
-Common Report Var(flag_melt_debug) Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(flag_melt_debug)
Gives lots of debugging stuff for -fmelt analysis
; debug skip for above analysis
fmelt-debugskip=
-Common Report Var(count_melt_debugskip_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(count_melt_debugskip_string) RejectNegative Joined
Counter of debug prints to skip for -fmelt-debug
; dynamic module path for MELT
fmelt-module-path=
-Common Report Var(melt_dynmodpath_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_dynmodpath_string) RejectNegative Joined
Dynamic module colon-separated path for MELT [or $GCCMELT_MODULE_PATH]
; shared GDBM indexed file to keep state
fmelt-gdbmstate=
-Common Report Var(melt_gdbmstate_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_gdbmstate_string) RejectNegative Joined
Shared GDBM state indexed file. Should be explicitly given.
; source path for melt -either *.melt or *.c files
fmelt-source-path=
-Common Report Var(melt_srcpath_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_srcpath_string) RejectNegative Joined
Source colon-separated path for MELT [or $GCCMELT_SOURCE_PATH]
; initial C or dynamic lib modules for above analysis
fmelt-init=
-Common Report Var(melt_init_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_init_string) RejectNegative Joined
Initial colon separated list of modules for -fmelt analysis (dynamic C mode)
; second argument string for melt
fmelt-secondarg=
-Common Report Var(melt_secondargument_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_secondargument_string) RejectNegative Joined
Second argument for melt analysis
; temporary directory for melt
fmelt-tempdir=
-Common Report Var(melt_tempdir_string) RejectNegative Joined Condition(HAVE_PARMAPOLY && ENABLE_MELT)
+Common Report Var(melt_tempdir_string) RejectNegative Joined
Temporary directory for melt (is not cleaned if specified)
diff --git a/gcc/config.in b/gcc/config.in
index d018e6c2f96..050c0578521 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -113,12 +113,6 @@
#endif
-/* Define if MELT (Middle End Lisp Translator) is in use. */
-#ifndef USED_FOR_TARGET
-#undef ENABLE_MELT
-#endif
-
-
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#ifndef USED_FOR_TARGET
@@ -966,12 +960,6 @@
#endif
-/* Define if GDBM is in use. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_GDBM
-#endif
-
-
/* Define to 1 if you have the `getchar_unlocked' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_GETCHAR_UNLOCKED
@@ -1211,18 +1199,6 @@
#endif
-/* Define if we have a open_memstream for memory FILE* */
-#ifndef USED_FOR_TARGET
-#undef HAVE_OPEN_MEMSTREAM
-#endif
-
-
-/* Define if Parma Polyhedra Library is in use. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_PARMAPOLY
-#endif
-
-
/* Define to 1 if you have the `putchar_unlocked' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_PUTCHAR_UNLOCKED
diff --git a/gcc/configure b/gcc/configure
index 90b352c20a2..1c391bf6ddf 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -743,6 +743,8 @@ enable_plugin
pluginlibs
CLOOGINC
CLOOGLIBS
+GDBMINC
+GDBMLIBS
PPLINC
PPLLIBS
GMPINC
@@ -913,12 +915,6 @@ c_strict_warn
strict_warn
c_loose_warn
loose_warn
-MELT_OBJECT
-gdbm_ldflags
-gdbminc
-gdbmlibs
-pplinc
-ppllibs
EGREP
GREP
CPP
@@ -1005,13 +1001,6 @@ with_ld
with_demangler_in_ld
with_gnu_as
with_as
-with_ppl
-with_ppl_include
-with_ppl_lib
-with_gdbm
-with_gdbm_include
-with_gdbm_lib
-enable_melt
enable_werror_always
enable_checking
enable_coverage
@@ -1073,6 +1062,8 @@ GMPLIBS
GMPINC
PPLLIBS
PPLINC
+GDBMLIBS
+GDBMINC
CLOOGLIBS
CLOOGINC'
@@ -1697,11 +1688,6 @@ Optional Features:
put copies of generated files in source dir
intended for creating source tarballs for users
without texinfo bison or flex.
- --enable-melt Enable MELT
-passes; This enable complex (sciptable) passes using the Middle End
-Lisp Translator feature (which dynamically translates the MELT lisp
-dialect into C plug-in like code); This requires PPL (Parma Polyhedra
-Library) and GDBM support.
--enable-werror-always enable -Werror despite compiler version
--enable-checking=LIST
enable expensive run-time checks. With LIST,
@@ -1778,16 +1764,6 @@ Optional Packages:
--with-demangler-in-ld try to use demangler in GNU ld.
--with-gnu-as arrange to work with GNU as
--with-as arrange to use the specified as (full pathname)
- --with-ppl=PATH Specify prefix directory for installed Parma Polyedra Library (PPL)
- Equivalent to --with-ppl-include=PATH/include
- plus --with-ppl-lib=PATH/lib
- --with-ppl-include=PATH Specify directory for installed PPL include files
- --with-ppl-lib=PATH Specify the directory for the installed PPL library
- --with-gdbm=PATH Specify prefix directory for installed GDBM library
- Equivalent to --with-gdbm-include=PATH/include
- plus --with-gdbm-lib=PATH/lib
- --with-gdbm-include=PATH Specify directory for installed GDBM include files
- --with-gdbm-lib=PATH Specify the directory for the installed GDBM library
--with-stabs arrange to use stabs instead of host debug format
--with-dwarf2 force the default debug format to be DWARF 2
--with-build-sysroot=sysroot
@@ -1825,6 +1801,8 @@ Some influential environment variables:
GMPINC How to find GMP include files
PPLLIBS How to link PPL
PPLINC How to find PPL include files
+ GDBMLIBS How to link GDBM
+ GDBMINC How to find GDBM include files
CLOOGLIBS How to link CLOOG
CLOOGINC How to find CLOOG include files
@@ -2413,6 +2391,35 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
+# ac_fn_c_check_header_preproc LINENO HEADER VAR
+# ----------------------------------------------
+# Tests whether HEADER is present, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_preproc ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_preproc
+
# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2459,35 +2466,6 @@ fi
} # ac_fn_c_try_link
-# ac_fn_c_check_header_preproc LINENO HEADER VAR
-# ----------------------------------------------
-# Tests whether HEADER is present, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_preproc ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f conftest.err conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_preproc
-
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -5727,328 +5705,6 @@ _ACEOF
fi
-################################################
-##### MELT specific stuff
-##### (Middle End Lisp Translator)
-################
-# Check for PPL (Parma Polyhedral Library)
-ppllibs=
-pplinc=
-have_ppl=yes
-
-
-# Check whether --with-ppl was given.
-if test "${with_ppl+set}" = set; then :
- withval=$with_ppl;
-fi
-
-
-# Check whether --with-ppl_include was given.
-if test "${with_ppl_include+set}" = set; then :
- withval=$with_ppl_include;
-fi
-
-
-# Check whether --with-ppl_lib was given.
-if test "${with_ppl_lib+set}" = set; then :
- withval=$with_ppl_lib;
-fi
-
-
-
-if test "x$with_ppl" != x; then
- ppllibs="-L$with_ppl/lib -lppl_c -lppl $ppllibs"
- pplinc="-I$with_ppl/include"
-fi
-
-if test "x$ppl_include" != x; then
- pplinc="-I$ppl_include $pplinc"
-fi
-
-if test "x$ppl_lib" != x; then
- ppllibs="-L$ppl_lib -lppl_c -lppl $ppllibs"
-fi
-
-## check for Parma Polyedra Lib
-saved_CFLAGS="$CFLAGS"
-saved_LIBS="$LIBS"
-CFLAGS="$CFLAGS $pplinc $gmpinc $ppllibs $gmplibs"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct version of ppl_c.h" >&5
-$as_echo_n "checking for correct version of ppl_c.h... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ppl_c.h>
-int
-main ()
-{
-
-ppl_version_major();
-ppl_io_asprint_Coefficient((char**)0, (ppl_Coefficient_t)0);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; have_ppl=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; have_ppl=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-# one some systems, PPL requires an additional C++ wrapping library for GMP
-# namely -lgmpxx ahead of -lgmp
-if test x"$have_ppl" != xyes; then
- saved_LIBS="$LIBS"
- ppllibs="-lgmpxx $ppllibs"
- #maybe we should do:: gmplibs=`echo "$gmplibs" | sed -e 's/-lgmp/-lgmpxx -lgmp/'`
- CFLAGS="$CFLAGS $pplinc $gmpinc $ppllibs $gmplibs"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmpxx needed by ppl" >&5
-$as_echo_n "checking for libgmpxx needed by ppl... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ppl_c.h>
-int
-main ()
-{
-
- ppl_version_major();
- ppl_io_asprint_Coefficient((char**)0, (ppl_Coefficient_t)0);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; have_ppl=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; have_ppl=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-if test x"$have_ppl" = xyes; then
-
-$as_echo "#define HAVE_PARMAPOLY 1" >>confdefs.h
-
-fi
-LIBS="$saved_LIBS"
-CFLAGS="$saved_CFLAGS"
-
-if test -d ${srcdir}/gcc && test x$have_ppl != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Some passes of GCC require PPL 0.10.2 or newer.
-Try the --with-ppl option to specify the installed PPL location,
-or specify separately --with-ppl-include=DIRINCL --with-ppl-lib=DIRLIB.
-Copies of this library source code can be found at its respective
-hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info." >&5
-$as_echo "$as_me: WARNING: Some passes of GCC require PPL 0.10.2 or newer.
-Try the --with-ppl option to specify the installed PPL location,
-or specify separately --with-ppl-include=DIRINCL --with-ppl-lib=DIRLIB.
-Copies of this library source code can be found at its respective
-hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info." >&2;}
-fi
-
-# Flags needed for PPL
-
-
-
-
-
-################
-# Check for GDBM (GNU DBM - sort of database (actually inderxed file)
-gdbmlibs="-lgdbm"
-gdbminc=
-have_gdbm=yes
-
-
-# Check whether --with-gdbm was given.
-if test "${with_gdbm+set}" = set; then :
- withval=$with_gdbm;
-fi
-
-
-
-# Check whether --with-gdbm_include was given.
-if test "${with_gdbm_include+set}" = set; then :
- withval=$with_gdbm_include;
-fi
-
-
-# Check whether --with-gdbm_lib was given.
-if test "${with_gdbm_lib+set}" = set; then :
- withval=$with_gdbm_lib;
-fi
-
-
-
-if test "x$with_gdbm" != x; then
- gdbmlibs="-L$with_gdbm/lib -lgdbm"
- gdbminc="-I$with_gdbm/include"
-fi
-
-if test "x$gdbm_include" != x; then
- gdbminc="-I$gdbm_include $gdbminc"
-fi
-
-if test "x$gdbm_lib" != x; then
- gdbmlibs="-L$gdbm_lib -lgdbm $gdbmlibs"
-fi
-
-gdbm_ldflags=""
-
-saved_CFLAGS="$CFLAGS"
-saved_LIBS="$LIBS"
-saved_LDFLAGS="$LD_FLAGS"
-CFLAGS="$CFLAGS $gdbminc"
-LIBS="$LIBS $gdbmlibs"
-LDFLAGS="$LDFLAGS -rdynamic"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDBM" >&5
-$as_echo_n "checking for GDBM... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <gdbm.h>
-int
-main ()
-{
-
- GDBM_FILE f;
- f = gdbm_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; have_gdbm=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; have_gdbm=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-if test "x$have_gdbm" != xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Some passes of GCC require GDBM.
-Try the --with-gdbm option to specify the installed GDBM location.
-Copies of this library source code can be found at its respective
-hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info." >&5
-$as_echo "$as_me: WARNING: Some passes of GCC require GDBM.
-Try the --with-gdbm option to specify the installed GDBM location.
-Copies of this library source code can be found at its respective
-hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info." >&2;}
-else
-
-$as_echo "#define HAVE_GDBM 1" >>confdefs.h
-
-fi
-
-CFLAGS="$saved_CFLAGS"
-LIBS="$saved_LIBS"
-LDFLAGS="$saved_LDFLAGS"
-
-# Flags needed for GDBM
-
-
-
-
-
-# for debugging only
-echo '%!%' after GDBM LIBS= $LIBS CFLAGS= $CFLAGS
-
-## Compiler probe support remove in svn rev 148272
-
-
-### check for open_memstream, a GNU libc extension useful to MELT,
-### since it opens a FILE* outputing to malloc-ed memory
-have_open_memstream=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for open_memstream" >&5
-$as_echo_n "checking for open_memstream... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- char* mem = NULL;
- size_t sz = 0;
- FILE* f = open_memstream(&mem, &sz);
- fprintf (f, "hello argc=%d argv1=%s", argc, (argc>1)?argv[1]:"");
- fflush (f);
- printf ("mem=%s sz=%d\n", mem, (int) sz);
- free(mem);
- return 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; have_open_memstream=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; have_open_memstream=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-if test "$have_open_memstream" = "yes" ; then
-
-$as_echo "#define HAVE_OPEN_MEMSTREAM 1" >>confdefs.h
-
-fi
-
-# ------------------------
-# MELT support (middle-end lisp translator)
-# ------------------------
-enabled_melt=no
-MELT_OBJECT=
-
-# Check whether --enable-melt was given.
-if test "${enable_melt+set}" = set; then :
- enableval=$enable_melt; enabled_melt=$enableval
-else
- enabled_melt=no
-fi
-
-
-if test "$enabled_melt" = "yes" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for features required for melt" >&5
-$as_echo_n "checking for features required for melt... " >&6; }
- if test "$have_ppl" != "yes" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your system lacks the Parma Polyhedra Library (PPL) required for MELT.
-Hence MELT is disabled." >&5
-$as_echo "$as_me: WARNING: Your system lacks the Parma Polyhedra Library (PPL) required for MELT.
-Hence MELT is disabled." >&2;};
- enabled_melt=no;
- fi
-fi
-
-if test "$enabled_melt" = "yes" ; then
-
-$as_echo "#define ENABLE_MELT 1" >>confdefs.h
-
-
- MELT_OBJECT=melt-runtime.o
-fi
-
-###################### end of MELT specific stuff
-################################################################
-
# ---------------------
# Warnings and checking
# ---------------------
@@ -11428,13 +11084,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:11431: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:11087: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:11434: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:11090: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:11437: output\"" >&5)
+ (eval echo "\"\$as_me:11093: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -12639,7 +12295,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 12642 "configure"' > conftest.$ac_ext
+ echo '#line 12298 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -14299,11 +13955,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14302: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13958: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14306: \$? = $ac_status" >&5
+ echo "$as_me:13962: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14638,11 +14294,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14641: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14297: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14645: \$? = $ac_status" >&5
+ echo "$as_me:14301: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14743,11 +14399,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14746: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14402: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14750: \$? = $ac_status" >&5
+ echo "$as_me:14406: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14798,11 +14454,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14801: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14457: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14805: \$? = $ac_status" >&5
+ echo "$as_me:14461: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17180,7 +16836,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17183 "configure"
+#line 16839 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17276,7 +16932,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17279 "configure"
+#line 16935 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -19232,11 +18888,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19235: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18891: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:19239: \$? = $ac_status" >&5
+ echo "$as_me:18895: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -19331,11 +18987,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19334: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18990: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19338: \$? = $ac_status" >&5
+ echo "$as_me:18994: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19383,11 +19039,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:19386: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:19042: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:19390: \$? = $ac_status" >&5
+ echo "$as_me:19046: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -24673,6 +24329,9 @@ esac
+
+
+
if test "x${CLOOGLIBS}" != "x" ; then
$as_echo "#define HAVE_cloog 1" >>confdefs.h
@@ -24813,16 +24472,6 @@ ac_config_files="$ac_config_files $all_outputs"
ac_config_commands="$ac_config_commands default"
-
-## Basile adds a notice if the MELT branch is configured without
-## --enable-melt
-if test "$enabled_melt" != "yes" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: GCC MELT branch is configured WITHOUT enabling melt.
- Are you sure to want that?" >&5
-$as_echo "$as_me: GCC MELT branch is configured WITHOUT enabling melt.
- Are you sure to want that?" >&6;}
-fi
-
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
diff --git a/gcc/configure.ac b/gcc/configure.ac
index f3b23d86113..0621da36a5a 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -312,203 +312,6 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
-################################################
-##### MELT specific stuff
-##### (Middle End Lisp Translator)
-################
-# Check for PPL (Parma Polyhedral Library)
-ppllibs=
-pplinc=
-have_ppl=yes
-
-AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for installed Parma Polyedra Library (PPL)
- Equivalent to --with-ppl-include=PATH/include
- plus --with-ppl-lib=PATH/lib])
-AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
-AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
-
-
-if test "x$with_ppl" != x; then
- ppllibs="-L$with_ppl/lib -lppl_c -lppl $ppllibs"
- pplinc="-I$with_ppl/include"
-fi
-
-if test "x$ppl_include" != x; then
- pplinc="-I$ppl_include $pplinc"
-fi
-
-if test "x$ppl_lib" != x; then
- ppllibs="-L$ppl_lib -lppl_c -lppl $ppllibs"
-fi
-
-## check for Parma Polyedra Lib
-saved_CFLAGS="$CFLAGS"
-saved_LIBS="$LIBS"
-CFLAGS="$CFLAGS $pplinc $gmpinc $ppllibs $gmplibs"
-AC_MSG_CHECKING([for correct version of ppl_c.h])
-AC_TRY_LINK([#include <ppl_c.h>],[
-ppl_version_major();
-ppl_io_asprint_Coefficient((char**)0, (ppl_Coefficient_t)0);
-], [AC_MSG_RESULT([yes]); have_ppl=yes], [AC_MSG_RESULT([no]); have_ppl=no])
-
-# one some systems, PPL requires an additional C++ wrapping library for GMP
-# namely -lgmpxx ahead of -lgmp
-if test x"$have_ppl" != xyes; then
- saved_LIBS="$LIBS"
- ppllibs="-lgmpxx $ppllibs"
- #maybe we should do:: gmplibs=`echo "$gmplibs" | sed -e 's/-lgmp/-lgmpxx -lgmp/'`
- CFLAGS="$CFLAGS $pplinc $gmpinc $ppllibs $gmplibs"
- AC_MSG_CHECKING([for libgmpxx needed by ppl])
- AC_TRY_LINK([#include <ppl_c.h>],[
- ppl_version_major();
- ppl_io_asprint_Coefficient((char**)0, (ppl_Coefficient_t)0);
-], [AC_MSG_RESULT([yes]); have_ppl=yes], [AC_MSG_RESULT([no]); have_ppl=no])
-fi
-if test x"$have_ppl" = xyes; then
- AC_DEFINE(HAVE_PARMAPOLY, 1, [Define if Parma Polyhedra Library is in use.])
-fi
-LIBS="$saved_LIBS"
-CFLAGS="$saved_CFLAGS"
-
-if test -d ${srcdir}/gcc && test x$have_ppl != xyes; then
- AC_MSG_WARN([Some passes of GCC require PPL 0.10.2 or newer.
-Try the --with-ppl option to specify the installed PPL location,
-or specify separately --with-ppl-include=DIRINCL --with-ppl-lib=DIRLIB.
-Copies of this library source code can be found at its respective
-hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info.])
-fi
-
-# Flags needed for PPL
-AC_SUBST(ppllibs)
-AC_SUBST(pplinc)
-
-
-
-################
-# Check for GDBM (GNU DBM - sort of database (actually inderxed file)
-gdbmlibs="-lgdbm"
-gdbminc=
-have_gdbm=yes
-
-AC_ARG_WITH(gdbm, [ --with-gdbm=PATH Specify prefix directory for installed GDBM library
- Equivalent to --with-gdbm-include=PATH/include
- plus --with-gdbm-lib=PATH/lib])
-
-AC_ARG_WITH(gdbm_include, [ --with-gdbm-include=PATH Specify directory for installed GDBM include files])
-AC_ARG_WITH(gdbm_lib, [ --with-gdbm-lib=PATH Specify the directory for the installed GDBM library])
-
-
-if test "x$with_gdbm" != x; then
- gdbmlibs="-L$with_gdbm/lib -lgdbm"
- gdbminc="-I$with_gdbm/include"
-fi
-
-if test "x$gdbm_include" != x; then
- gdbminc="-I$gdbm_include $gdbminc"
-fi
-
-if test "x$gdbm_lib" != x; then
- gdbmlibs="-L$gdbm_lib -lgdbm $gdbmlibs"
-fi
-
-gdbm_ldflags=""
-
-saved_CFLAGS="$CFLAGS"
-saved_LIBS="$LIBS"
-saved_LDFLAGS="$LD_FLAGS"
-CFLAGS="$CFLAGS $gdbminc"
-LIBS="$LIBS $gdbmlibs"
-LDFLAGS="$LDFLAGS -rdynamic"
-AC_MSG_CHECKING([for GDBM])
-AC_TRY_LINK([#include <gdbm.h>],[
- GDBM_FILE f;
- f = gdbm_open("testfor.gdbm", 0, 0, GDBM_WRCREAT, 0);
-], [AC_MSG_RESULT([yes]); have_gdbm=yes], [AC_MSG_RESULT([no]); have_gdbm=no])
-
-if test "x$have_gdbm" != xyes; then
- AC_MSG_WARN([Some passes of GCC require GDBM.
-Try the --with-gdbm option to specify the installed GDBM location.
-Copies of this library source code can be found at its respective
-hosting site as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
-See also http://gcc.gnu.org/install/prerequisites.html for additional info.])
-else
- AC_DEFINE(HAVE_GDBM, 1,
- [Define if GDBM is in use.])
-fi
-
-CFLAGS="$saved_CFLAGS"
-LIBS="$saved_LIBS"
-LDFLAGS="$saved_LDFLAGS"
-
-# Flags needed for GDBM
-AC_SUBST(gdbmlibs)
-AC_SUBST(gdbminc)
-AC_SUBST(gdbm_ldflags)
-
-
-# for debugging only
-echo '%!%' after GDBM LIBS= $LIBS CFLAGS= $CFLAGS
-
-## Compiler probe support remove in svn rev 148272
-
-
-### check for open_memstream, a GNU libc extension useful to MELT,
-### since it opens a FILE* outputing to malloc-ed memory
-have_open_memstream=no
-AC_MSG_CHECKING([for open_memstream])
-AC_TRY_LINK([
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>],[
- char* mem = NULL;
- size_t sz = 0;
- FILE* f = open_memstream(&mem, &sz);
- fprintf (f, "hello argc=%d argv1=%s", argc, (argc>1)?argv[1]:"");
- fflush (f);
- printf ("mem=%s sz=%d\n", mem, (int) sz);
- free(mem);
- return 0;
-], [AC_MSG_RESULT([yes]); have_open_memstream=yes],
- [AC_MSG_RESULT([no]); have_open_memstream=no])
-
-if test "$have_open_memstream" = "yes" ; then
- AC_DEFINE(HAVE_OPEN_MEMSTREAM, 1,
- [Define if we have a open_memstream for memory FILE*])
-fi
-
-# ------------------------
-# MELT support (middle-end lisp translator)
-# ------------------------
-enabled_melt=no
-MELT_OBJECT=
-
-AC_ARG_ENABLE(melt, [ --enable-melt Enable MELT
-passes; This enable complex (sciptable) passes using the Middle End
-Lisp Translator feature (which dynamically translates the MELT lisp
-dialect into C plug-in like code); This requires PPL (Parma Polyhedra
-Library) and GDBM support.],
-enabled_melt=$enableval, enabled_melt=no)
-
-if test "$enabled_melt" = "yes" ; then
- AC_MSG_CHECKING([for features required for melt])
- if test "$have_ppl" != "yes" ; then
- AC_MSG_WARN([Your system lacks the Parma Polyhedra Library (PPL) required for MELT.
-Hence MELT is disabled.]);
- enabled_melt=no;
- fi
-fi
-
-if test "$enabled_melt" = "yes" ; then
- AC_DEFINE(ENABLE_MELT, 1,
- [Define if MELT (Middle End Lisp Translator) is in use.])
-
- MELT_OBJECT=melt-runtime.o
-fi
-AC_SUBST(MELT_OBJECT)
-###################### end of MELT specific stuff
-################################################################
-
# ---------------------
# Warnings and checking
# ---------------------
@@ -4312,6 +4115,9 @@ esac
AC_ARG_VAR(PPLLIBS,[How to link PPL])
AC_ARG_VAR(PPLINC,[How to find PPL include files])
+AC_ARG_VAR(GDBMLIBS,[How to link GDBM])
+AC_ARG_VAR(GDBMINC,[How to find GDBM include files])
+
AC_ARG_VAR(CLOOGLIBS,[How to link CLOOG])
AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files])
if test "x${CLOOGLIBS}" != "x" ; then
@@ -4406,13 +4212,4 @@ do
done
],
[subdirs='$subdirs'])
-
-## Basile adds a notice if the MELT branch is configured without
-## --enable-melt
-if test "$enabled_melt" != "yes" ; then
- AC_MSG_NOTICE(
-[GCC MELT branch is configured WITHOUT enabling melt.
- Are you sure to want that?])
-fi
-
AC_OUTPUT
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index c0e044ba414..d831648e0fd 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -24,7 +24,6 @@
#include "errors.h" /* for fatal */
#include "double-int.h"
-
/* Data types, macros, etc. used only in this file. */
/* Kinds of types we can understand. */
@@ -65,7 +64,7 @@ struct pair
type_p type;
struct fileloc line;
options_p opt;
- bool inplugin; /* flag set if appearing inside a plugin */
+ bool in_plugin; /* flag set if appearing inside a plugin */
};
#define NUM_PARAM 10
@@ -85,7 +84,7 @@ struct type
type_p next;
type_p pointer_to;
enum gc_used_enum gc_used;
- bool inplugin;
+ bool in_plugin;
union {
type_p p;
struct {
@@ -154,9 +153,8 @@ static int first_plugin_file_ix= -1;
static char* plugin_output_filename;
static outf_p plugin_output;
-
/* The output header file that is included into pretty much every
- source file. */
+ source file. It is not generated in plugin mode! */
static outf_p header_file;
/* Source directory. */
@@ -176,10 +174,10 @@ static const char * get_file_langdir (const char *);
/* Nonzero iff an error has occurred. */
-bool hit_error = FALSE;
-/* Flag set when parsing a plugin file */
-bool is_plugin_file = FALSE;
+bool hit_error = false;
+/* Flag set when parsing a plugin file */
+static bool is_plugin_file = false;
static void gen_rtx_next (void);
static void write_rtx_next (void);
@@ -480,7 +478,17 @@ read_input_list (const char *listname)
int i;
first_plugin_file_ix = nfiles;
for (i = 0; i < nb_plugin_files; i++)
- gt_files[nfiles++] = plugin_files[i];
+ {
+ /* Place an all zero lang_bitmap before the plugin file
+ name. */
+ int plugfilen = strlen (plugin_files[i]);
+ char* plugent =
+ (char*) xcalloc (1, plugfilen + 1 + sizeof (lang_bitmap));
+ plugent += sizeof (lang_bitmap);
+ strcpy (plugent, plugin_files[i]);
+ gt_files[nfiles++] = plugent;
+ /* We don't bother freeing plugent! */
+ }
}
num_gt_files = nfiles;
}
@@ -678,9 +686,9 @@ new_structure (const char *name, int isunion, struct fileloc *pos,
isunion ? "union" : "struct", s->u.s.tag);
error_at_line (&s->u.s.line, "previous definition here");
}
-
+
s->kind = isunion ? TYPE_UNION : TYPE_STRUCT;
- s->inplugin = is_plugin_file;
+ s->in_plugin = is_plugin_file;
s->u.s.tag = name;
s->u.s.line = *pos;
s->u.s.fields = fields;
@@ -725,7 +733,7 @@ find_structure (const char *name, int isunion)
s->next = structures;
structures = s;
s->kind = isunion ? TYPE_UNION : TYPE_STRUCT;
- s->inplugin = is_plugin_file;
+ s->in_plugin = is_plugin_file;
s->u.s.tag = name;
structures = s;
return s;
@@ -749,7 +757,7 @@ find_param_structure (type_p t, type_p param[NUM_PARAM])
{
res = XCNEW (struct type);
res->kind = TYPE_PARAM_STRUCT;
- res->inplugin = is_plugin_file;
+ res->in_plugin = is_plugin_file;
res->next = param_structs;
param_structs = res;
res->u.param_struct.stru = t;
@@ -778,7 +786,7 @@ create_pointer (type_p t)
{
type_p r = XCNEW (struct type);
r->kind = TYPE_POINTER;
- r->inplugin = is_plugin_file;
+ r->in_plugin = is_plugin_file;
r->u.p = t;
t->pointer_to = r;
}
@@ -794,7 +802,7 @@ create_array (type_p t, const char *len)
v = XCNEW (struct type);
v->kind = TYPE_ARRAY;
- v->inplugin = is_plugin_file;
+ v->in_plugin = is_plugin_file;
v->u.a.p = t;
v->u.a.len = len;
return v;
@@ -839,7 +847,7 @@ note_variable (const char *s, type_p t, options_p o, struct fileloc *pos)
n->line = *pos;
n->opt = o;
n->next = variables;
- n->inplugin = is_plugin_file;
+ n->in_plugin = is_plugin_file;
variables = n;
}
@@ -1584,11 +1592,8 @@ open_base_files (void)
if (nb_plugin_files > 0 && plugin_files)
return;
-
- /* header file should be generated even in plugin mode */
- header_file = create_file ("GCC", "gtype-desc.h");
-
+ header_file = create_file ("GCC", "gtype-desc.h");
base_files = XNEWVEC (outf_p, num_lang_dirs);
@@ -1606,10 +1611,8 @@ open_base_files (void)
"hard-reg-set.h", "basic-block.h", "cselib.h", "insn-addr.h",
"optabs.h", "libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
"tree-flow.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
- "cfglayout.h", "except.h", "output.h", "gimple.h", "cfgloop.h",
-#if ENABLE_MELT
+ "cfglayout.h", "except.h", "output.h", "gimple.h", "cfgloop.h",
"melt-runtime.h",
-#endif
NULL
};
const char *const *ifp;
@@ -1744,7 +1747,7 @@ get_output_file_with_visibility (const char *input_file)
{
outf_p r;
size_t len;
- const char *base_name;
+ const char *basename;
const char *for_name;
const char *output_name;
@@ -1755,7 +1758,7 @@ get_output_file_with_visibility (const char *input_file)
input_file = "system.h";
/* In plugin mode, return NULL unless the input_file is one of the
- plugin_files or is the specified plugin_output_filename */
+ plugin_files or is the specified plugin_output_filename. */
if (plugin_files && nb_plugin_files > 0)
{
int ix= -1, i;
@@ -1763,53 +1766,52 @@ get_output_file_with_visibility (const char *input_file)
if (strcmp (input_file, plugin_files[i]) == 0)
ix = i;
if (ix < 0
- && plugin_output_filename && strcmp (input_file, plugin_output_filename))
+ && plugin_output_filename
+ && strcmp (input_file, plugin_output_filename))
return NULL;
if (plugin_output_filename)
return plugin_output;
}
/* Determine the output file name. */
- base_name = get_file_basename (input_file);
+ basename = get_file_basename (input_file);
- len = strlen (base_name);
- if ((len > 2 && memcmp (base_name+len-2, ".c", 2) == 0)
- || (len > 2 && memcmp (base_name+len-2, ".y", 2) == 0)
- || (len > 3 && memcmp (base_name+len-3, ".in", 3) == 0))
+ len = strlen (basename);
+ if ((len > 2 && memcmp (basename+len-2, ".c", 2) == 0)
+ || (len > 2 && memcmp (basename+len-2, ".y", 2) == 0)
+ || (len > 3 && memcmp (basename+len-3, ".in", 3) == 0))
{
output_name = get_file_gtfilename (input_file);
- for_name = base_name;
+ for_name = basename;
}
/* Some headers get used by more than one front-end; hence, it
would be inappropriate to spew them out to a single gtype-<lang>.h
(and gengtype doesn't know how to direct spewage into multiple
gtype-<lang>.h headers at this time). Instead, we pair up these
headers with source files (and their special purpose gt-*.h headers). */
- else if (strcmp (base_name, "c-common.h") == 0)
+ else if (strcmp (basename, "c-common.h") == 0)
output_name = "gt-c-common.h", for_name = "c-common.c";
- else if (strcmp (base_name, "c-lang.h") == 0)
+ else if (strcmp (basename, "c-lang.h") == 0)
output_name = "gt-c-decl.h", for_name = "c-decl.c";
- else if (strcmp (base_name, "c-tree.h") == 0)
+ else if (strcmp (basename, "c-tree.h") == 0)
output_name = "gt-c-decl.h", for_name = "c-decl.c";
- else if (strncmp (base_name, "cp", 2) == 0 && IS_DIR_SEPARATOR (base_name[2])
- && strcmp (base_name + 3, "cp-tree.h") == 0)
+ else if (strncmp (basename, "cp", 2) == 0 && IS_DIR_SEPARATOR (basename[2])
+ && strcmp (basename + 3, "cp-tree.h") == 0)
output_name = "gt-cp-tree.h", for_name = "cp/tree.c";
- else if (strncmp (base_name, "cp", 2) == 0 && IS_DIR_SEPARATOR (base_name[2])
- && strcmp (base_name + 3, "decl.h") == 0)
+ else if (strncmp (basename, "cp", 2) == 0 && IS_DIR_SEPARATOR (basename[2])
+ && strcmp (basename + 3, "decl.h") == 0)
output_name = "gt-cp-decl.h", for_name = "cp/decl.c";
- else if (strncmp (base_name, "cp", 2) == 0 && IS_DIR_SEPARATOR (base_name[2])
- && strcmp (base_name + 3, "name-lookup.h") == 0)
+ else if (strncmp (basename, "cp", 2) == 0 && IS_DIR_SEPARATOR (basename[2])
+ && strcmp (basename + 3, "name-lookup.h") == 0)
output_name = "gt-cp-name-lookup.h", for_name = "cp/name-lookup.c";
- else if (strncmp (base_name, "objc", 4) == 0 && IS_DIR_SEPARATOR (base_name[4])
- && strcmp (base_name + 5, "objc-act.h") == 0)
+ else if (strncmp (basename, "objc", 4) == 0 && IS_DIR_SEPARATOR (basename[4])
+ && strcmp (basename + 5, "objc-act.h") == 0)
output_name = "gt-objc-objc-act.h", for_name = "objc/objc-act.c";
else
{
- int lang_index = get_prefix_langdir_index (base_name);
-
+ int lang_index = get_prefix_langdir_index (basename);
if (lang_index >= 0)
return base_files[lang_index];
-
output_name = "gtype-desc.c";
for_name = "GCC";
}
@@ -1923,6 +1925,7 @@ static void walk_type (type_p t, struct walk_type_data *d);
static void write_func_for_structure
(type_p orig_s, type_p s, type_p * param,
const struct write_types_data *wtd);
+/* Marks the function for later output in plugin mode. */
static void delay_func_for_structure (type_p s, const struct write_types_data* wtd);
static void write_types_process_field
(type_p f, const struct walk_type_data *d);
@@ -3037,7 +3040,8 @@ write_local (type_p structures, type_p param_structs)
}
}
-/* Write out only to header_file the 'enum' definition for gt_types_enum. */
+/* Write out (to header_file, unless in plugin mode) the 'enum'
+ definition for gt_types_enum. */
static void
write_enum_defn (type_p structures, type_p param_structs)
@@ -3053,7 +3057,7 @@ write_enum_defn (type_p structures, type_p param_structs)
for (s = structures; s; s = s->next)
{
- if (!s->inplugin)
+ if (!s->in_plugin)
continue;
if (s->gc_used == GC_POINTED_TO
|| s->gc_used == GC_MAYBE_POINTED_TO)
@@ -3070,7 +3074,7 @@ write_enum_defn (type_p structures, type_p param_structs)
}
}
for (s = param_structs; s; s = s->next)
- if (s->gc_used == GC_POINTED_TO && s->inplugin)
+ if (s->gc_used == GC_POINTED_TO && s->in_plugin)
{
oprintf (plugin_output, "#define gt_e_");
output_mangled_typename (plugin_output, s);
@@ -3447,7 +3451,7 @@ write_roots (pair_p variables)
const char *length = NULL;
int deletable_p = 0;
options_p o;
- if (nb_plugin_files > 0 && plugin_output_filename && v->inplugin)
+ if (nb_plugin_files > 0 && plugin_output_filename && v->in_plugin)
f = plugin_output;
else
f = get_output_file_with_visibility (v->line.file);
@@ -3734,17 +3738,17 @@ void
note_def_vec_alloc (const char *type, const char *astrat, struct fileloc *pos)
{
const char *astratname = concat ("VEC_", type, "_", astrat, (char *)0);
- const char *base_name = concat ("VEC_", type, "_base", (char *)0);
+ const char *basename = concat ("VEC_", type, "_base", (char *)0);
- pair_p field = create_field_at (0, resolve_typedef (base_name, pos),
+ pair_p field = create_field_at (0, resolve_typedef (basename, pos),
"base", 0, pos);
do_typedef (astratname, new_structure (astratname, 0, pos, field, 0), pos);
}
-/* in plugin mode, the write of functions for structure is delayed to
- the end; we keep a vector of these */
+/* In plugin mode, the writing of functions for structure is delayed
+ to the end; we keep a vector of these. */
struct delayedstructfunc_st
{
type_p dly_s;
@@ -3756,7 +3760,8 @@ static int dlystructcnt;
-
+/* In plugin mode, we delay the output of functions by appending them
+ to the above array. */
static void
delay_func_for_structure (type_p s, const struct write_types_data* wtd)
{
@@ -3786,6 +3791,8 @@ delay_func_for_structure (type_p s, const struct write_types_data* wtd)
}
+/* In plugin mode, output at last the functions which have been
+ kept. */
static void
output_delayed_functions(void)
{
diff --git a/gcc/gengtype.h b/gcc/gengtype.h
index 370807e41f8..533b508b556 100644
--- a/gcc/gengtype.h
+++ b/gcc/gengtype.h
@@ -76,13 +76,6 @@ extern void yyend (void);
extern void parse_file (const char *name);
extern bool hit_error;
-/* flag set when parsing a plugin file */
-extern bool is_plugin_file;
-
-#define dbgprintf(Fmt,...) do { fprintf(stderr, \
- "%s:%d: " Fmt "\n", basename(__FILE__), __LINE__, \
- ##__VA_ARGS__); } while(0)
-
/* Token codes. */
enum {
EOF_TOKEN = 0,
diff --git a/gcc/melt-runtime.h b/gcc/melt-runtime.h
index d50eb341ea1..b64a861f696 100644
--- a/gcc/melt-runtime.h
+++ b/gcc/melt-runtime.h
@@ -20,25 +20,12 @@ along with GCC; see the file COPYING3. If not see
#ifndef MELT_INCLUDED_
#define MELT_INCLUDED_
-#if !ENABLE_MELT && !defined(MELT_IS_PLUGIN)
-#error melt-runtime.h should enly be used when MELT is enabled at configuration time
-#endif
-
/* we need PPL because some static inline functions use it below
(e.g. melt_raw_new_ppl_empty_constraint_system). This is notably
true for gtype-desc.c which is generated by gengtype and won't
- compile without this include. A better fix would be to ensure
- <ppl_c.h> is included for compilation of gtype-desc.c and other
- gengtype related files. */
-#if HAVE_PARMAPOLY || defined (MELT_IS_PLUGIN)
-#ifndef PPL_VERSION_MAJOR
-#include <ppl_c.h>
-#endif
-#else
-#error PPL (Parma Polyhedra Library) required for melt-runtime.h)
-#endif
-
+ compile without this include. */
+#include "ppl_c.h"
/* DYNAMIC_OBJSTRUCT is a cute hack to "dynamically" compute field
positions; this is only used to compile warmelt-*-0.c files notably
diff --git a/gcc/run-melt.h b/gcc/run-melt.h
index 3577aa67c48..0ac981b71d5 100644
--- a/gcc/run-melt.h
+++ b/gcc/run-melt.h
@@ -66,19 +66,9 @@ Boston, MA 02110-1301, USA. */
/* MELT specific includes */
-
-#if HAVE_PARMAPOLY || defined (MELT_IS_PLUGIN)
-#include <ppl_c.h>
-#else
-#error required parma polyedral library PPL
-#endif /*HAVE_PARMAPOLY */
-
-
-#if ENABLE_MELT || defined (MELT_IS_PLUGIN)
+#include "ppl_c.h"
#include "melt-runtime.h"
-#else
-#error required MELT enabling
-#endif
+
#define curfptr curfram__.varptr
#define curfnum curfram__.varnum
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 878f0630c6d..9cccad8fea8 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -111,10 +111,10 @@ along with GCC; see the file COPYING3. If not see
#endif
/* we don't include melt.h but declare its initializer & finalizer here */
-#if ENABLE_MELT
+
extern void melt_initialize(void); /* in melt.c */
extern void melt_finalize(void); /* in melt.c */
-#endif
+
static void general_init (const char *);
static void do_compile (void);
@@ -2401,11 +2401,9 @@ toplev_main (int argc, char **argv)
initialize_plugins ();
-#if ENABLE_MELT
/* initialize melt if needed */
if (melt_mode_string && melt_mode_string[0])
melt_initialize();
-#endif
if (version_flag)
print_version (stderr, "");
@@ -2418,11 +2416,9 @@ toplev_main (int argc, char **argv)
do_compile ();
-#if ENABLE_MELT
/* finalize melt if needed */
if (melt_mode_string && melt_mode_string[0])
melt_finalize();
-#endif
if (warningcount || errorcount)
print_ignored_options ();