From 424dfa52031a44c331f23805224b7c3bc6f849f2 Mon Sep 17 00:00:00 2001
From: Mark Hellegers <mark@firedisk.net>
Date: Sat, 28 May 2016 19:47:00 +0000
Subject: [PATCH] Fix #12799: Enable elf symbol patching for Haiku
---
headers/tools/cppunit/TestShell.h | 4 ++++
src/tools/cppunit/Jamfile | 6 +++---
src/tools/cppunit/TestShell.cpp | 4 ----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/headers/tools/cppunit/TestShell.h b/headers/tools/cppunit/TestShell.h
index 2704e13..a139585 100644
a
|
b
|
class BDirectory;
|
17 | 17 | class BLocker; |
18 | 18 | class BPath; |
19 | 19 | |
| 20 | #ifndef NO_ELF_SYMBOL_PATCHING |
| 21 | #include <tools/elfsymbolpatcher/ElfSymbolPatcher.h> |
| 22 | #else |
20 | 23 | class ElfSymbolPatchGroup; |
| 24 | #endif |
21 | 25 | |
22 | 26 | // Defines SuiteFunction to be a pointer to a function that |
23 | 27 | // takes no arguments and returns a pointer to a CppUnit::Test |
diff --git a/src/tools/cppunit/Jamfile b/src/tools/cppunit/Jamfile
index ffb20ad..0dea61c 100644
a
|
b
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) cppunit ] ;
|
11 | 11 | { |
12 | 12 | DEFINES += BUILDING_CPPUNIT ; |
13 | 13 | |
14 | | if $(OS) != BEOS || $(OSPLAT) = PPC { |
| 14 | if ( $(OS) != BEOS && $(OS) != HAIKU ) || $(OSPLAT) = PPC { |
15 | 15 | DEFINES += NO_ELF_SYMBOL_PATCHING ; |
16 | 16 | } |
17 | 17 | } |
… |
… |
SharedLibrary libcppunit.so :
|
52 | 52 | : be [ TargetLibstdc++ ] |
53 | 53 | ; |
54 | 54 | |
55 | | if $(OS) = BEOS && $(OSPLAT) != PPC { |
56 | | LinkAgainst libcppunit.so : libelfsymbolpatcher.a ; |
| 55 | if ( $(OS) = BEOS || $(OS) = HAIKU ) && $(OSPLAT) != PPC { |
| 56 | LinkAgainst libcppunit.so : libelfsymbolpatcher.a debug ; |
57 | 57 | } |
58 | 58 | |
59 | 59 | # To run the tests we need the cppunit library. |
diff --git a/src/tools/cppunit/TestShell.cpp b/src/tools/cppunit/TestShell.cpp
index 61abf51..1cbf482 100644
a
|
b
|
|
22 | 22 | #include <TestShell.h> |
23 | 23 | #include <TestListener.h> |
24 | 24 | |
25 | | #ifndef NO_ELF_SYMBOL_PATCHING |
26 | | # include <ElfSymbolPatcher.h> |
27 | | #endif |
28 | | |
29 | 25 | using std::cout; |
30 | 26 | using std::endl; |
31 | 27 | using std::set; |