]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: tools: do not use the weak attribute for trace() on obsolete linkers
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Jun 2019 14:02:26 +0000 (16:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Jun 2019 14:02:26 +0000 (16:02 +0200)
The default dummy trace() function is marked weak in order to be easily
replaced at link time. Some linkers are having issues with the weak
attribute, so let's not mark it on these linkers. They will simply not
be able to build with TRACE=1, which is no big deal since it's only used
by developers.

src/standard.c

index 1c2e5099c0ef4efe9f737b3ec28175000c7506a7..1dec56123c7e6075ed8e0129eb805e92512eceaa 100644 (file)
@@ -4298,7 +4298,9 @@ int parse_dotted_uints(const char *str, unsigned int **nums, size_t *sz)
 }
 
 /* do nothing, just a placeholder for debugging calls, the real one is in trace.c */
+#ifndef USE_OBSOLETE_LINKER
 __attribute__((weak,format(printf, 1, 2)))
+#endif
 void trace(char *msg, ...)
 {
 }