bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22430: Relocation error with libstdbuf.so on Solaris SPARC with Stud


From: Rich Burridge
Subject: bug#22430: Relocation error with libstdbuf.so on Solaris SPARC with Studio compilation.
Date: Sun, 24 Jan 2016 13:51:43 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 01/24/2016 09:06 AM, Pádraig Brady wrote:
...
The simplest fix would be to turn it into a macro:

diff --git a/src/system.h b/src/system.h
index 9898bc7..857e56d 100644
--- a/src/system.h
+++ b/src/system.h
@@ -650,11 +650,16 @@ emit_ancillary_info (char const *program)
            node, node == program ? " invocation" : "");
  }

-static inline void
-emit_try_help (void)
-{
-  fprintf (stderr, _("Try '%s --help' for more information.\n"), program_name);
-}
+/* A macro rather than an inline function, as it references
+   the global program_name, which causes run time linking issues
+   in libstdbuf.so where unused functions are not removed by the linker.  */
+#define emit_try_help() \
+  do \
+    { \
+      fprintf (stderr, _("Try '%s --help' for more information.\n"), \
+               program_name); \
+    } \
+  while (0)

  #include "inttostr.h"

This works great.

Thanks!






reply via email to

[Prev in Thread] Current Thread [Next in Thread]