[MPlayer-dev-eng] [PATCH] configure: remove -Zomf from flags when checking extern symbol prefix on OS/2

KO Myung-Hun komh78 at gmail.com
Fri Oct 4 17:29:00 EEST 2024



KO Myung-Hun wrote:
> OS/2 nm does work only with aout format. If -Zomf is given, gcc generates
> OMF object file not aout object file. As a result, nm fails to detect
> extern symbol prefix.
> 
> This allows users to pass -Zomf to configure via --extra-cflags and/or
> --extra-ldfalgs.
> ---
>  configure | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/configure b/configure
> index 7a403e0a6..f4c42ad53 100755
> --- a/configure
> +++ b/configure
> @@ -1699,6 +1699,15 @@ msvc_filter_flags() {
>    done
>  }
>  
> +os2_aout_filter_flags() {
> +  for f; do
> +    case $f in
> +      -Zomf) ;;
> +      *) echo -n $f" " ;;
> +    esac
> +  done
> +}
> +
>  AR_O='$@'
>  CC_O='-o $@'
>  CC_LINK_O='-o $@'
> @@ -2919,7 +2928,11 @@ echocheck "extern symbol prefix"
>  cat > $TMPC << EOF
>  int ff_extern;
>  EOF
> +# OS/2 nm does work only with aout format. Remove -Zomf from flags.
> +os2 &&
> +  { saved_filter_flags=$filter_flags; filter_flags=os2_aout_filter_flags; }
>  cc_check -c || die "Symbol mangling check failed."
> +os2 && filter_flags=$saved_filter_flags
>  sym=$($_nm -P -g $TMPEXE | grep ff_extern)
>  extern_prefix=${sym%%ff_extern*}
>  def_extern_asm="#define EXTERN_ASM $extern_prefix"

I'll commit in two days if no objections.

-- 
KO Myung-Hun

Korean OS/2 User Community : https://www.os2.kr/


More information about the MPlayer-dev-eng mailing list