Accepting request 906357 from science
- Add gfan-odr.patch: A patch to fix ODR violations, which were causing segfaults in the respective programs with LTO enabled. OBS-URL: https://build.opensuse.org/request/show/906357 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gfan?expand=0&rev=11
This commit is contained in:
commit
bcfdf89862
85
gfan-odr.patch
Normal file
85
gfan-odr.patch
Normal file
@ -0,0 +1,85 @@
|
||||
From a75e670e0e228e0a738eb65c7128a01446b4135c Mon Sep 17 00:00:00 2001
|
||||
From: Alois Wohlschlager <alois1@gmx-topmail.de>
|
||||
Date: Sat, 3 Jul 2021 11:07:23 +0200
|
||||
Subject: [PATCH] Fix ODR violations
|
||||
Upstream: not reachable
|
||||
|
||||
Various traversal code reused class names (Boundary, pathStepRidge,
|
||||
pathStepFacet) in violation of the one definition rule. Put the
|
||||
respective classes into anonymous namespaces to comply with ODR.
|
||||
---
|
||||
src/gfanlib_traversal.cpp | 4 ++++
|
||||
src/symmetrictraversal.cpp | 4 ++++
|
||||
src/tropicaltraverse.cpp | 5 +++++
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/src/gfanlib_traversal.cpp b/src/gfanlib_traversal.cpp
|
||||
index dce38c1..3e9a746 100644
|
||||
--- a/src/gfanlib_traversal.cpp
|
||||
+++ b/src/gfanlib_traversal.cpp
|
||||
@@ -62,6 +62,8 @@ bool FanBuilder::process(FanTraverser &traverser)
|
||||
in the computation is made these edges will be deleted.
|
||||
*/
|
||||
|
||||
+namespace
|
||||
+{
|
||||
|
||||
class Boundary
|
||||
{
|
||||
@@ -185,6 +187,8 @@ struct pathStepFacet
|
||||
list<ZVector> ridgesRayUniqueVector;//stores the ray of the link that we came from
|
||||
};
|
||||
|
||||
+}
|
||||
+
|
||||
/**
|
||||
We need to simulate two mutually recursive functions. An actual
|
||||
implementation of these two functions would probably not work since
|
||||
diff --git a/src/symmetrictraversal.cpp b/src/symmetrictraversal.cpp
|
||||
index 8cf6f40..4fe66e0 100644
|
||||
--- a/src/symmetrictraversal.cpp
|
||||
+++ b/src/symmetrictraversal.cpp
|
||||
@@ -103,6 +103,8 @@ bool SymmetricTargetVertexSetBuilder::process(ConeTraverser &traverser)
|
||||
in the computation is made these edges will be deleted.
|
||||
*/
|
||||
|
||||
+namespace
|
||||
+{
|
||||
|
||||
class Boundary
|
||||
{
|
||||
@@ -258,6 +260,8 @@ struct pathStepFacet
|
||||
IntegerVectorList ridgesRayUniqueVector;//stores the ray of the link that we came from
|
||||
};
|
||||
|
||||
+}
|
||||
+
|
||||
/**
|
||||
We need to simulate two mutually recursive functions. An actual
|
||||
implementation of these two functions would probably not work since
|
||||
diff --git a/src/tropicaltraverse.cpp b/src/tropicaltraverse.cpp
|
||||
index 05e9747..c01a69f 100644
|
||||
--- a/src/tropicaltraverse.cpp
|
||||
+++ b/src/tropicaltraverse.cpp
|
||||
@@ -104,6 +104,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+namespace
|
||||
+{
|
||||
+
|
||||
/**
|
||||
Rewrite these comments.
|
||||
|
||||
@@ -130,6 +133,8 @@ struct pathStepFacet
|
||||
IntegerVectorList ridges;
|
||||
};
|
||||
|
||||
+}
|
||||
+
|
||||
/**
|
||||
We need to simulate two mutually recursive functions. An actual
|
||||
implementation of these two functions would propably not work since
|
||||
--
|
||||
2.32.0
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 13 09:09:06 UTC 2021 - Alois Wohlschlager <alois1@gmx-topmail.de>
|
||||
|
||||
- Add gfan-odr.patch: A patch to fix ODR violations, which were
|
||||
causing segfaults in the respective programs with LTO enabled.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 19 10:05:47 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package gfan
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -28,6 +28,7 @@ Source: http://home.imf.au.dk/jensen/software/gfan/%name%version.tar.gz
|
||||
Patch1: gfan-automake.diff
|
||||
Patch2: gfan-warnings.diff
|
||||
Patch3: cddlib.patch
|
||||
Patch4: gfan-odr.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: cddlib-devel
|
||||
BuildRequires: gcc-c++
|
||||
|
Loading…
Reference in New Issue
Block a user