File: 0001-Add-GCC-support-for-compiling-with-hidden-visibility.patch

package info (click to toggle)
fastcdr 1.0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,268 kB
  • sloc: cpp: 14,085; ansic: 77; makefile: 20; sh: 19
file content (29 lines) | stat: -rw-r--r-- 942 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: =?utf-8?q?Timo_R=C3=B6hling?= <timo@gaussglocke.de>
Date: Tue, 24 Nov 2020 10:38:34 +0100
Subject: Add GCC support for compiling with hidden visibility

Forwarded: https://github.com/eProsima/Fast-CDR/pull/89

GCC hidden visibility closely mimics the Windows DLL import/export
feature, which cleans up the symbol export table and leads to faster
startup times as well as a more stable ABI.
---
 include/fastcdr/fastcdr_dll.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/fastcdr/fastcdr_dll.h b/include/fastcdr/fastcdr_dll.h
index c355f2f..b6564c5 100644
--- a/include/fastcdr/fastcdr_dll.h
+++ b/include/fastcdr/fastcdr_dll.h
@@ -48,7 +48,11 @@
 #define Cdr_DllAPI
 #endif // if defined(EPROSIMA_ALL_DYN_LINK) || defined(FASTCDR_DYN_LINK)
 #else
+#if __GNUC__ >= 4
+#define Cdr_DllAPI __attribute__((visibility("default")))
+#else
 #define Cdr_DllAPI
+#endif // if __GNUC__ >= 4
 #endif // _WIN32
 
 // Auto linking.