* Linking with -R (rpath) not supported on Darwin
@ 2007-10-03 21:34 Benoit SIGOURE
2007-10-03 21:41 ` Junio C Hamano
2007-10-03 22:39 ` Linking with -R (rpath) not supported on Darwin Brian Gernhardt
0 siblings, 2 replies; 14+ messages in thread
From: Benoit SIGOURE @ 2007-10-03 21:34 UTC (permalink / raw)
To: git list
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
Hello,
I've just compiled HEAD (1.5.3.4.209.g9e417) and saw a:
LINK git-http-fetch
i686-apple-darwin8-gcc-4.0.1: unrecognized option '-R/opt/local/lib'
It didn't harm but the build process should be more careful to not
use options that are not supported by the compiler. And it's not a
matter of using -Wl,-rpath instead.
Cheers,
--
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 --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linking with -R (rpath) not supported on Darwin
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:39 ` Linking with -R (rpath) not supported on Darwin Brian Gernhardt
1 sibling, 1 reply; 14+ messages in thread
From: Junio C Hamano @ 2007-10-03 21:41 UTC (permalink / raw)
To: Benoit SIGOURE; +Cc: git list
Benoit SIGOURE <tsuna@lrde.epita.fr> writes:
> It didn't harm but the build process should be more careful to not use
> options that are not supported by the compiler. And it's not a
> matter of using -Wl,-rpath instead.
As I do not have an access to a Darwin box (nor anybody sent me
a free Mac yet), I do not have any interest in fixing it myself
nor more importantly any means to verify the result. That makes
it _your_ build process that should be more careful ;-).
You know where -R is coming from and can find out what options
_your_ platform wants, so why not send in a patch _before_
complaining?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-03 21:41 ` Junio C Hamano
@ 2007-10-03 22:20 ` Benoit Sigoure
2007-10-03 22:49 ` Steven Grimm
2007-10-03 23:18 ` Junio C Hamano
0 siblings, 2 replies; 14+ messages in thread
From: Benoit Sigoure @ 2007-10-03 22:20 UTC (permalink / raw)
To: git; +Cc: Benoit Sigoure
On Darwin for instance, there is no -R or -Wl,-rpath thing to fiddle with,
it's simply not supported by the dynamic loader. This patch introduces a
NO_RPATH define which is enabled by default for Darwin.
---
Makefile | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
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
@@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)
BASIC_LDFLAGS += -L/opt/local/lib
endif
endif
+ NO_RPATH = YesPlease
endif
ifdef NO_R_TO_GCC_LINKER
@@ -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
@@ -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
@@ -564,7 +577,10 @@ endif
ifdef NEEDS_LIBICONV
ifdef ICONVDIR
BASIC_CFLAGS += -I$(ICONVDIR)/include
- ICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)
+ ICONV_LINK = -L$(ICONVDIR)/$(lib)
+ifndef NO_RPATH
+ ICONV_LINK = $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)
+endif
else
ICONV_LINK =
endif
--
1.5.3.4.209.g9e417
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Linking with -R (rpath) not supported on Darwin
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:39 ` Brian Gernhardt
2007-10-03 22:58 ` Benoit SIGOURE
1 sibling, 1 reply; 14+ messages in thread
From: Brian Gernhardt @ 2007-10-03 22:39 UTC (permalink / raw)
To: Benoit SIGOURE; +Cc: git list
On Oct 3, 2007, at 5:34 PM, Benoit SIGOURE wrote:
> Hello,
> I've just compiled HEAD (1.5.3.4.209.g9e417) and saw a:
> LINK git-http-fetch
> i686-apple-darwin8-gcc-4.0.1: unrecognized option '-R/opt/local/lib'
>
> It didn't harm but the build process should be more careful to not
> use options that are not supported by the compiler. And it's not a
> matter of using -Wl,-rpath instead.
I compile git very regularly on my MacBook Pro and have never seen
this error. Do you have the most recent copy of Xcode? I've seen
odd errors on one of the not very old versions of the developer's
tools. For me, `gcc -v` reports "gcc version 4.0.1 (Apple Computer,
Inc. build 5367)".
~~ Brian
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
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
1 sibling, 1 reply; 14+ messages in thread
From: Steven Grimm @ 2007-10-03 22:49 UTC (permalink / raw)
To: Benoit Sigoure; +Cc: git
Benoit Sigoure wrote:
> On Darwin for instance, there is no -R or -Wl,-rpath thing to fiddle with,
> it's simply not supported by the dynamic loader. This patch introduces a
> NO_RPATH define which is enabled by default for Darwin.
>
I compile git on a MacBook Pro (OS X 10.4, gcc 4.0.1 build 5367 from the
normal Xcode install that comes on the OS install DVD) on a regular
basis. The makefile works fine for me. I suspect there's something else
going on here.
-Steve
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Linking with -R (rpath) not supported on Darwin
2007-10-03 22:39 ` Linking with -R (rpath) not supported on Darwin Brian Gernhardt
@ 2007-10-03 22:58 ` Benoit SIGOURE
0 siblings, 0 replies; 14+ messages in thread
From: Benoit SIGOURE @ 2007-10-03 22:58 UTC (permalink / raw)
To: Brian Gernhardt; +Cc: git list
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
On Oct 4, 2007, at 12:39 AM, Brian Gernhardt wrote:
> On Oct 3, 2007, at 5:34 PM, Benoit SIGOURE wrote:
>
>> Hello,
>> I've just compiled HEAD (1.5.3.4.209.g9e417) and saw a:
>> LINK git-http-fetch
>> i686-apple-darwin8-gcc-4.0.1: unrecognized option '-R/opt/local/lib'
>>
>> It didn't harm but the build process should be more careful to not
>> use options that are not supported by the compiler. And it's not
>> a matter of using -Wl,-rpath instead.
>
> I compile git very regularly on my MacBook Pro and have never seen
> this error. Do you have the most recent copy of Xcode? I've seen
> odd errors on one of the not very old versions of the developer's
> tools. For me, `gcc -v` reports "gcc version 4.0.1 (Apple
> Computer, Inc. build 5367)".
>
> ~~ Brian
$ gcc -v
[...]
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
I've seen this message for the 1st time when compiling Git after my
nightly git pull today. Anyways, this should be done because there
is no point in trying to use a feature that doesn't exist, even
though GCC is being nice by simply issuing a warning instead of an
error.
See:
http://developer.apple.com/releasenotes/DeveloperTools/RN-dyld/
index.html
In the section "Known Issues" it clearly states "No rpath support".
Cheers,
--
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 --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
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-03 23:18 ` Junio C Hamano
2007-10-04 1:10 ` Brian Gernhardt
2007-10-04 15:59 ` Benoit SIGOURE
1 sibling, 2 replies; 14+ messages in thread
From: Junio C Hamano @ 2007-10-03 23:18 UTC (permalink / raw)
To: Benoit Sigoure; +Cc: git
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.
> @@ -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/=/+=/.
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.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-03 22:49 ` Steven Grimm
@ 2007-10-04 1:08 ` Brian Gernhardt
0 siblings, 0 replies; 14+ messages in thread
From: Brian Gernhardt @ 2007-10-04 1:08 UTC (permalink / raw)
To: Steven Grimm; +Cc: Benoit Sigoure, git
On Oct 3, 2007, at 6:49 PM, Steven Grimm wrote:
> Benoit Sigoure wrote:
>> On Darwin for instance, there is no -R or -Wl,-rpath thing to
>> fiddle with,
>> it's simply not supported by the dynamic loader. This patch
>> introduces a
>> NO_RPATH define which is enabled by default for Darwin.
>>
>
> I compile git on a MacBook Pro (OS X 10.4, gcc 4.0.1 build 5367
> from the normal Xcode install that comes on the OS install DVD) on
> a regular basis. The makefile works fine for me. I suspect there's
> something else going on here.
The rpath code is only used if you define one of the following options:
CURLDIR
ZLIB_PATH
OPENSSLDIR
ICONVDIR
The default Darwin options don't define any of these, it just relies
on finding those libraries in the library path (including /sw or /opt/
local if you have them installed).
~~ Brian G.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-03 23:18 ` Junio C Hamano
@ 2007-10-04 1:10 ` Brian Gernhardt
2007-10-04 15:59 ` Benoit SIGOURE
1 sibling, 0 replies; 14+ messages in thread
From: Brian Gernhardt @ 2007-10-04 1:10 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Benoit Sigoure, git
On Oct 3, 2007, at 7:18 PM, Junio C Hamano wrote:
> Benoit Sigoure <tsuna@lrde.epita.fr> writes:
>
>> @@ -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.
It makes sense, since Apple's gcc/ld/dyld doesn't use rpath.
~~ Brian
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
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
1 sibling, 1 reply; 14+ messages in thread
From: Benoit SIGOURE @ 2007-10-04 15:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 3127 bytes --]
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?
Thanks.
Cheers,
--
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 --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-04 15:59 ` Benoit SIGOURE
@ 2007-10-21 21:56 ` Benoit SIGOURE
2007-10-22 6:44 ` Shawn O. Pearce
0 siblings, 1 reply; 14+ messages in thread
From: Benoit SIGOURE @ 2007-10-21 21:56 UTC (permalink / raw)
To: git list
[-- 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 --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-21 21:56 ` Benoit SIGOURE
@ 2007-10-22 6:44 ` Shawn O. Pearce
2007-10-22 6:52 ` Brian Dessent
2007-10-22 10:52 ` Johannes Schindelin
0 siblings, 2 replies; 14+ messages in thread
From: Shawn O. Pearce @ 2007-10-22 6:44 UTC (permalink / raw)
To: Benoit SIGOURE; +Cc: git list
Benoit SIGOURE <tsuna@lrde.epita.fr> wrote:
> >On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:
> >>Benoit Sigoure <tsuna@lrde.epita.fr> writes:
> >>
> >>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?
How old of a GNU make are talking about here? The above is certainly
a lot nicer to read, but I'd hate to suddenly ship a new Git that
someone cannot compile because their GNU make is too old.
GNU make is fortunately pretty easy to compile, so it shouldn't be
that difficult for someone to build a newer version if they had to,
but why make them go through all that extra work just to install
a new Git?
What about using a small helper shell script and using $(shell)
instead of $(call)?
So I guess in short I think I was in agreement with Junio a while
ago on this, which was that I don't want to require a newer GNU
make than we already require our users to have.
--
Shawn.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-22 6:44 ` Shawn O. Pearce
@ 2007-10-22 6:52 ` Brian Dessent
2007-10-22 10:52 ` Johannes Schindelin
1 sibling, 0 replies; 14+ messages in thread
From: Brian Dessent @ 2007-10-22 6:52 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Benoit SIGOURE, git list
"Shawn O. Pearce" wrote:
> How old of a GNU make are talking about here? The above is certainly
According to the NEWS file, $(call) was added to GNU make v3.78,
released 1999-09-22.
Brian
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] Be nice with compilers that do not support runtime paths at all.
2007-10-22 6:44 ` Shawn O. Pearce
2007-10-22 6:52 ` Brian Dessent
@ 2007-10-22 10:52 ` Johannes Schindelin
1 sibling, 0 replies; 14+ messages in thread
From: Johannes Schindelin @ 2007-10-22 10:52 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Benoit SIGOURE, git list
Hi,
On Mon, 22 Oct 2007, Shawn O. Pearce wrote:
> Benoit SIGOURE <tsuna@lrde.epita.fr> wrote:
> > >On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:
> > >>Benoit Sigoure <tsuna@lrde.epita.fr> writes:
> > >>
> > >>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?
>
> How old of a GNU make are talking about here? The above is certainly a
> lot nicer to read, but I'd hate to suddenly ship a new Git that someone
> cannot compile because their GNU make is too old.
I seem to remember remember that we had some shell quoting in the
Makefile, and it was "call"ed. That broke some setups, so we got rid of
it.
*starting "git log -Scall Makefile"*: yep. It even was me fixing it, in
39c015c556f285106931e0500f301de462b0e46e.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2007-10-22 10:53 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).