mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ld-elf.so: make LD_DEBUG always functional.
This causes some increase of the dynamic linker size, but benefits of avoiding compiling private copy or the linker when debugging is required. definitely worth it. The dbg() calls can be compiled out by defining LD_NO_DEBUG symbol. Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
5cf92d7aed
commit
e3e21edb19
2 changed files with 3 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Use the following command to build local debug version of dynamic
|
||||
# linker:
|
||||
# make DEBUG_FLAGS=-g DEBUG=-DDEBUG WITHOUT_TESTS=yes all
|
||||
# make DEBUG_FLAGS=-g WITHOUT_TESTS=yes all
|
||||
|
||||
.include <src.opts.mk>
|
||||
PACKAGE= clibs
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern void debug_printf(const char *, ...) __printflike(1, 2);
|
||||
void debug_printf(const char *, ...) __printflike(1, 2);
|
||||
extern int debug;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef NO_LD_DEBUG
|
||||
#define dbg(...) debug_printf(__VA_ARGS__)
|
||||
#else
|
||||
#define dbg(...) ((void) 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue