Patchwork [MELT] Build system inconsistency on flavors

login
register
mail settings
Submitter Alexandre Lissy
Date Aug. 25, 2011, 9:30 a.m.
Message ID <148a5e94e7c67c996a131773d0710e1c.squirrel@webmail.mandriva.com>
Download mbox | patch
Permalink /patch/111538/
State New
Headers show

Comments

Alexandre Lissy - Aug. 25, 2011, 9:30 a.m.
Hello,

Following is a patch that fixes usage of the now invalid 'static' flavor
and replaces its usage with 'quicklybuilt'.

Patch

From 546c86cd45114470da4cb7811c71f1fcde48714b Mon Sep 17 00:00:00 2001
From: Alexandre Lissy <alissy@mandriva.com>
Date: Thu, 25 Aug 2011 11:26:54 +0200
Subject: [PATCH] [MELT] Fix bad flavor static

Recent changes made the name 'static' invalid as a flavor however there
were pieces of its existence that made the build as a plugin failing
because of a flavor named static while the shared library was named
'quicklybuilt', and hence unable to be loaded. This commit changes
those last pieces of 'static' to 'quicklybuilt'.
---
 contrib/MELT-Plugin-Makefile |    4 ++--
 gcc/ChangeLog.MELT           |    6 ++++++
 gcc/melt-build.tpl           |   24 ++++++++++++------------
 3 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/contrib/MELT-Plugin-Makefile b/contrib/MELT-Plugin-Makefile
index 476935f..5e5baae 100644
--- a/contrib/MELT-Plugin-Makefile
+++ b/contrib/MELT-Plugin-Makefile
@@ -149,8 +149,8 @@  melt_installed_module_makefile=$(MELTGCC_PLUGIN_DIR)/melt-module.mk
 ## should be 1 
 melt_is_plugin=1
 
-# we force the stage0 to be "static" i.e. with constant field offsets.
-MELT_STAGE_ZERO = melt-stage0-static
+# we force the stage0 to be "quicklybuilt" i.e. with constant field offsets.
+MELT_STAGE_ZERO = melt-stage0-quicklybuilt
 
 ## Tell GNU make to not build goals in parallel, that is to ignore any
 ## -j flag to make.
diff --git a/gcc/ChangeLog.MELT b/gcc/ChangeLog.MELT
index 4282321..a341a49 100644
--- a/gcc/ChangeLog.MELT
+++ b/gcc/ChangeLog.MELT
@@ -1,3 +1,9 @@ 
+2011-08-25  Alexandre Lissy  <alissy@mandriva.com>
+	* gcc/melt/melt-build.tpl: Use -quicklybuilt instead of -static for
+	consistency with the whole build system
+	* contrib/MELT-Plugin-Makefile: Using -quicklybuilt instead of
+	-static.
+
 2011-08-23  Alexandre Lissy <alissy@mandriva.com>
 	* melt-runtime.c (melt_load_module_index): Correct handling of invalid
 	dlopen handle.
diff --git a/gcc/melt-build.tpl b/gcc/melt-build.tpl
index 705fe67..e3e8282 100644
--- a/gcc/melt-build.tpl
+++ b/gcc/melt-build.tpl
@@ -135,7 +135,7 @@  melt-workdir:
 ## from the MELT descriptor C file 
 
 ## using static object fields offsets for [+base+]
-melt-stage0-static/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt.so:  $(MELT_GENERATED_[+mkvarsuf+]_C_FILES) \
+melt-stage0-quicklybuilt/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt.so:  $(MELT_GENERATED_[+mkvarsuf+]_C_FILES) \
              melt-run.h melt-runtime.h melt-runtime.c \
              melt-predef.h  $(melt_make_cc1_dependency)
 	@echo stage0static [+base+] MELT_GENERATED_[+mkvarsuf+]_CUMULMD5= $(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5)
@@ -145,9 +145,9 @@  melt-stage0-static/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt
 	      GCCMELT_CFLAGS="$(melt_cflags)" \
 	      GCCMELT_MODULE_SOURCEBASE=$(melt_make_source_dir)/generated/[+base+] \
 	      GCCMELT_CUMULATED_MD5=$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5) \
-              GCCMELT_MODULE_BINARYBASE=melt-stage0-static/[+base+]
+              GCCMELT_MODULE_BINARYBASE=melt-stage0-quicklybuilt/[+base+]
 
-melt-stage0-static/[+base+].so:  melt-stage0-static/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt.so
+melt-stage0-quicklybuilt/[+base+].so:  melt-stage0-quicklybuilt/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt.so
 	cd $(dir $@) ; rm -f $(notdir $@); $(LN_S) $(notdir $<) $(notdir $@)
 
 ## using dynamic object fields offsets for [+base+]
@@ -176,14 +176,14 @@  melt-stage0-dynamic/[+base+].quicklybuilt.so: melt-stage0-dynamic/[+base+].$(MEL
 [+ENDFOR melt_translator_file+]
 
 
-melt-stage0-static.stamp:  melt-stage0-static melt-run.h  $(wildcard $(patsubst %,$(melt_make_source_dir)/generated/%*.c,$(MELT_TRANSLATOR_BASE))) | melt-stage0-static/warmelt.modlis
+melt-stage0-quicklybuilt.stamp:  melt-stage0-quicklybuilt melt-run.h  $(wildcard $(patsubst %,$(melt_make_source_dir)/generated/%*.c,$(MELT_TRANSLATOR_BASE))) | melt-stage0-quicklybuilt/warmelt.modlis
 	date +"#$@ generated %F" > $@-tmp
 [+FOR melt_translator_file "\n"+]	md5sum melt-run.h $(MELT_GENERATED_[+mkvarsuf+]_C_FILES) >> $@-tmp[+ENDFOR melt_translator_file+]
 	echo "# end $@" >> $@-tmp
 	$(melt_make_move) $@-tmp $@
-	rm -f $(patsubst %,melt-stage0-static/%*.c,$(MELT_TRANSLATOR_BASE))
-	$(LN_S)  $(realpath $(sort $(wildcard $(patsubst %,$(realpath $(melt_make_source_dir))/generated/%*.c,$(MELT_TRANSLATOR_BASE))))) melt-stage0-static/
-	@echo STAMPstage0static after $@ ; ls -l  melt-stage0-static/*
+	rm -f $(patsubst %,melt-stage0-quicklybuilt/%*.c,$(MELT_TRANSLATOR_BASE))
+	$(LN_S)  $(realpath $(sort $(wildcard $(patsubst %,$(realpath $(melt_make_source_dir))/generated/%*.c,$(MELT_TRANSLATOR_BASE))))) melt-stage0-quicklybuilt/
+	@echo STAMPstage0static after $@ ; ls -l  melt-stage0-quicklybuilt/*
 
 melt-stage0-dynamic.stamp:  melt-stage0-dynamic melt-run.h  $(wildcard $(patsubst %,$(melt_make_source_dir)/generated/%*.c,$(MELT_TRANSLATOR_BASE))) | melt-stage0-dynamic/warmelt.modlis
 	date +"#$@ generated %F" > $@-tmp
@@ -197,8 +197,8 @@  melt-stage0-dynamic.stamp:  melt-stage0-dynamic melt-run.h  $(wildcard $(patsubs
 
 
 
-melt-stage0-static/warmelt.modlis: | \
-[+FOR melt_translator_file " \\\n" +]             melt-stage0-static/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt.so[+
+melt-stage0-quicklybuilt/warmelt.modlis: | \
+[+FOR melt_translator_file " \\\n" +]             melt-stage0-quicklybuilt/[+base+].$(MELT_GENERATED_[+mkvarsuf+]_CUMULMD5).quicklybuilt.so[+
 ENDFOR melt_translator_file+]
 	date  +"#$@ generated %F" > $@-tmp
 [+FOR melt_translator_file+]	echo $(melt_make_source_dir)/generated/[+base+].quicklybuilt >> $@-tmp
@@ -218,7 +218,7 @@  empty-file-for-melt.c:
 	mv $@-tmp $@
 
 ## can be overridden manually to either melt-stage0-dynamic or
-## melt-stage0-static
+## melt-stage0-quicklybuilt
 .PHONY: warmelt0
 ## the default stage0 melt-stage0-dynamic
 MELT_STAGE_ZERO?= melt-stage0-dynamic
@@ -652,8 +652,8 @@  meltrun-generate: $(WARMELT_LAST) $(WARMELT_LAST_MODLIS) empty-file-for-melt.c \
 ### MELT cleanup
 .PHONY: melt-clean
 melt-clean:
-	rm -rf *melt*.args melt-stage0-static melt-stage0-dynamic \
-	       melt-stage0-static.stamp melt-stage0-dynamic.stamp \
+	rm -rf *melt*.args melt-stage0-quicklybuilt melt-stage0-dynamic \
+	       melt-stage0-quicklybuilt.stamp melt-stage0-dynamic.stamp \
 [+FOR melt_stage+]           [+melt_stage+]  [+melt_stage+].stamp \
 [+ENDFOR melt_stage+]               melt-sources melt-modules
 
-- 
1.7.6