1 |
commit: 87d6537245b6f7cbf028e4c0e187cda7484729f0 |
2 |
Author: Guenther Brunthaler <gb_about_gnu <AT> gmx <DOT> net> |
3 |
AuthorDate: Sun Nov 27 18:30:36 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 27 18:30:36 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=87d65372 |
7 |
|
8 |
libsbutil: elide sb_maybe_gdb when -DNDEBUG is used |
9 |
|
10 |
Since sb_maybe_gdb is set up as a stub macro, make sure we don't define |
11 |
the function either to cut down on size and build failures (when the |
12 |
macro tries to expand the function prototype). |
13 |
|
14 |
URL: https://bugs.gentoo.org/600550 |
15 |
|
16 |
libsbutil/sb_gdb.c | 2 ++ |
17 |
1 file changed, 2 insertions(+) |
18 |
|
19 |
diff --git a/libsbutil/sb_gdb.c b/libsbutil/sb_gdb.c |
20 |
index 6112379..021a3c4 100644 |
21 |
--- a/libsbutil/sb_gdb.c |
22 |
+++ b/libsbutil/sb_gdb.c |
23 |
@@ -62,6 +62,7 @@ void sb_gdb(void) |
24 |
} |
25 |
} |
26 |
|
27 |
+#ifndef NDEBUG |
28 |
void sb_maybe_gdb(void) |
29 |
{ |
30 |
if (is_env_on("SANDBOX_GDB")) { |
31 |
@@ -69,3 +70,4 @@ void sb_maybe_gdb(void) |
32 |
sb_gdb(); |
33 |
} |
34 |
} |
35 |
+#endif |