diff --git a/.gitignore b/.gitignore index 684df94..14203c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sdcc-src-3.2.0.tar.bz2 +/sdcc-src-3.3.0.tar.bz2 diff --git a/sdcc-3.2.0.diff b/sdcc-3.2.0.diff deleted file mode 100644 index 1340028..0000000 --- a/sdcc-3.2.0.diff +++ /dev/null @@ -1,196 +0,0 @@ -diff --git a/src/SDCCnaddr.cc b/src/SDCCnaddr.cc -index 1330de3..213d644 100644 ---- a/src/SDCCnaddr.cc -+++ b/src/SDCCnaddr.cc -@@ -21,6 +21,42 @@ - - #include "SDCCnaddr.hpp" - -+// A quick-and-dirty function to get the CFG from sdcc (a simplified version of the function from SDCCralloc.hpp). -+void -+create_cfg_naddr(cfg_t &cfg, iCode *start_ic, ebbIndex *ebbi) -+{ -+ iCode *ic; -+ -+ std::map key_to_index; -+ { -+ int i; -+ -+ for (ic = start_ic, i = 0; ic; ic = ic->next, i++) -+ { -+ boost::add_vertex(cfg); -+ key_to_index[ic->key] = i; -+ cfg[i].ic = ic; -+ } -+ } -+ -+ // Get control flow graph from sdcc. -+ for (ic = start_ic; ic; ic = ic->next) -+ { -+ if (ic->op != GOTO && ic->op != RETURN && ic->op != JUMPTABLE && ic->next) -+ boost::add_edge(key_to_index[ic->key], key_to_index[ic->next->key], 3.0f, cfg); -+ -+ if (ic->op == GOTO) -+ boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, ic->label)->sch->key], 6.0f, cfg); -+ else if (ic->op == RETURN) -+ boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, returnLabel)->sch->key], 6.0f, cfg); -+ else if (ic->op == IFX) -+ boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, IC_TRUE(ic) ? IC_TRUE(ic) : IC_FALSE(ic))->sch->key], 6.0f, cfg); -+ else if (ic->op == JUMPTABLE) -+ for (symbol *lbl = (symbol *)(setFirstItem (IC_JTLABELS (ic))); lbl; lbl = (symbol *)(setNextItem (IC_JTLABELS (ic)))) -+ boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, lbl)->sch->key], 6.0f, cfg); -+ } -+} -+ - int - switchAddressSpacesOptimally (iCode *ic, ebbIndex *ebbi) - { -diff --git a/src/SDCCnaddr.hpp b/src/SDCCnaddr.hpp -index 1cfec51..3096baa 100644 ---- a/src/SDCCnaddr.hpp -+++ b/src/SDCCnaddr.hpp -@@ -48,9 +48,9 @@ extern "C" - typedef short int naddrspace_t; // Named address spaces. -1: Undefined, Others: see map. - - #ifdef HAVE_STX_BTREE_SET_H --typedef stx::btree_set naddrspaceset_t; // Faster than std::set -+typedef stx::btree_set naddrspaceset_t; // Faster than std::set - #else --typedef std::set naddrspaceset_t; -+typedef std::set naddrspaceset_t; - #endif - - struct assignment_naddr -@@ -113,45 +113,9 @@ struct tree_dec_naddr_node - assignment_list_naddr_t assignments; - }; - --typedef boost::adjacency_list cfg_t; // The edge property is the cost of subdividing he edge and inserting a bank switching instruction. -+typedef boost::adjacency_list cfg_t; // The edge property is the cost of subdividing the edge and inserting a bank switching instruction. - typedef boost::adjacency_list tree_dec_naddr_t; - --// A quick-and-dirty function to get the CFG from sdcc (a simplified version of the function from SDCCralloc.hpp). --void --create_cfg_naddr(cfg_t &cfg, iCode *start_ic, ebbIndex *ebbi) --{ -- iCode *ic; -- -- std::map key_to_index; -- { -- int i; -- -- for (ic = start_ic, i = 0; ic; ic = ic->next, i++) -- { -- boost::add_vertex(cfg); -- key_to_index[ic->key] = i; -- cfg[i].ic = ic; -- } -- } -- -- // Get control flow graph from sdcc. -- for (ic = start_ic; ic; ic = ic->next) -- { -- if (ic->op != GOTO && ic->op != RETURN && ic->op != JUMPTABLE && ic->next) -- boost::add_edge(key_to_index[ic->key], key_to_index[ic->next->key], 3.0f, cfg); -- -- if (ic->op == GOTO) -- boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, ic->label)->sch->key], 6.0f, cfg); -- else if (ic->op == RETURN) -- boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, returnLabel)->sch->key], 6.0f, cfg); -- else if (ic->op == IFX) -- boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, IC_TRUE(ic) ? IC_TRUE(ic) : IC_FALSE(ic))->sch->key], 6.0f, cfg); -- else if (ic->op == JUMPTABLE) -- for (symbol *lbl = (symbol *)(setFirstItem (IC_JTLABELS (ic))); lbl; lbl = (symbol *)(setNextItem (IC_JTLABELS (ic)))) -- boost::add_edge(key_to_index[ic->key], key_to_index[eBBWithEntryLabel(ebbi, lbl)->sch->key], 6.0f, cfg); -- } --} -- - // Annotate nodes of the control flow graph with the set of possible named address spaces active there. - void annotate_cfg_naddr(cfg_t &cfg, std::map &addrspaces) - { -@@ -435,7 +399,7 @@ int tree_dec_naddrswitch_nodes(T_t &T, typename boost::graph_traits::vertex - } - - template --void implement_assignment(const assignment_naddr &a, const G_t &G, const std::map addrspaces) -+static void implement_naddr_assignment(const assignment_naddr &a, const G_t &G, const std::map addrspaces) - { - typedef typename boost::graph_traits::vertex_descriptor vertex_t; - typedef typename boost::graph_traits::edge_iterator ei_t; -@@ -479,7 +443,7 @@ int tree_dec_address_switch(T_t &T, const G_t &G, const std::map= 0; i--) - { - cfg_sym_t cfg2; -- boost::copy_graph(cfg, cfg2); -+ boost::copy_graph(cfg, cfg2, boost::vertex_copy(forget_properties()).edge_copy(forget_properties())); - for (int j = boost::num_vertices(cfg) - 1; j >= 0; j--) - { - if (cfg[j].alive.find(i) == cfg[j].alive.end()) -@@ -436,7 +436,7 @@ create_cfg(cfg_t &cfg, con_t &con, ebbIndex *ebbi) - #endif - // Non-connected CFGs shouldn't exist either. Another problem with dead code eliminarion. - cfg_sym_t cfg2; -- boost::copy_graph(cfg, cfg2); -+ boost::copy_graph(cfg, cfg2, boost::vertex_copy(forget_properties()).edge_copy(forget_properties())); - std::vector::vertices_size_type> component(num_vertices(cfg2)); - boost::connected_components(cfg2, &component[0]); - -diff --git a/src/SDCCtree_dec.hpp b/src/SDCCtree_dec.hpp -index e5b1de3..2dce8a6 100644 ---- a/src/SDCCtree_dec.hpp -+++ b/src/SDCCtree_dec.hpp -@@ -53,6 +53,14 @@ - #include - #include - -+struct forget_properties -+{ -+ template -+ void operator()(const T1&, const T2&) const -+ { -+ } -+}; -+ - // Thorup algorithm D. - // The use of the multimap makes the complexity of this O(|I|log|I|), which could be reduced to O(|I|). - template -@@ -97,7 +105,7 @@ template - void thorup_E(std::multimap &M, const I_t &I) - { - typedef typename boost::graph_traits::adjacency_iterator adjacency_iter_t; -- typedef typename boost::graph_traits::vertex_iterator vertex_iter_t; -+// typedef typename boost::graph_traits::vertex_iterator vertex_iter_t; - typedef typename boost::property_map::type index_map; - index_map index = boost::get(boost::vertex_index, I); - -@@ -152,7 +160,7 @@ void thorup_elimination_ordering(l_t &l, const G_t &G) - { - // Should we do this? Or just use G as J? The Thorup paper seems unclear, it speaks of statements that contain jumps to other statements, but does it count as a jump, when they're just subsequent? - boost::adjacency_list J; -- boost::copy_graph(G, J); -+ boost::copy_graph(G, J, boost::vertex_copy(forget_properties()).edge_copy(forget_properties())); - for (unsigned int i = 0; i < boost::num_vertices(J) - 1; i++) - remove_edge(i, i + 1, J); - -@@ -256,7 +264,7 @@ void tree_decomposition_from_elimination_ordering(T_t &T, const std::list G_sym; -- boost::copy_graph(G, G_sym); -+ boost::copy_graph(G, G_sym, boost::vertex_copy(forget_properties()).edge_copy(forget_properties())); - - std::vector active(boost::num_vertices(G), true); - diff --git a/sdcc.spec b/sdcc.spec index 20117b2..53039a9 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -1,6 +1,6 @@ Name: sdcc -Version: 3.2.0 -Release: 3%{?dist} +Version: 3.3.0 +Release: 0%{?dist} Summary: Small Device C Compiler Group: Applications/Engineering License: GPLv2+ @@ -10,7 +10,7 @@ Source1: README.fedora # Misc fixes to allow building with boost > 1.50.0 # Mostly from upstream's 3.3.0 prereleases. -Patch0: sdcc-3.2.0.diff +#Patch0: sdcc-3.2.0.diff BuildRequires: bison BuildRequires: boost-devel @@ -55,8 +55,7 @@ Emacs extensions for SDCC. %prep -%setup -q -n sdcc -%patch0 -p1 +%setup -q find -name '*.{c,h,cc}' -exec chmod -x '{}' \; # Disable brp-strip-static-archive for now because it errors trying to @@ -82,6 +81,9 @@ mv $RPM_BUILD_ROOT%{_bindir}/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp find $RPM_BUILD_ROOT -type f -name \*.c -exec chmod a-x '{}' \; mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/sdcc mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_libexecdir}/sdcc +# remove non-free component +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/non-free + # Create launch scripts in _bindir pushd $RPM_BUILD_ROOT%{_bindir} @@ -122,6 +124,10 @@ popd %changelog +* Mon Sep 02 2013 Roy Rankin - 3.3.0-0 +- Remove non-free directory tree which is not GPL compatible +- Upstream update 3.3.0 + * Fri May 17 2013 Ralf Corsépius - 3.2.0-3 - Modernize spec. - Reflect ghostscript in Fedora >= 18 having dropped pdfopt. diff --git a/sources b/sources index b23e0e6..93ba1ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0808a9b4109d2ba6046ddd7b679a0012 sdcc-src-3.2.0.tar.bz2 +c7c6aa75415580795ecc4fd31948e5ba sdcc-src-3.3.0.tar.bz2