Web lists-archives.com

Re: [PATCH] Improving HP-UX support




On Wed, May 08 2019, Osipov, Michael wrote:

> Hi folks,

Hi see Documentation/SubmittingPatches for how to submit patches inline
instead of as attachments.

For the sha1dc change it seems trivially correct, but we import that
upstream project as-is, could you please submit a pull request at
https://github.com/cr-marcstevens/sha1collisiondetection then we can
update our version?

> diff -ur configure.ac configure.ac
> --- configure.ac	2019-02-24 16:55:19 +0000
> +++ configure.ac	2019-05-08 11:31:42 +0000
> @@ -475,8 +475,18 @@
>        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

Do we want to also have something in config.mak.uname to always do this
on HP/UX?

>  /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> */
> -#elif (defined(_AIX))
> +#elif (defined(_AIX) || defined(__hpux))

Seems sane, and per my googling even though HP/UX now runs on
little-endian hardware it's always big-endian. But in this manual they
advice doing it at runtime with a TEST_ENDIAN() macro in sys/portal.h:
http://h20628.www2.hp.com/km-ext/kmcsdirect/emr_na-c01921401-1.pdf

Is that something we need to worry about / support? E.g. in the
configure script?