cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] Fix libdlm static build
@ 2008-07-03 11:44 Fabio M. Di Nitto
  2008-07-03 13:06 ` Christine Caulfield
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio M. Di Nitto @ 2008-07-03 11:44 UTC (permalink / raw)
  To: cluster-devel.redhat.com


Hi David,

the objects included in the static version of dlm are different from the 
one in the shared lib. This is generally wrong as they should be the same.

the patch addresses the problem by killing .po files in favour of more 
common .o and changing the linking targets.

the patch applies to both master and stable2. rhel branches are also 
affected by other problems (_lt is linked to pthread) but i don't think 
it's wise to change it.

Please review and apply.

Thanks
Fabio

diff --git a/dlm/libdlm/Makefile b/dlm/libdlm/Makefile
index 0cc1f7b..734eaa9 100644
--- a/dlm/libdlm/Makefile
+++ b/dlm/libdlm/Makefile
@@ -42,26 +42,20 @@ $(TARGET)_lt.a: $(TARGET)_lt.o
  	${AR} cru $@ $^
  	${RANLIB} $@

-$(TARGET).so.${SOMAJOR}.${SOMINOR}: $(TARGET).po $(AISTARGET).po
+$(TARGET).so.${SOMAJOR}.${SOMINOR}: $(TARGET).o $(AISTARGET).o
  	$(CC) -shared -o $@ -Wl,-soname=$(TARGET).so.$(SOMAJOR) $< $(PTHREAD_LDFLAGS) $(LDFLAGS)
  	ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so
  	ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so.$(SOMAJOR)

-$(TARGET)_lt.so.${SOMAJOR}.${SOMINOR}: $(TARGET)_lt.po
+$(TARGET)_lt.so.${SOMAJOR}.${SOMINOR}: $(TARGET)_lt.o
  	$(CC) -shared -o $@ -Wl,-soname=$(TARGET)_lt.so.$(SOMAJOR) $< $(LDFLAGS)
  	ln -sf $(TARGET)_lt.so.$(SOMAJOR).$(SOMINOR) $(TARGET)_lt.so
  	ln -sf $(TARGET)_lt.so.$(SOMAJOR).$(SOMINOR) $(TARGET)_lt.so.$(SOMAJOR)

  %_lt.o: $(S)/%.c
-	$(CC) $(CFLAGS) -c -o $@ $<
-
-%_lt.po: $(S)/%.c
  	$(CC) $(CFLAGS) -fPIC -c -o $@ $<

  %.o: $(S)/%.c
-	$(CC) $(CFLAGS) -D_REENTRANT -c -o $@ $<
-
-%.po: $(S)/%.c
  	$(CC) $(CFLAGS) -fPIC -D_REENTRANT -c -o $@ $<

  clean: generalclean

--
I'm going to make him an offer he can't refuse.



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-07-04 11:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 11:44 [Cluster-devel] [PATCH] Fix libdlm static build Fabio M. Di Nitto
2008-07-03 13:06 ` Christine Caulfield
2008-07-03 17:49   ` Fabio M. Di Nitto
2008-07-03 17:53   ` Lon Hohberger
2008-07-04  7:20     ` Christine Caulfield
2008-07-04  7:34       ` Fabio M. Di Nitto
2008-07-04  8:54         ` Christine Caulfield
2008-07-04 11:28           ` Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).