git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit SIGOURE <tsuna@lrde.epita.fr>
To: git list <git@vger.kernel.org>
Subject: Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
Date: Sun, 21 Oct 2007 23:56:22 +0200	[thread overview]
Message-ID: <09169ECD-19E1-44D1-8539-71EBBA3826A8@lrde.epita.fr> (raw)
In-Reply-To: <34DAC3CA-E226-4488-8B03-FC45A6A95F78@lrde.epita.fr>

[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]

On Oct 4, 2007, at 5:59 PM, Benoit SIGOURE wrote:

> On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:
>
>> Benoit Sigoure <tsuna@lrde.epita.fr> writes:
>>
>>> diff --git a/Makefile b/Makefile
>>> index a1fe443..7c6c453 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -100,6 +100,9 @@ all::
>>>  # that tells runtime paths to dynamic libraries;
>>>  # "-Wl,-rpath=/path/lib" is used instead.
>>>  #
>>> +# Define NO_RPATH if your dynamic loader doesn't support runtime  
>>> paths at
>>> +# all.
>>> +#
>>>  # Define USE_NSEC below if you want git to care about sub-second  
>>> file mtimes
>>>  # and ctimes. Note that you need recent glibc (at least 2.2.4)  
>>> for this, and
>>>  # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using  
>>> it will likely
>>
>> Thanks for this part;
>>
>>> @@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)
>>>  			BASIC_LDFLAGS += -L/opt/local/lib
>>>  		endif
>>>  	endif
>>> +        NO_RPATH = YesPlease
>>>  endif
>>
>> I'll let Darwin users to fight the defaults for this part out.
>
> No more replies on this thread, and the Apple documentation  
> confirms that there is no rpath support in the dynamic loader of  
> OSX 10.4 and before.  I don't know about the soon-to-be-released  
> 10.5 aka Leopard.
>
>>> @@ -521,7 +525,10 @@ ifndef NO_CURL
>>>  	ifdef CURLDIR
>>>  		# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
>>>  		BASIC_CFLAGS += -I$(CURLDIR)/include
>>> -		CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$ 
>>> (lib) -lcurl
>>> +		CURL_LIBCURL = -L$(CURLDIR)/$(lib) -lcurl
>>> +ifndef NO_RPATH
>>> +		CURL_LIBCURL += $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)
>>> +endif
>>>  	else
>>>  		CURL_LIBCURL = -lcurl
>>>  	endif
>>
>>> @@ -539,7 +546,10 @@ endif
>>>
>>>  ifdef ZLIB_PATH
>>>  	BASIC_CFLAGS += -I$(ZLIB_PATH)/include
>>> -	EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$ 
>>> (lib)
>>> +	EXTLIBS += -L$(ZLIB_PATH)/$(lib)
>>> +ifndef NO_RPATH
>>> +	EXTLIBS += $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)
>>> +endif
>>>  endif
>>>  EXTLIBS += -lz
>>>
>>
>> While these parts are ugly but correct, I think...
>>
>>> @@ -547,7 +557,10 @@ ifndef NO_OPENSSL
>>>  	OPENSSL_LIBSSL = -lssl
>>>  	ifdef OPENSSLDIR
>>>  		BASIC_CFLAGS += -I$(OPENSSLDIR)/include
>>> -		OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$ 
>>> (OPENSSLDIR)/$(lib)
>>> +		OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib)
>>> +ifndef NO_RPATH
>>> +		OPENSSL_LINK = $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
>>> +endif
>>>  	else
>>>  		OPENSSL_LINK =
>>>  	endif
>>
>> this and the ICONV one are missing s/=/+=/.
>
> You're right, sorry.
>
>>
>> If we do not care about supporting too old GNU make, we can do
>> this by first adding this near the top:
>>
>>         ifndef NO_RPATH
>>         LINKER_PATH = -L$(1) $(CC_LD_DYNPATH)$(1)
>>         else
>>         LINKER_PATH = -L$(1)
>>         endif
>>
>> and then doing something like:
>>
>> 	CURL_LIBCURL = $(call LINKER_PATH,$(CURLDIR)/$(lib))
>> 	OPENSSL_LINK = $(call LINKER_PATH,$(OPENSSLDIR)/$(lib))
>>
>> to make it easier to read and less error prone.
>>
>
> Yes.  I can rework the patch, but the question is: do you care  
> about old GNU make?  Can I rewrite the patch with this feature?

I know Junio is still offline but maybe someone else has an objection  
against this?

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

  reply	other threads:[~2007-10-21 21:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 21:34 Linking with -R (rpath) not supported on Darwin Benoit SIGOURE
2007-10-03 21:41 ` Junio C Hamano
2007-10-03 22:20   ` [PATCH] Be nice with compilers that do not support runtime paths at all Benoit Sigoure
2007-10-03 22:49     ` Steven Grimm
2007-10-04  1:08       ` Brian Gernhardt
2007-10-03 23:18     ` Junio C Hamano
2007-10-04  1:10       ` Brian Gernhardt
2007-10-04 15:59       ` Benoit SIGOURE
2007-10-21 21:56         ` Benoit SIGOURE [this message]
2007-10-22  6:44           ` Shawn O. Pearce
2007-10-22  6:52             ` Brian Dessent
2007-10-22 10:52             ` Johannes Schindelin
2007-10-03 22:39 ` Linking with -R (rpath) not supported on Darwin Brian Gernhardt
2007-10-03 22:58   ` Benoit SIGOURE

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=09169ECD-19E1-44D1-8539-71EBBA3826A8@lrde.epita.fr \
    --to=tsuna@lrde.epita.fr \
    --cc=git@vger.kernel.org \
    /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).