[svn:parrot] r44482 - in branches/rm_cflags: . compilers/imcc config/auto config/gen config/gen/makefiles
coke at svn.parrot.org
coke at svn.parrot.org
Thu Feb 25 23:53:27 UTC 2010
Author: coke
Date: Thu Feb 25 23:53:26 2010
New Revision: 44482
URL: https://trac.parrot.org/parrot/changeset/44482
Log:
make compilers/imcc/Rules.mak a generated file.
use some per-file warnings overrides to quiet imcc.
add -Wno-unused back to the default gcc warnings;
this is how it was with trunk.
Added:
branches/rm_cflags/compilers/imcc/Rules.in
- copied, changed from r44466, branches/rm_cflags/compilers/imcc/Rules.mak
Deleted:
branches/rm_cflags/compilers/imcc/Rules.mak
Modified:
branches/rm_cflags/MANIFEST
branches/rm_cflags/config/auto/warnings.pm
branches/rm_cflags/config/gen/makefiles.pm
branches/rm_cflags/config/gen/makefiles/root.in
Modified: branches/rm_cflags/MANIFEST
==============================================================================
--- branches/rm_cflags/MANIFEST Thu Feb 25 23:48:36 2010 (r44481)
+++ branches/rm_cflags/MANIFEST Thu Feb 25 23:53:26 2010 (r44482)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 23 18:31:24 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Feb 25 19:11:23 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -34,7 +34,7 @@
compilers/data_json/data_json/grammar.pg [data_json]
compilers/data_json/data_json/pge2pir.tg [data_json]
compilers/imcc/Defines.mak [imcc]
-compilers/imcc/Rules.mak [imcc]
+compilers/imcc/Rules.in [imcc]
compilers/imcc/cfg.c [imcc]
compilers/imcc/cfg.h [imcc]
compilers/imcc/debug.c [imcc]
Copied and modified: branches/rm_cflags/compilers/imcc/Rules.in (from r44466, branches/rm_cflags/compilers/imcc/Rules.mak)
==============================================================================
--- branches/rm_cflags/compilers/imcc/Rules.mak Wed Feb 24 22:24:43 2010 (r44466, copy source)
+++ branches/rm_cflags/compilers/imcc/Rules.in Thu Feb 25 23:53:26 2010 (r44482)
@@ -91,7 +91,6 @@
$(PARROT_H_HEADERS)
## SUFFIX OVERRIDE - Warnings (This is generated code)
-## XXX except we can't do that in a raw .mak file; we'd need to generate it.
compilers/imcc/imclexer$(O) : \
compilers/imcc/imclexer.c \
compilers/imcc/cfg.h \
@@ -105,7 +104,9 @@
compilers/imcc/unit.h \
$(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS)
+ $(CC) $(CFLAGS) @ccwarn::compilers/imcc/imclexer.c@ @cc_shared@ -I$(@D) @cc_o_out@ $@ -c compilers/imcc/imclexer.c
+## SUFFIX OVERRIDE - Warnings (This is generated code)
compilers/imcc/imcparser$(O) : \
compilers/imcc/cfg.h \
compilers/imcc/debug.h \
@@ -121,6 +122,7 @@
$(INC_DIR)/dynext.h \
$(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS)
+ $(CC) $(CFLAGS) @ccwarn::compilers/imcc/imcparser.c@ @cc_shared@ -I$(@D) @cc_o_out@ $@ -c compilers/imcc/imcparser.c
compilers/imcc/main$(O) : \
compilers/imcc/cfg.h \
Deleted: branches/rm_cflags/compilers/imcc/Rules.mak
==============================================================================
--- branches/rm_cflags/compilers/imcc/Rules.mak Thu Feb 25 23:53:26 2010 (r44481)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,204 +0,0 @@
-compilers/imcc/pcc$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/imcparser.h \
- compilers/imcc/instructions.h \
- compilers/imcc/parser.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/instructions$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/pbc.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/pbc$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/pbc.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS) \
- include/pmc/pmc_sub.h
-
-compilers/imcc/parser_util$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/imcparser.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/parser.h \
- compilers/imcc/pbc.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/dynext.h \
- $(INC_DIR)/embed.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS) \
- include/pmc/pmc_sub.h
-
-compilers/imcc/imc$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/cfg$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/debug$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-## SUFFIX OVERRIDE - Warnings (This is generated code)
-## XXX except we can't do that in a raw .mak file; we'd need to generate it.
-compilers/imcc/imclexer$(O) : \
- compilers/imcc/imclexer.c \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/imcparser.h \
- compilers/imcc/instructions.h \
- compilers/imcc/parser.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/imcparser$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/imcparser.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/parser.h \
- compilers/imcc/pbc.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/dynext.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/main$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/imcparser.h \
- compilers/imcc/instructions.h \
- compilers/imcc/parser.h \
- compilers/imcc/pbc.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/embed.h \
- $(INC_DIR)/imcc.h \
- $(INC_DIR)/oplib/ops.h \
- $(INC_DIR)/runcore_api.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/optimizer$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/pbc.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/reg_alloc$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/sets$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-compilers/imcc/symreg$(O) : \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/imc.h \
- compilers/imcc/instructions.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS)
-
-# imcc file dependencies
-#
-# The .flag files are needed because we keep some derived files in SVN,
-# which does not keep accurate timestamps on the files, relative to each other.
-# Note that YACC or LEX may be null commands, so we must `touch` all the
-# target files, instead of just the .flag files.
-
-compilers/imcc/imcc.y.flag compilers/imcc/imcparser.c compilers/imcc/imcparser.h : compilers/imcc/imcc.y
- $(YACC) compilers/imcc/imcc.y -d -o compilers/imcc/imcparser.c
- $(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer compilers/imcc/imcparser.c compilers/imcc/imcc.y
- $(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer compilers/imcc/imcparser.h compilers/imcc/imcc.y
- $(TOUCH) compilers/imcc/imcc.y.flag compilers/imcc/imcparser.c compilers/imcc/imcparser.h
-
-compilers/imcc/imcc.l.flag compilers/imcc/imclexer.c : compilers/imcc/imcc.l
- $(LEX) -ocompilers/imcc/imclexer.c compilers/imcc/imcc.l
- $(TOUCH) compilers/imcc/imcc.l.flag compilers/imcc/imclexer.c
Modified: branches/rm_cflags/config/auto/warnings.pm
==============================================================================
--- branches/rm_cflags/config/auto/warnings.pm Thu Feb 25 23:48:36 2010 (r44481)
+++ branches/rm_cflags/config/auto/warnings.pm Thu Feb 25 23:53:26 2010 (r44482)
@@ -74,6 +74,11 @@
'todo' functions just like never does, but it indicates that these
files are expected to eventually be free of this warning.
+Note that there is no actual requirement that the 'file' be a full path
+to a .c file; the file could be "PMCS" or "OPS" or some other identifier;
+whatever the value, it will generate a Config entry prefixed with
+C<ccwarn::>, which will probably be used via @@ expansion in a makefile.
+
It is tempting to put this into a config file, but having it in
perl gives us the ability to dynamically setup certain warnings based
on any criteria already discovered via Config.
@@ -140,6 +145,7 @@
-Wswitch-default
-Wtrigraphs
-Wundef
+ -Wno-unused
-Wunknown-pragmas
-Wvariadic-macros
-Wwrite-strings
@@ -190,14 +196,25 @@
$gcc->{'todo'} = $gpp->{'todo'} = {
'-Wformat-nonliteral' => [
- 'compilers/imcc/imclexer.c',
'src/spf_render.c',
],
- '-Wno-switch-default' => [
- 'compilers/imcc/imclexer.c',
+ '-Wstrict-prototypes' => [
+ 'src/nci/extra_thunks.c',
+ 'src/extra_nci_thunks.c',
],
};
+ $gcc->{'never'} = $gpp->{'never'} = {
+ '-Wformat-nonliteral' => [
+ 'compilers/imcc/imclexer.c',
+ ],
+ '-Wswitch-default' => [
+ 'compilers/imcc/imclexer.c',
+ ],
+ '-Wcast-qual' => [
+ 'compilers/imcc/imcparser.c',
+ ],
+ };
$data->{'warnings'}{'gcc'} = $gcc;
$data->{'warnings'}{'gpp'} = $gpp;
Modified: branches/rm_cflags/config/gen/makefiles.pm
==============================================================================
--- branches/rm_cflags/config/gen/makefiles.pm Thu Feb 25 23:48:36 2010 (r44481)
+++ branches/rm_cflags/config/gen/makefiles.pm Thu Feb 25 23:53:26 2010 (r44482)
@@ -27,9 +27,14 @@
$data{description} = q{Generate makefiles and other build files};
$data{result} = q{};
$data{makefiles} = {
- 'Makefile' => { SOURCE => 'config/gen/makefiles/root.in',
+ 'Makefile' => {
+ SOURCE => 'config/gen/makefiles/root.in',
},
- 'ext/Makefile' => { SOURCE => 'config/gen/makefiles/ext.in',
+ 'ext/Makefile' => {
+ SOURCE => 'config/gen/makefiles/ext.in',
+ },
+ 'compilers/imcc/Rules.mak' => {
+ SOURCE => 'compilers/imcc/Rules.in',
},
'ext/Parrot-Embed/Makefile.PL' => {
Modified: branches/rm_cflags/config/gen/makefiles/root.in
==============================================================================
--- branches/rm_cflags/config/gen/makefiles/root.in Thu Feb 25 23:48:36 2010 (r44481)
+++ branches/rm_cflags/config/gen/makefiles/root.in Thu Feb 25 23:53:26 2010 (r44482)
@@ -1399,10 +1399,13 @@
include/pmc/pmc_unmanagedstruct.h \
include/pmc/pmc_nci.h
+## SUFFIX OVERRIDE - Warnings
src/nci/extra_thunks$(O) : src/nci/extra_thunks.str \
- $(PARROT_H_HEADERS) \
- include/pmc/pmc_unmanagedstruct.h \
- include/pmc/pmc_nci.h
+ $(PARROT_H_HEADERS) \
+ include/pmc/pmc_unmanagedstruct.h \
+ include/pmc/pmc_nci.h \
+ src/nci/extra_thunks.c
+ $(CC) $(CFLAGS) @ccwarn::src/nci/extra_thunks.c@ @cc_shared@ -I$(@D) @cc_o_out@ $@ -c src/nci/extra_thunks.c
src/frame_builder$(O) : $(PARROT_H_HEADERS) src/frame_builder.h \
include/pmc/pmc_fixedintegerarray.h \
@@ -2446,7 +2449,9 @@
$(NCI_THUNK_GEN) --dynext --no-warn-dups \
--output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci
-src/extra_nci_thunks$(O) : $(GENERAL_H_FILES)
+## SUFFIX OVERRIDE - Warnings
+src/extra_nci_thunks$(O) : $(GENERAL_H_FILES) src/extra_nci_thunks.c
+ $(CC) $(CFLAGS) @ccwarn::src/extra_nci_thunks.c@ @cc_shared@ -I$(@D) @cc_o_out@ $@ -c src/extra_nci_thunks.c
$(EXTRANCITHUNKS_SO) : $(LIBPARROT) src/extra_nci_thunks$(O)
$(LD) $(LD_LOAD_FLAGS) $(LDFLAGS) \
More information about the parrot-commits
mailing list