[vlc-devel] [PATCH] build: support YASM targets

Luca Barbato lu_zero at gentoo.org
Fri Oct 25 23:12:18 CEST 2013


On 25/10/13 12:45, Rafaël Carré wrote:
> Hello,
> 
> Le 25/10/2013 00:37, Luca Barbato a écrit :
>> The files must be .asm
>> ---
>>
>> Initial working version, sent as preview.
>> Something slightly better will come later possibly, feedbacks welcome nonetheless.
>>
>>  configure.ac      | 21 +++++++++++++++++++++
>>  m4/dolt.m4        | 50 ++++++++++++++++++++++++--------------------------
>>  modules/common.am |  5 +++++
>>  3 files changed, 50 insertions(+), 26 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index ecf1bdd..219079a 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -79,6 +79,7 @@ AM_PROG_AS
>>
>>  AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
>>  AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
>> +AC_CHECK_PROGS(YASM, yasm)
>>
>>  dnl Check for compiler properties
>>  AC_C_CONST
>> @@ -102,6 +103,17 @@ dnl
>>  dnl  Check the operating system
>>  dnl
>>  HAVE_WIN64="0"
>> +
>> +case "${host}" in
>> +    i?86*)
>> +    YASMFLAGS="-f elf32"
>> +        ;;
>> +    x86_64*)
>> +    YASMFLAGS="-f elf64"
>> +        ;;
>> +esac
>> +
>> +
>>  case "${host_os}" in
>>    "")
>>      SYS=unknown
>> @@ -137,6 +149,7 @@ case "${host_os}" in
>>      case "${host}" in
>>        i?86*)
>>          ARCH_flag="-arch i386"
>> +        YASMFLAGS="-f macho32"
>>        ;;
>>        ppc64*)
>>          ARCH_flag="-arch ppc64"
>> @@ -146,6 +159,7 @@ case "${host_os}" in
>>        ;;
>>        x86_64*)
>>          ARCH_flag="-arch x86_64"
>> +        YASMFLAGS="-f macho64"
>>        ;;
>>        arm*)
>>          ac_cv_c_bigendian="no"
>> @@ -243,10 +257,12 @@ case "${host_os}" in
>>                  HAVE_WIN64="1"
>>                  WINDOWS_ARCH="x64"
>>                  PROGRAMFILES="PROGRAMFILES64"
>> +                YASMFLAGS="-f win64"
>>              ;;
>>              *)
>>                  WINDOWS_ARCH="x86"
>>                  PROGRAMFILES="PROGRAMFILES"
>> +                YASMFLAGS="-f win32"
>>              ;;
>>          esac
>>          AC_SUBST(WINDOWS_ARCH)
>> @@ -265,13 +281,16 @@ case "${host_os}" in
>>      ;;
>>    symbian*)
>>      SYS=symbian
>> +    YASMFLAGS=""
>>      ;;
>>    *os2*)
>>      SYS=os2
>>      LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild"
>> +    YASMFLAGS=""
>>      ;;
>>    *)
>>      SYS="${host_os}"
>> +    YASMFLAGS=""
> 
> What about setting it to "" before OS detection so we don't need to set
> YASMFLAGS for each OS ? It would look better IMHO.

Should work fine, as said it was a work in progress.

> Is this an update from upstream dolt or only your own modifications?

Given I'm de-facto dolt upstream there is no difference, I'll push it soon.

> (I see some changes about PIC and I'm not sure if they are related)

Yes they are, dolt decides the pic flags for the compile script on
configure instead of calculating them every execution.

> Will we only be able to build .asm files on platform where dolt is
> supported?

The platform in which dolt is not supported do not have a yasm to work with.

> Thanks

I'll try to clean it up and push all the dolt changes soon (Monday)

Thanks for the review =)

lu





More information about the vlc-devel mailing list