{"thread":{"id":"10132","subject":"Linking with -R (rpath) not supported on Darwin","startedAt":"2007-10-03T21:34:41Z","lastAt":"2007-10-22T10:52:56Z","messageCount":14,"participants":["Benoit SIGOURE","Junio C Hamano","Brian Gernhardt","Benoit Sigoure","Steven Grimm","Shawn O. Pearce","Brian Dessent","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"54758","messageId":"4D954ADB-E66E-43CA-87EE-7522FFA87370@lrde.epita.fr","threadId":"10132","inReplyTo":null,"subject":"Linking with -R (rpath) not supported on Darwin","fromName":"Benoit SIGOURE","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-10-03T21:34:41Z","receivedAt":"2007-10-03T21:34:41Z","isPatch":false,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"Hello,\nI've just compiled HEAD (1.5.3.4.209.g9e417) and saw a:\n     LINK git-http-fetch\ni686-apple-darwin8-gcc-4.0.1: unrecognized option '-R/opt/local/lib'\n\nIt didn't harm but the build process should be more careful to not  \nuse options that are not supported by the compiler.  And it's not a  \nmatter of using -Wl,-rpath instead.\n\nCheers,\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"54763","messageId":"7vsl4rdgf4.fsf@gitster.siamese.dyndns.org","threadId":"10132","inReplyTo":"4D954ADB-E66E-43CA-87EE-7522FFA87370@lrde.epita.fr","subject":"Re: Linking with -R (rpath) not supported on Darwin","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-03T21:41:51Z","receivedAt":"2007-10-03T21:41:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Benoit SIGOURE <tsuna@lrde.epita.fr> writes:\n\n> It didn't harm but the build process should be more careful to not use\n> options that are not supported by the compiler.  And it's not a\n> matter of using -Wl,-rpath instead.\n\nAs I do not have an access to a Darwin box (nor anybody sent me\na free Mac yet), I do not have any interest in fixing it myself\nnor more importantly any means to verify the result.  That makes\nit _your_ build process that should be more careful ;-).\n\nYou know where -R is coming from and can find out what options\n_your_ platform wants, so why not send in a patch _before_\ncomplaining?\n"},{"id":"54772","messageId":"1191450052-23619-1-git-send-email-tsuna@lrde.epita.fr","threadId":"10132","inReplyTo":"7vsl4rdgf4.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Benoit Sigoure","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-10-03T22:20:52Z","receivedAt":"2007-10-03T22:20:52Z","isPatch":true,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Darwin for instance, there is no -R or -Wl,-rpath thing to fiddle with,\nit's simply not supported by the dynamic loader.  This patch introduces a\nNO_RPATH define which is enabled by default for Darwin.\n---\n Makefile |   24 ++++++++++++++++++++----\n 1 files changed, 20 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a1fe443..7c6c453 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -100,6 +100,9 @@ all::\n # that tells runtime paths to dynamic libraries;\n # \"-Wl,-rpath=/path/lib\" is used instead.\n #\n+# Define NO_RPATH if your dynamic loader doesn't support runtime paths at\n+# all.\n+#\n # Define USE_NSEC below if you want git to care about sub-second file mtimes\n # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and\n # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely\n@@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)\n \t\t\tBASIC_LDFLAGS += -L/opt/local/lib\n \t\tendif\n \tendif\n+        NO_RPATH = YesPlease\n endif\n \n ifdef NO_R_TO_GCC_LINKER\n@@ -521,7 +525,10 @@ ifndef NO_CURL\n \tifdef CURLDIR\n \t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n-\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl\n+\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) -lcurl\n+ifndef NO_RPATH\n+\t\tCURL_LIBCURL += $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)\n+endif\n \telse\n \t\tCURL_LIBCURL = -lcurl\n \tendif\n@@ -539,7 +546,10 @@ endif\n \n ifdef ZLIB_PATH\n \tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n-\tEXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n+\tEXTLIBS += -L$(ZLIB_PATH)/$(lib)\n+ifndef NO_RPATH\n+\tEXTLIBS += $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n+endif\n endif\n EXTLIBS += -lz\n \n@@ -547,7 +557,10 @@ ifndef NO_OPENSSL\n \tOPENSSL_LIBSSL = -lssl\n \tifdef OPENSSLDIR\n \t\tBASIC_CFLAGS += -I$(OPENSSLDIR)/include\n-\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n+\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib)\n+ifndef NO_RPATH\n+\t\tOPENSSL_LINK = $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n+endif\n \telse\n \t\tOPENSSL_LINK =\n \tendif\n@@ -564,7 +577,10 @@ endif\n ifdef NEEDS_LIBICONV\n \tifdef ICONVDIR\n \t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\tICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)\n+\t\tICONV_LINK = -L$(ICONVDIR)/$(lib)\n+ifndef NO_RPATH\n+\t\tICONV_LINK = $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)\n+endif\n \telse\n \t\tICONV_LINK =\n \tendif\n-- \n1.5.3.4.209.g9e417\n"},{"id":"54771","messageId":"ECAD7CED-FFA0-46F2-8094-2FDE47CB5D54@silverinsanity.com","threadId":"10132","inReplyTo":"4D954ADB-E66E-43CA-87EE-7522FFA87370@lrde.epita.fr","subject":"Re: Linking with -R (rpath) not supported on Darwin","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-10-03T22:39:19Z","receivedAt":"2007-10-03T22:39:19Z","isPatch":false,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Oct 3, 2007, at 5:34 PM, Benoit SIGOURE wrote:\n\n> Hello,\n> I've just compiled HEAD (1.5.3.4.209.g9e417) and saw a:\n>     LINK git-http-fetch\n> i686-apple-darwin8-gcc-4.0.1: unrecognized option '-R/opt/local/lib'\n>\n> It didn't harm but the build process should be more careful to not  \n> use options that are not supported by the compiler.  And it's not a  \n> matter of using -Wl,-rpath instead.\n\nI compile git very regularly on my MacBook Pro and have never seen  \nthis error.  Do you have the most recent copy of Xcode?  I've seen  \nodd errors on one of the not very old versions of the developer's  \ntools.  For me, `gcc -v` reports \"gcc version 4.0.1 (Apple Computer,  \nInc. build 5367)\".\n\n~~ Brian\n"},{"id":"54773","messageId":"47041C7A.9090003@midwinter.com","threadId":"10132","inReplyTo":"1191450052-23619-1-git-send-email-tsuna@lrde.epita.fr","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-10-03T22:49:30Z","receivedAt":"2007-10-03T22:49:30Z","isPatch":true,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Benoit Sigoure wrote:\n> On Darwin for instance, there is no -R or -Wl,-rpath thing to fiddle with,\n> it's simply not supported by the dynamic loader.  This patch introduces a\n> NO_RPATH define which is enabled by default for Darwin.\n>   \n\nI compile git on a MacBook Pro (OS X 10.4, gcc 4.0.1 build 5367 from the \nnormal Xcode install that comes on the OS install DVD) on a regular \nbasis. The makefile works fine for me. I suspect there's something else \ngoing on here.\n\n-Steve\n"},{"id":"54774","messageId":"3BF85D94-84E2-4D56-82FC-E8108E28468D@lrde.epita.fr","threadId":"10132","inReplyTo":"ECAD7CED-FFA0-46F2-8094-2FDE47CB5D54@silverinsanity.com","subject":"Re: Linking with -R (rpath) not supported on Darwin","fromName":"Benoit SIGOURE","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-10-03T22:58:33Z","receivedAt":"2007-10-03T22:58:33Z","isPatch":false,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Oct 4, 2007, at 12:39 AM, Brian Gernhardt wrote:\n\n> On Oct 3, 2007, at 5:34 PM, Benoit SIGOURE wrote:\n>\n>> Hello,\n>> I've just compiled HEAD (1.5.3.4.209.g9e417) and saw a:\n>>     LINK git-http-fetch\n>> i686-apple-darwin8-gcc-4.0.1: unrecognized option '-R/opt/local/lib'\n>>\n>> It didn't harm but the build process should be more careful to not  \n>> use options that are not supported by the compiler.  And it's not  \n>> a matter of using -Wl,-rpath instead.\n>\n> I compile git very regularly on my MacBook Pro and have never seen  \n> this error.  Do you have the most recent copy of Xcode?  I've seen  \n> odd errors on one of the not very old versions of the developer's  \n> tools.  For me, `gcc -v` reports \"gcc version 4.0.1 (Apple  \n> Computer, Inc. build 5367)\".\n>\n> ~~ Brian\n\n$ gcc -v\n[...]\ngcc version 4.0.1 (Apple Computer, Inc. build 5367)\n\nI've seen this message for the 1st time when compiling Git after my  \nnightly git pull today.  Anyways, this should be done because there  \nis no point in trying to use a feature that doesn't exist, even  \nthough GCC is being nice by simply issuing a warning instead of an  \nerror.\n\nSee:\nhttp://developer.apple.com/releasenotes/DeveloperTools/RN-dyld/ \nindex.html\n\nIn the section \"Known Issues\" it clearly states \"No rpath support\".\n\nCheers,\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"54777","messageId":"7vejgbdbyn.fsf@gitster.siamese.dyndns.org","threadId":"10132","inReplyTo":"1191450052-23619-1-git-send-email-tsuna@lrde.epita.fr","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-03T23:18:08Z","receivedAt":"2007-10-03T23:18:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Benoit Sigoure <tsuna@lrde.epita.fr> writes:\n\n> diff --git a/Makefile b/Makefile\n> index a1fe443..7c6c453 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -100,6 +100,9 @@ all::\n>  # that tells runtime paths to dynamic libraries;\n>  # \"-Wl,-rpath=/path/lib\" is used instead.\n>  #\n> +# Define NO_RPATH if your dynamic loader doesn't support runtime paths at\n> +# all.\n> +#\n>  # Define USE_NSEC below if you want git to care about sub-second file mtimes\n>  # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and\n>  # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely\n\nThanks for this part;\n\n> @@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)\n>  \t\t\tBASIC_LDFLAGS += -L/opt/local/lib\n>  \t\tendif\n>  \tendif\n> +        NO_RPATH = YesPlease\n>  endif\n\nI'll let Darwin users to fight the defaults for this part out.\n\n> @@ -521,7 +525,10 @@ ifndef NO_CURL\n>  \tifdef CURLDIR\n>  \t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n>  \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n> -\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl\n> +\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) -lcurl\n> +ifndef NO_RPATH\n> +\t\tCURL_LIBCURL += $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)\n> +endif\n>  \telse\n>  \t\tCURL_LIBCURL = -lcurl\n>  \tendif\n\n> @@ -539,7 +546,10 @@ endif\n>  \n>  ifdef ZLIB_PATH\n>  \tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n> -\tEXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n> +\tEXTLIBS += -L$(ZLIB_PATH)/$(lib)\n> +ifndef NO_RPATH\n> +\tEXTLIBS += $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n> +endif\n>  endif\n>  EXTLIBS += -lz\n>  \n\nWhile these parts are ugly but correct, I think...\n\n> @@ -547,7 +557,10 @@ ifndef NO_OPENSSL\n>  \tOPENSSL_LIBSSL = -lssl\n>  \tifdef OPENSSLDIR\n>  \t\tBASIC_CFLAGS += -I$(OPENSSLDIR)/include\n> -\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n> +\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib)\n> +ifndef NO_RPATH\n> +\t\tOPENSSL_LINK = $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n> +endif\n>  \telse\n>  \t\tOPENSSL_LINK =\n>  \tendif\n\nthis and the ICONV one are missing s/=/+=/.\n\nIf we do not care about supporting too old GNU make, we can do\nthis by first adding this near the top:\n\n        ifndef NO_RPATH\n        LINKER_PATH = -L$(1) $(CC_LD_DYNPATH)$(1)\n        else\n        LINKER_PATH = -L$(1)\n        endif\n\nand then doing something like:\n\n\tCURL_LIBCURL = $(call LINKER_PATH,$(CURLDIR)/$(lib))\n\tOPENSSL_LINK = $(call LINKER_PATH,$(OPENSSLDIR)/$(lib))\n\nto make it easier to read and less error prone.\n"},{"id":"54783","messageId":"FC9DDD6F-14A5-4B73-9192-042EA107ED77@silverinsanity.com","threadId":"10132","inReplyTo":"47041C7A.9090003@midwinter.com","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-10-04T01:08:11Z","receivedAt":"2007-10-04T01:08:11Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Oct 3, 2007, at 6:49 PM, Steven Grimm wrote:\n\n> Benoit Sigoure wrote:\n>> On Darwin for instance, there is no -R or -Wl,-rpath thing to  \n>> fiddle with,\n>> it's simply not supported by the dynamic loader.  This patch  \n>> introduces a\n>> NO_RPATH define which is enabled by default for Darwin.\n>>\n>\n> I compile git on a MacBook Pro (OS X 10.4, gcc 4.0.1 build 5367  \n> from the normal Xcode install that comes on the OS install DVD) on  \n> a regular basis. The makefile works fine for me. I suspect there's  \n> something else going on here.\n\nThe rpath code is only used if you define one of the following options:\n\nCURLDIR\nZLIB_PATH\nOPENSSLDIR\nICONVDIR\n\nThe default Darwin options don't define any of these, it just relies  \non finding those libraries in the library path (including /sw or /opt/ \nlocal if you have them installed).\n\n~~ Brian G.\n"},{"id":"54784","messageId":"3620711B-6F47-4F84-83A0-78F5BF9CBE88@silverinsanity.com","threadId":"10132","inReplyTo":"7vejgbdbyn.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-10-04T01:10:44Z","receivedAt":"2007-10-04T01:10:44Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"\nOn Oct 3, 2007, at 7:18 PM, Junio C Hamano wrote:\n\n> Benoit Sigoure <tsuna@lrde.epita.fr> writes:\n>\n>> @@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)\n>>  \t\t\tBASIC_LDFLAGS += -L/opt/local/lib\n>>  \t\tendif\n>>  \tendif\n>> +        NO_RPATH = YesPlease\n>>  endif\n>\n> I'll let Darwin users to fight the defaults for this part out.\n\nIt makes sense, since Apple's gcc/ld/dyld doesn't use rpath.\n\n~~ Brian\n"},{"id":"54843","messageId":"34DAC3CA-E226-4488-8B03-FC45A6A95F78@lrde.epita.fr","threadId":"10132","inReplyTo":"7vejgbdbyn.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Benoit SIGOURE","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-10-04T15:59:29Z","receivedAt":"2007-10-04T15:59:29Z","isPatch":true,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:\n\n> Benoit Sigoure <tsuna@lrde.epita.fr> writes:\n>\n>> diff --git a/Makefile b/Makefile\n>> index a1fe443..7c6c453 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -100,6 +100,9 @@ all::\n>>  # that tells runtime paths to dynamic libraries;\n>>  # \"-Wl,-rpath=/path/lib\" is used instead.\n>>  #\n>> +# Define NO_RPATH if your dynamic loader doesn't support runtime  \n>> paths at\n>> +# all.\n>> +#\n>>  # Define USE_NSEC below if you want git to care about sub-second  \n>> file mtimes\n>>  # and ctimes. Note that you need recent glibc (at least 2.2.4)  \n>> for this, and\n>>  # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it  \n>> will likely\n>\n> Thanks for this part;\n>\n>> @@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)\n>>  \t\t\tBASIC_LDFLAGS += -L/opt/local/lib\n>>  \t\tendif\n>>  \tendif\n>> +        NO_RPATH = YesPlease\n>>  endif\n>\n> I'll let Darwin users to fight the defaults for this part out.\n\nNo more replies on this thread, and the Apple documentation confirms  \nthat there is no rpath support in the dynamic loader of OSX 10.4 and  \nbefore.  I don't know about the soon-to-be-released 10.5 aka Leopard.\n\n>> @@ -521,7 +525,10 @@ ifndef NO_CURL\n>>  \tifdef CURLDIR\n>>  \t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n>>  \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n>> -\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$ \n>> (lib) -lcurl\n>> +\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) -lcurl\n>> +ifndef NO_RPATH\n>> +\t\tCURL_LIBCURL += $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)\n>> +endif\n>>  \telse\n>>  \t\tCURL_LIBCURL = -lcurl\n>>  \tendif\n>\n>> @@ -539,7 +546,10 @@ endif\n>>\n>>  ifdef ZLIB_PATH\n>>  \tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n>> -\tEXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$ \n>> (lib)\n>> +\tEXTLIBS += -L$(ZLIB_PATH)/$(lib)\n>> +ifndef NO_RPATH\n>> +\tEXTLIBS += $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n>> +endif\n>>  endif\n>>  EXTLIBS += -lz\n>>\n>\n> While these parts are ugly but correct, I think...\n>\n>> @@ -547,7 +557,10 @@ ifndef NO_OPENSSL\n>>  \tOPENSSL_LIBSSL = -lssl\n>>  \tifdef OPENSSLDIR\n>>  \t\tBASIC_CFLAGS += -I$(OPENSSLDIR)/include\n>> -\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$ \n>> (OPENSSLDIR)/$(lib)\n>> +\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib)\n>> +ifndef NO_RPATH\n>> +\t\tOPENSSL_LINK = $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n>> +endif\n>>  \telse\n>>  \t\tOPENSSL_LINK =\n>>  \tendif\n>\n> this and the ICONV one are missing s/=/+=/.\n\nYou're right, sorry.\n\n>\n> If we do not care about supporting too old GNU make, we can do\n> this by first adding this near the top:\n>\n>         ifndef NO_RPATH\n>         LINKER_PATH = -L$(1) $(CC_LD_DYNPATH)$(1)\n>         else\n>         LINKER_PATH = -L$(1)\n>         endif\n>\n> and then doing something like:\n>\n> \tCURL_LIBCURL = $(call LINKER_PATH,$(CURLDIR)/$(lib))\n> \tOPENSSL_LINK = $(call LINKER_PATH,$(OPENSSLDIR)/$(lib))\n>\n> to make it easier to read and less error prone.\n>\n\nYes.  I can rework the patch, but the question is: do you care about  \nold GNU make?  Can I rewrite the patch with this feature?\n\nThanks.\n\nCheers,\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"56781","messageId":"09169ECD-19E1-44D1-8539-71EBBA3826A8@lrde.epita.fr","threadId":"10132","inReplyTo":"34DAC3CA-E226-4488-8B03-FC45A6A95F78@lrde.epita.fr","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Benoit SIGOURE","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-10-21T21:56:22Z","receivedAt":"2007-10-21T21:56:22Z","isPatch":true,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Oct 4, 2007, at 5:59 PM, Benoit SIGOURE wrote:\n\n> On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:\n>\n>> Benoit Sigoure <tsuna@lrde.epita.fr> writes:\n>>\n>>> diff --git a/Makefile b/Makefile\n>>> index a1fe443..7c6c453 100644\n>>> --- a/Makefile\n>>> +++ b/Makefile\n>>> @@ -100,6 +100,9 @@ all::\n>>>  # that tells runtime paths to dynamic libraries;\n>>>  # \"-Wl,-rpath=/path/lib\" is used instead.\n>>>  #\n>>> +# Define NO_RPATH if your dynamic loader doesn't support runtime  \n>>> paths at\n>>> +# all.\n>>> +#\n>>>  # Define USE_NSEC below if you want git to care about sub-second  \n>>> file mtimes\n>>>  # and ctimes. Note that you need recent glibc (at least 2.2.4)  \n>>> for this, and\n>>>  # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using  \n>>> it will likely\n>>\n>> Thanks for this part;\n>>\n>>> @@ -507,6 +510,7 @@ ifeq ($(uname_S),Darwin)\n>>>  \t\t\tBASIC_LDFLAGS += -L/opt/local/lib\n>>>  \t\tendif\n>>>  \tendif\n>>> +        NO_RPATH = YesPlease\n>>>  endif\n>>\n>> I'll let Darwin users to fight the defaults for this part out.\n>\n> No more replies on this thread, and the Apple documentation  \n> confirms that there is no rpath support in the dynamic loader of  \n> OSX 10.4 and before.  I don't know about the soon-to-be-released  \n> 10.5 aka Leopard.\n>\n>>> @@ -521,7 +525,10 @@ ifndef NO_CURL\n>>>  \tifdef CURLDIR\n>>>  \t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n>>>  \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n>>> -\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$ \n>>> (lib) -lcurl\n>>> +\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) -lcurl\n>>> +ifndef NO_RPATH\n>>> +\t\tCURL_LIBCURL += $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)\n>>> +endif\n>>>  \telse\n>>>  \t\tCURL_LIBCURL = -lcurl\n>>>  \tendif\n>>\n>>> @@ -539,7 +546,10 @@ endif\n>>>\n>>>  ifdef ZLIB_PATH\n>>>  \tBASIC_CFLAGS += -I$(ZLIB_PATH)/include\n>>> -\tEXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$ \n>>> (lib)\n>>> +\tEXTLIBS += -L$(ZLIB_PATH)/$(lib)\n>>> +ifndef NO_RPATH\n>>> +\tEXTLIBS += $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib)\n>>> +endif\n>>>  endif\n>>>  EXTLIBS += -lz\n>>>\n>>\n>> While these parts are ugly but correct, I think...\n>>\n>>> @@ -547,7 +557,10 @@ ifndef NO_OPENSSL\n>>>  \tOPENSSL_LIBSSL = -lssl\n>>>  \tifdef OPENSSLDIR\n>>>  \t\tBASIC_CFLAGS += -I$(OPENSSLDIR)/include\n>>> -\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$ \n>>> (OPENSSLDIR)/$(lib)\n>>> +\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib)\n>>> +ifndef NO_RPATH\n>>> +\t\tOPENSSL_LINK = $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n>>> +endif\n>>>  \telse\n>>>  \t\tOPENSSL_LINK =\n>>>  \tendif\n>>\n>> this and the ICONV one are missing s/=/+=/.\n>\n> You're right, sorry.\n>\n>>\n>> If we do not care about supporting too old GNU make, we can do\n>> this by first adding this near the top:\n>>\n>>         ifndef NO_RPATH\n>>         LINKER_PATH = -L$(1) $(CC_LD_DYNPATH)$(1)\n>>         else\n>>         LINKER_PATH = -L$(1)\n>>         endif\n>>\n>> and then doing something like:\n>>\n>> \tCURL_LIBCURL = $(call LINKER_PATH,$(CURLDIR)/$(lib))\n>> \tOPENSSL_LINK = $(call LINKER_PATH,$(OPENSSLDIR)/$(lib))\n>>\n>> to make it easier to read and less error prone.\n>>\n>\n> Yes.  I can rework the patch, but the question is: do you care  \n> about old GNU make?  Can I rewrite the patch with this feature?\n\nI know Junio is still offline but maybe someone else has an objection  \nagainst this?\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"56827","messageId":"20071022064454.GV14735@spearce.org","threadId":"10132","inReplyTo":"09169ECD-19E1-44D1-8539-71EBBA3826A8@lrde.epita.fr","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-22T06:44:54Z","receivedAt":"2007-10-22T06:44:54Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Benoit SIGOURE <tsuna@lrde.epita.fr> wrote:\n> >On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:\n> >>Benoit Sigoure <tsuna@lrde.epita.fr> writes:\n> >>\n> >>If we do not care about supporting too old GNU make, we can do\n> >>this by first adding this near the top:\n> >>\n> >>        ifndef NO_RPATH\n> >>        LINKER_PATH = -L$(1) $(CC_LD_DYNPATH)$(1)\n> >>        else\n> >>        LINKER_PATH = -L$(1)\n> >>        endif\n> >>\n> >>and then doing something like:\n> >>\n> >>\tCURL_LIBCURL = $(call LINKER_PATH,$(CURLDIR)/$(lib))\n> >>\tOPENSSL_LINK = $(call LINKER_PATH,$(OPENSSLDIR)/$(lib))\n> >>\n> >>to make it easier to read and less error prone.\n> >\n> >Yes.  I can rework the patch, but the question is: do you care  \n> >about old GNU make?  Can I rewrite the patch with this feature?\n> \n> I know Junio is still offline but maybe someone else has an objection  \n> against this?\n\nHow old of a GNU make are talking about here?  The above is certainly\na lot nicer to read, but I'd hate to suddenly ship a new Git that\nsomeone cannot compile because their GNU make is too old.\n\nGNU make is fortunately pretty easy to compile, so it shouldn't be\nthat difficult for someone to build a newer version if they had to,\nbut why make them go through all that extra work just to install\na new Git?\n\nWhat about using a small helper shell script and using $(shell)\ninstead of $(call)?\n\nSo I guess in short I think I was in agreement with Junio a while\nago on this, which was that I don't want to require a newer GNU\nmake than we already require our users to have.\n\n-- \nShawn.\n"},{"id":"56829","messageId":"471C48A2.136B9B96@dessent.net","threadId":"10132","inReplyTo":"20071022064454.GV14735@spearce.org","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Brian Dessent","fromEmail":"brian@dessent.net","sentAt":"2007-10-22T06:52:18Z","receivedAt":"2007-10-22T06:52:18Z","isPatch":true,"sender":{"key":"brian@dessent.net","avatar":null},"body":"\"Shawn O. Pearce\" wrote:\n\n> How old of a GNU make are talking about here?  The above is certainly\n\nAccording to the NEWS file, $(call) was added to GNU make v3.78,\nreleased 1999-09-22.\n\nBrian\n"},{"id":"56854","messageId":"Pine.LNX.4.64.0710221149530.25221@racer.site","threadId":"10132","inReplyTo":"20071022064454.GV14735@spearce.org","subject":"Re: [PATCH] Be nice with compilers that do not support runtime paths at all.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-22T10:52:56Z","receivedAt":"2007-10-22T10:52:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 22 Oct 2007, Shawn O. Pearce wrote:\n\n> Benoit SIGOURE <tsuna@lrde.epita.fr> wrote:\n> > >On Oct 4, 2007, at 1:18 AM, Junio C Hamano wrote:\n> > >>Benoit Sigoure <tsuna@lrde.epita.fr> writes:\n> > >>\n> > >>If we do not care about supporting too old GNU make, we can do\n> > >>this by first adding this near the top:\n> > >>\n> > >>        ifndef NO_RPATH\n> > >>        LINKER_PATH = -L$(1) $(CC_LD_DYNPATH)$(1)\n> > >>        else\n> > >>        LINKER_PATH = -L$(1)\n> > >>        endif\n> > >>\n> > >>and then doing something like:\n> > >>\n> > >>\tCURL_LIBCURL = $(call LINKER_PATH,$(CURLDIR)/$(lib))\n> > >>\tOPENSSL_LINK = $(call LINKER_PATH,$(OPENSSLDIR)/$(lib))\n> > >>\n> > >>to make it easier to read and less error prone.\n> > >\n> > >Yes.  I can rework the patch, but the question is: do you care  \n> > >about old GNU make?  Can I rewrite the patch with this feature?\n> > \n> > I know Junio is still offline but maybe someone else has an objection \n> > against this?\n> \n> How old of a GNU make are talking about here?  The above is certainly a \n> lot nicer to read, but I'd hate to suddenly ship a new Git that someone \n> cannot compile because their GNU make is too old.\n\nI seem to remember remember that we had some shell quoting in the \nMakefile, and it was \"call\"ed.  That broke some setups, so we got rid of \nit.\n\n*starting \"git log -Scall Makefile\"*: yep.  It even was me fixing it, in \n39c015c556f285106931e0500f301de462b0e46e.\n\nCiao,\nDscho\n"}]}