Konstantin Pavlov <[email protected]> writes:

> This commit adds flags to support HP-UX aCC compiler.
> Tested on HP-UX B.11.31, aCC B3910B A.06.25 [Nov 30 2009].
>
> Also, add_cflags contains flags needed to build libav suite with gcc on
> HP-UX (tested on gcc version 4.2.3).
> ---
>  configure |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/configure b/configure
> index 92a809f..af48ae8 100755
> --- a/configure
> +++ b/configure
> @@ -2056,6 +2056,16 @@ elif $cc -v 2>&1 | grep -q Open64; then
>      AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
>      speed_cflags='-O2'
>      size_cflags='-Os'
> +elif $cc -V 2>&1 | grep -q 'HP C'; then
> +    cc_type=acc
> +    cc_ident=$($cc -V 2>&1 | cut -d\  -f 2-)
> +    cc_version="AV_STRINGIFY(__HP_cc)"
> +    CC_DEPFLAGS='+maked'
> +    AS_DEPFLAGS='+maked'
> +    SHFLAGS='-b'
> +    speed_cflags='+Ofast'

"fast" optimisation settings often enable unsafe things known to be
potentially incompatible with libav.  Have you checked if this is the
case here?

> +    size_cflags='+Osize'
> +    add_cflags -Ae +Olit=all +W4232 +W901 +u4
>  fi

Didn't you say it still crashed with +u4?  For those who missed the
previous discussion, +uN makes the compiler assume that nothing can have
an alignment of >N bytes, splitting wider accesses if necessary.  There
are a few places which rely on data of type char being 4-byte aligned
and do crash if the compiler doesn't support alignment directives (aCC
does not properly).  Using +u1 makes it work but with unspeakable
performance penalty.

>  test -n "$cc_type" && enable $cc_type ||
> @@ -2446,6 +2456,10 @@ case $target_os in
>      linux)
>          enable dv1394
>          ;;
> +    hp-ux)
> +        add_cflags -O -D_HPUX_SOURCE -D__STDC_EXT__

What is -O doing there?

> +        append SHFLAGS '-Wl,+h\$\$(@F)'
> +        ;;
>      irix*)
>          target_os=irix
>          ranlib="echo ignoring ranlib"
> -- 
> 1.7.4.4
>

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to