From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Thu, 3 Jul 2008 13:44:05 +0200 (CEST) Subject: [Cluster-devel] [PATCH] Fix libdlm static build Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.