Re: [PATCH] configure: Detect linking style for HP aCC on HP-UX
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 7, 2019, 17:03 UTC
- Message-ID
- <xmqqr285pbta.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <c12ec5ff-87c9-a6d0-e9f6-6d7e1cf343c5@siemens.com>
"Osipov, Michael" <michael.osipov@siemens.com> writes:
Show 50 quoted lines
> Am 2019-05-16 um 11:34 schrieb Ævar Arnfjörð Bjarmason:
>> From: Michael Osipov <michael.osipov@siemens.com>
>>
>> HP aCC does not accept any of the previously tested CC_LD_DYNPATH
>> formats, but only its own[1] "-Wl,+b" format. Add it to configure.ac.
>>
>> 1. http://nixdoc.net/man-pages/hp-ux/man1/ld_pa.1.html
>>
>> Signed-off-by: Michael Osipov <michael.osipov@siemens.com>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> ---
>>
>> I took the liberty of slightly amending the commit message.
>>
>> configure.ac | 14 ++++++++++++--
>> 1 file changed, 12 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index be3b55f1cc..a43b476402 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -475,8 +475,18 @@ else
>> if test "$git_cv_ld_rpath" = "yes"; then
>> CC_LD_DYNPATH=-rpath
>> else
>> - CC_LD_DYNPATH=
>> - AC_MSG_WARN([linker does not support runtime path to dynamic libraries])
>> + AC_CACHE_CHECK([if linker supports -Wl,+b,], git_cv_ld_wl_b, [
>> + SAVE_LDFLAGS="${LDFLAGS}"
>> + LDFLAGS="${SAVE_LDFLAGS} -Wl,+b,/"
>> + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [git_cv_ld_wl_b=yes], [git_cv_ld_wl_b=no])
>> + LDFLAGS="${SAVE_LDFLAGS}"
>> + ])
>> + if test "$git_cv_ld_wl_b" = "yes"; then
>> + CC_LD_DYNPATH=-Wl,+b,
>> + else
>> + CC_LD_DYNPATH=
>> + AC_MSG_WARN([linker does not support runtime path to dynamic libraries])
>> + fi
>> fi
>> fi
>> fi
>>
>
> I can see that this one has not yet been committed nor my PR has been
> pulled.
>
> Any chances to get this into master?
>
> MichaelSorry, it jsut fell of the cracks. The way the new test was added looks very good --- any platform that is happy with the existing test will continue to function the same way, and a platform that knows -Wl,+b would use it instead of failing.
Will pick it up.
Thanks.