bug-hurd
[Top][All Lists]
Advanced

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

[PATCH] fix mach-defpager static linking


From: Flavio Cruz
Subject: [PATCH] fix mach-defpager static linking
Date: Fri, 1 Jan 2016 17:55:11 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

* mach-defpager/Makefile: Allow multiple definitions for mach-defpager.

---

Seems my patch for mach-defpager that replaced the deprecated
malloc_hook/free_hook with malloc and free implementations does not play
well with static linking. Since I had another patch that fixed some
other issue in my source tree, I did not had problems compiling
mach-defpager but I've noticed that it does not build fresh out of git.

Not sure if we should revert my original patch, but the following patch
fixes the issue by allowing multiple definitions of malloc/free.  I've
tested mach-defpager and it's calling the custom malloc/free
implementations as expected.

diff --git a/mach-defpager/Makefile b/mach-defpager/Makefile
index d95b8b0..036a49a 100644
--- a/mach-defpager/Makefile
+++ b/mach-defpager/Makefile
@@ -30,7 +30,7 @@ OBJS  := $(SRCS:.c=.o) \
           default_pager_replyUser.o
 
 HURDLIBS:= ihash
-LDFLAGS += -static
+LDFLAGS += -static -z muldefs
 LDLIBS:= -lpthread
 
 include ../Makeconf



reply via email to

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