mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Fix build with boost 1.52.
Approved by: crees Obtained from: sdcc revision 8145
This commit is contained in:
parent
f8c80967b7
commit
0ddef9274c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=314948
2 changed files with 55 additions and 6 deletions
|
@ -1,9 +1,4 @@
|
||||||
# New ports collection makefile for: sdcc
|
|
||||||
# Date created: 3 May 2004
|
|
||||||
# Whom: Tijl Coosemans <tijl@ulyssis.org>
|
|
||||||
#
|
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
|
||||||
|
|
||||||
PORTNAME= sdcc
|
PORTNAME= sdcc
|
||||||
PORTVERSION= 3.2.0
|
PORTVERSION= 3.2.0
|
||||||
|
@ -23,7 +18,6 @@ CONFLICTS_INSTALL= sdcc-[0-9]*
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
USE_BZIP2= yes
|
USE_BZIP2= yes
|
||||||
USE_GMAKE= yes
|
USE_GMAKE= yes
|
||||||
USE_GCC= 4.6+
|
|
||||||
|
|
||||||
OPTIONS_DEFINE= DEVLIB DOCS HC08 MCS51 PIC UCSIM Z80
|
OPTIONS_DEFINE= DEVLIB DOCS HC08 MCS51 PIC UCSIM Z80
|
||||||
OPTIONS_DEFAULT=${OPTIONS_DEFINE:NDOCS}
|
OPTIONS_DEFAULT=${OPTIONS_DEFINE:NDOCS}
|
||||||
|
|
55
lang/sdcc/files/patch-boost
Normal file
55
lang/sdcc/files/patch-boost
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
--- src/SDCCtree_dec.hpp.orig
|
||||||
|
+++ src/SDCCtree_dec.hpp
|
||||||
|
@@ -53,6 +53,14 @@
|
||||||
|
#include <boost/graph/copy.hpp>
|
||||||
|
#include <boost/graph/adjacency_list.hpp>
|
||||||
|
|
||||||
|
+struct forget_properties
|
||||||
|
+{
|
||||||
|
+ template<class T1, class T2>
|
||||||
|
+ 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 <class l_t>
|
||||||
|
@@ -152,7 +160,7 @@
|
||||||
|
{
|
||||||
|
// 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<boost::vecS, boost::vecS, boost::directedS> 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 @@
|
||||||
|
|
||||||
|
// Todo: Implement a graph adaptor for boost that allows to treat directed graphs as undirected graphs.
|
||||||
|
boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS> 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<bool> active(boost::num_vertices(G), true);
|
||||||
|
|
||||||
|
--- src/SDCCralloc.hpp.orig
|
||||||
|
+++ src/SDCCralloc.hpp
|
||||||
|
@@ -419,7 +419,7 @@
|
||||||
|
for (var_t i = boost::num_vertices(con) - 1; i >= 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 @@
|
||||||
|
#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<boost::graph_traits<cfg_t>::vertices_size_type> component(num_vertices(cfg2));
|
||||||
|
boost::connected_components(cfg2, &component[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue