Sean McGovern <[email protected]> writes:

> This is my attempt to finally clean up the mess of compiler options
> for suncc. I think almost all of them where wrong -- the -s in -shared
> was stripping the resulting binary, and -mimpure-text was being fed
> verbatim to the linker, causing at least the following:
>
> $ objdump -x libavcodec/libavcodec.so | grep AUDIT
>   DEPAUDIT             ure-text
>   AUDIT                ure-text
>
> ...which is not what we intended at all.
>
> I'm working on enabling symbol versioning for the Solaris shared libs,
> but this needs to be fixed first.
>
> Sean McG.
> ---8<---
>
> Several of the options were incorrect for suncc.
> ---
>  configure | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index f409888..f86bd95 100755
> --- a/configure
> +++ b/configure
> @@ -2748,8 +2748,16 @@ case $target_os in
>          ;;
>      sunos)
>          AVSERVERLDFLAGS=""
> -        SHFLAGS='-shared -Wl,-h,$$(@F)'
> -        enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
> +        SHFLAGS='-Wl,-h,$$(@F)'
> +        case $ld_type in
> +          gcc)
> +              append SHFLAGS -shared
> +              enabled x86 && append SHFLAGS -mimpure-text
> +              ;;
> +          suncc)
> +              append SHFLAGS -G
> +              ;;
> +        esac

These mappings should be added to the suncc_flags() function.  Then you
can simply do this:

    append SHFLAGS $($ldflags_filter -shared ...)

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

Reply via email to