summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-11 14:41:17 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-11 14:41:17 +0000
commit5e7adbc81b43b579675a1035500f991404cf8218 (patch)
tree2950946b7aa8a1817743f243f4e0d14240f52f1c
parent3c046cee5c0bf747fb65766c814b51c24fefc0c1 (diff)
downloadgcc-5e7adbc81b43b579675a1035500f991404cf8218.tar.gz
2012-09-11 Basile Starynkevitch <basile@starynkevitch.net>
{{adding flavor runextend}} * melt-module.mk: Add runextend flavor. * melt-runtime.c (melt_compile_source): Accept runextend flavor. * melt/warmelt-outobj.melt (translate_run_melt_expressions): Generate a runextend flavor of the module. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@191187 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.MELT10
-rw-r--r--gcc/melt-module.mk35
-rw-r--r--gcc/melt-runtime.c7
-rw-r--r--gcc/melt/warmelt-outobj.melt4
-rw-r--r--intl/aclocal.m45
-rw-r--r--lto-plugin/Makefile.in2
-rw-r--r--lto-plugin/aclocal.m46
7 files changed, 57 insertions, 12 deletions
diff --git a/gcc/ChangeLog.MELT b/gcc/ChangeLog.MELT
index b6d7c17f092..14f67aabc2f 100644
--- a/gcc/ChangeLog.MELT
+++ b/gcc/ChangeLog.MELT
@@ -1,5 +1,15 @@
2012-09-11 Basile Starynkevitch <basile@starynkevitch.net>
+
+ {{adding flavor runextend}}
+ * melt-module.mk: Add runextend flavor.
+
+ * melt-runtime.c (melt_compile_source): Accept runextend flavor.
+
+ * melt/warmelt-outobj.melt (translate_run_melt_expressions):
+ Generate a runextend flavor of the module.
+
+2012-09-11 Basile Starynkevitch <basile@starynkevitch.net>
* Makefile.in (melt-runtime.i): Correct command.
(melt-runtime-raw.i): New target.
(melt.encap): Needs melt-runtime.i
diff --git a/gcc/melt-module.mk b/gcc/melt-module.mk
index 6fd0b5f63f3..4a09e378b39 100644
--- a/gcc/melt-module.mk
+++ b/gcc/melt-module.mk
@@ -72,7 +72,7 @@ $(warning MELT time stamp file $(GCCMELT_MODULE_SOURCEBASE)+melttime.h does not
endif
## check the flavor
-ifeq ($(findstring $(GCCMELT_MODULE_FLAVOR),optimized quicklybuilt debugnoline dynamic),)
+ifeq ($(findstring $(GCCMELT_MODULE_FLAVOR),optimized quicklybuilt debugnoline dynamic runextend),)
$(error invalid GCCMELT_MODULE_FLAVOR $(GCCMELT_MODULE_FLAVOR))
endif
@@ -140,6 +140,7 @@ GCCMELT_QUICKLYBUILT_FLAGS ?= -O0 -Wall
GCCMELT_DYNAMIC_FLAGS ?= -O0
GCCMELT_DEBUGNOLINE_FLAGS ?= -g
GCCMELT_DESCRIPTOR_FLAGS ?= -O
+GCCMELT_RUNEXTEND_FLAGS ?= -O0
## these flags are preprocessor flags depending upon the flavor, don't override them without reason
GCCMELT_QUICKLYBUILT_PREPROFLAGS= -DMELTGCC_MODULE_QUICKLYBUILT -DMELT_HAVE_DEBUG=1
@@ -147,6 +148,7 @@ GCCMELT_OPTIMIZED_PREPROFLAGS= -DMELTGCC_MODULE_OPTIMIZED -DMELT_HAVE_DEBUG=0
GCCMELT_DEBUGNOLINE_PREPROFLAGS= -DMELTGCC_MODULE_DEBUGNOLINE -DMELTGCC_NOLINENUMBERING -DMELT_HAVE_DEBUG=1
GCCMELT_DYNAMIC_PREPROFLAGS= -DMELTGCC_MODULE_DYNAMIC -DMELTGCC_NOLINENUMBERING -DMELT_HAVE_DEBUG=1 -DMELTGCC_DYNAMIC_OBJSTRUCT
GCCMELT_DESCRIPTOR_PREPROFLAGS= -DMELTGCC_MODULE_DESCRIPTOR
+GCCMELT_RUNEXTEND_PREPROFLAGS= -DMELTGCC_MODULE_RUNEXTEND -DMELTGCC_NOLINENUMBERING -DMELT_HAVE_DEBUG=1
GCCMELT_PREPROFLAGS= -I $(realpath $(GCCMELT_HEADER_DIR))
@@ -267,6 +269,30 @@ $(GCCMELTGEN_BUILD)%.dynamic.meltmdsumedpic.o: $(GCCMELTGEN_BUILD)%.mdsumed.c |
+
+## runextend flavor
+$(GCCMELTGEN_BUILD)%.runextend.meltpic.o: | $(GCCMELT_MODULE_DEPENDENCIES)
+ @echo @+@melt-module runextend.meltpic at= $@ left= $< question= $? caret= $^ realpathleft= $(realpath $<)
+ if [ -z "$(filter %.mdsumed.c, $(realpath $<))" ]; then \
+ $(GCCMELT_COMPILER) $(GCCMELT_RUNEXTEND_PREPROFLAGS) $(GCCMELT_PREPROFLAGS) \
+ $(GCCMELT_RUNEXTEND_FLAGS) $(GCCMELT_CFLAGS) $(GCCMELT_PACKAGES_CFLAGS) \
+ -fPIC -c -o $@ $< ; \
+ else \
+ GCCMELTGENMDSUMEDPIC=$(GCCMELTGEN_BUILD)$(notdir $(patsubst %.mdsumed.c,%.runextend.meltmdsumedpic.o,$(realpath $<))); \
+ echo @+@melt-module runextend.meltpicmd GCCMELTGENMDSUMEDPIC= $$GCCMELTGENMDSUMEDPIC ; \
+ $(MAKE) -e -f $(filter %melt-module.mk, $(MAKEFILE_LIST)) $$GCCMELTGENMDSUMEDPIC ; \
+ $(LN_S) -v -f `realpath $$GCCMELTGENMDSUMEDPIC` $@ ; fi
+
+$(GCCMELTGEN_BUILD)%.runextend.meltmdsumedpic.o: $(GCCMELTGEN_BUILD)%.mdsumed.c | $(GCCMELT_MODULE_DEPENDENCIES)
+ @echo @+@melt-module runextend.meltmdsumedpic at= $@ left= $< question= $? caret= $^
+ $(GCCMELT_COMPILER) $(GCCMELT_RUNEXTEND_PREPROFLAGS) $(GCCMELT_PREPROFLAGS) \
+ $(GCCMELT_DEBUGNOLINE_FLAGS) $(GCCMELT_CFLAGS) $(GCCMELT_PACKAGES_CFLAGS) \
+ -fPIC -c -o $@ $<
+
+
+
+################
+
## descriptor quasi-flavor, never symlinked!
$(GCCMELTGEN_BUILD)%.descriptor.meltpic.o: | $(GCCMELT_MODULE_DEPENDENCIES)
@echo @+@melt-module descriptor.meltpic at= $@ left= $< question= $? caret= $^
@@ -275,6 +301,7 @@ $(GCCMELTGEN_BUILD)%.descriptor.meltpic.o: | $(GCCMELT_MODULE_DEPENDENCIES)
-fPIC -c -o $@ $<
+################################################################
## linking the module in various flavors
$(GCCMELTGEN_BUILD)$(GCCMELT_BASE).meltmod-%.quicklybuilt.so:
@echo @+@melt-module meltmod.quicklybuilt at= $@ left= $< question= $? caret= $^
@@ -293,6 +320,12 @@ $(GCCMELTGEN_BUILD)$(GCCMELT_BASE).meltmod-%.dynamic.so:
$(GCCMELT_COMPILER) $(GCCMELT_DYNAMIC_FLAGS) $(GCCMELT_SHARED_FLAGS) -o $@ $^ $(GCCMELT_PACKAGES_LIBES)
+$(GCCMELTGEN_BUILD)$(GCCMELT_BASE).meltmod-%.runextend.so:
+ @echo @+@melt-module meltmod.runextend at= $@ left= $< question= $? caret= $^
+ $(GCCMELT_COMPILER) $(GCCMELT_RUNEXTEND_FLAGS) $(GCCMELT_SHARED_FLAGS) -o $@ $^ $(GCCMELT_PACKAGES_LIBES)
+
+
+
################
ifneq ($(realpath $(GCCMELTGEN_BUILD)),$(realpath $(dir $(GCCMELT_MODULE_BINARYBASE))))
$(info hereGCCMELTGEN_BUILD=$(GCCMELTGEN_BUILD) real= $(realpath $(GCCMELTGEN_BUILD)) GCCMELT_MODULE_BINARYBASE=$(GCCMELT_MODULE_BINARYBASE) realdir= $(realpath $(dir $(GCCMELT_MODULE_BINARYBASE))) dir= $(dir $(GCCMELT_MODULE_BINARYBASE)))
diff --git a/gcc/melt-runtime.c b/gcc/melt-runtime.c
index cb98779b479..ed6d50e6d45 100644
--- a/gcc/melt-runtime.c
+++ b/gcc/melt-runtime.c
@@ -5567,8 +5567,11 @@ melt_compile_source (const char *srcbase, const char *binbase, const char*workdi
}
if (strchr(melt_basename (binbase), '.'))
melt_fatal_error ("MELT binary base %s to compile %s should not have dots", binbase, srcbase);
- if (strcmp(flavor, "quicklybuilt") && strcmp(flavor, "optimized") && strcmp(flavor, "debugnoline"))
- melt_fatal_error ("invalid flavor %s to compile %s - expecting {quicklybuilt,optimized,debugnoline}", flavor, srcbase);
+ if (strcmp(flavor, "quicklybuilt")
+ && strcmp(flavor, "optimized")
+ && strcmp(flavor, "debugnoline")
+ && strcmp(flavor, "runextend"))
+ melt_fatal_error ("invalid flavor %s to compile %s - expecting {quicklybuilt,optimized,debugnoline,runextend}", flavor, srcbase);
ourmakecommand = melt_argument ("module-make-command");
if (!ourmakecommand || !ourmakecommand[0])
ourmakecommand = melt_module_make_command;
diff --git a/gcc/melt/warmelt-outobj.melt b/gcc/melt/warmelt-outobj.melt
index b2d59f2c93c..fdd07207543 100644
--- a/gcc/melt/warmelt-outobj.melt
+++ b/gcc/melt/warmelt-outobj.melt
@@ -5918,10 +5918,8 @@ if (1) return;
(runerrorhdlr '"runtime translation to code failed")
(return () ()))
;; should now compile the generated C code
- ;; FIXME: we should have a runbuilt flavor.... (also in the
- ;; runtime and the melt-module.mk)
(debug "translate_run_melt_expressions before compiling quicklybuilt flavor of basename=" basename)
- (generate_flavored_melt_module basename basename '"quicklybuilt")
+ (generate_flavored_melt_module basename basename '"runextend")
(debug "translate_run_melt_expressions after compiling quicklybuilt flavor of basename=" basename)
(assert_msg "@$@translate_run_melt_expressions incomplete")
diff --git a/intl/aclocal.m4 b/intl/aclocal.m4
index 7bbc56a3959..b06413f90d5 100644
--- a/intl/aclocal.m4
+++ b/intl/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index dd5c0846348..502f7691e59 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
diff --git a/lto-plugin/aclocal.m4 b/lto-plugin/aclocal.m4
index 6df1c8eda40..76a0b14c860 100644
--- a/lto-plugin/aclocal.m4
+++ b/lto-plugin/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -38,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.5], [],
+m4_if([$1], [1.11.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -54,7 +54,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.5])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])