cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Christine Caulfield <ccaulfie@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] Fix libdlm static build
Date: Thu, 03 Jul 2008 14:06:06 +0100	[thread overview]
Message-ID: <486CCEBE.3050809@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0807031340490.27368@trider-g7>

Fabio M. Di Nitto wrote:
> 
> 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 don't understand the problem you are trying to fix here. Having PIC 
objects in the dynamic library and non-PIC in the static is perfectly 
standard practice.

-- 

Chrissie



  reply	other threads:[~2008-07-03 13:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 11:44 [Cluster-devel] [PATCH] Fix libdlm static build Fabio M. Di Nitto
2008-07-03 13:06 ` Christine Caulfield [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486CCEBE.3050809@redhat.com \
    --to=ccaulfie@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).