Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Måns Rullgård
Martin Storsjö  writes:

> The name mingw32 as target OS is both misleading, and very little
> of the target OS specific settings actually match.
>
> Since the target OS default is set based on uname, the default
> (which on MSYS is set to mingw) is overridden by --toolchain=msvc.
> ---
>  configure |   12 
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/configure b/configure
> index 0992ff7..b30d69b 100755
> --- a/configure
> +++ b/configure
> @@ -2033,8 +2033,6 @@ if enabled cross_compile; then
>  die "Must specify target arch and OS when cross-compiling"
>  fi
>
> -set_default arch target_os
> -
>  ar_default="${cross_prefix}${ar_default}"
>  cc_default="${cross_prefix}${cc_default}"
>  nm_default="${cross_prefix}${nm_default}"
> @@ -2049,13 +2047,14 @@ case "$toolchain" in
>  ld_default="c99wrap link"
>  nm_default="dumpbin -symbols"
>  ar_default="lib"
> +target_os_default="win32"
>  ;;
>  ?*)
>  die "Unknown toolchain $toolchain"
>  ;;
>  esac
>
> -set_default cc pkg_config sysinclude
> +set_default arch cc pkg_config sysinclude target_os
>  enabled cross_compile || host_cc_default=$cc
>  set_default host_cc
>
> @@ -2066,7 +2065,7 @@ fi
>
>  exesuf() {
>  case $1 in
> -mingw32*|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
> +mingw32*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) 
> echo .exe ;;
>  esac
>  }
>
> @@ -2794,6 +2793,11 @@ case $target_os in
>  enable dos_paths
>  add_cppflags -U__STRICT_ANSI__
>  ;;
> +win32|win64)
> +objformat="win32"
> +ranlib=:
> +enable dos_paths
> +;;
>  cygwin*)
>  target_os=cygwin
>  shlibdir_default="$bindir_default"
> -- 

Looks OK

-- 
Måns Rullgård
m...@mansr.com
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Martin Storsjö

On Sat, 13 Oct 2012, Hendrik Leppkes wrote:


On Sat, Oct 13, 2012 at 9:43 PM, Martin Storsjö  wrote:

The name mingw32 as target OS is both misleading, and very little
of the target OS specific settings actually match.

Since the target OS default is set based on uname, the default
(which on MSYS is set to mingw) is overridden by --toolchain=msvc.
---
 configure |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 0992ff7..b30d69b 100755
--- a/configure
+++ b/configure
@@ -2033,8 +2033,6 @@ if enabled cross_compile; then
 die "Must specify target arch and OS when cross-compiling"
 fi

-set_default arch target_os
-
 ar_default="${cross_prefix}${ar_default}"
 cc_default="${cross_prefix}${cc_default}"
 nm_default="${cross_prefix}${nm_default}"
@@ -2049,13 +2047,14 @@ case "$toolchain" in
 ld_default="c99wrap link"
 nm_default="dumpbin -symbols"
 ar_default="lib"
+target_os_default="win32"


If we want "win64" to be a thing, maybe it should differentiate here
and set the appropriate one?


Currently it doesn't matter at all which one of them you set, so it's not 
really necessary here, but it might ease the mind of some caller who wants 
to set --target-os=win64.


// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Hendrik Leppkes
On Sat, Oct 13, 2012 at 9:43 PM, Martin Storsjö  wrote:
> The name mingw32 as target OS is both misleading, and very little
> of the target OS specific settings actually match.
>
> Since the target OS default is set based on uname, the default
> (which on MSYS is set to mingw) is overridden by --toolchain=msvc.
> ---
>  configure |   12 
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/configure b/configure
> index 0992ff7..b30d69b 100755
> --- a/configure
> +++ b/configure
> @@ -2033,8 +2033,6 @@ if enabled cross_compile; then
>  die "Must specify target arch and OS when cross-compiling"
>  fi
>
> -set_default arch target_os
> -
>  ar_default="${cross_prefix}${ar_default}"
>  cc_default="${cross_prefix}${cc_default}"
>  nm_default="${cross_prefix}${nm_default}"
> @@ -2049,13 +2047,14 @@ case "$toolchain" in
>  ld_default="c99wrap link"
>  nm_default="dumpbin -symbols"
>  ar_default="lib"
> +target_os_default="win32"

If we want "win64" to be a thing, maybe it should differentiate here
and set the appropriate one?

- Hendrik
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Diego Biurrun
On Sat, Oct 13, 2012 at 10:43:18PM +0300, Martin Storsjö wrote:
> The name mingw32 as target OS is both misleading, and very little
> of the target OS specific settings actually match.
> 
> Since the target OS default is set based on uname, the default
> (which on MSYS is set to mingw) is overridden by --toolchain=msvc.
> ---
>  configure |   12 
>  1 file changed, 8 insertions(+), 4 deletions(-)

LGTM, but wait for more opinions.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Måns Rullgård
Martin Storsjö  writes:

> On Sat, 13 Oct 2012, Hendrik Leppkes wrote:
>
>> On Sat, Oct 13, 2012 at 8:14 PM, Måns Rullgård  wrote:
>>> Hendrik Leppkes  writes:
>>>
 On Sat, Oct 13, 2012 at 7:46 PM, Derek Buitenhuis
  wrote:
> On 13/10/2012 1:29 PM, Måns Rullgård wrote:
>> I don't really like calling the OS msvc.  That is the compiler.  How
>> about "windows"?
>
> By that logic, shouldn't we also call mingw32 "windows"?
>

 Yeah, technically its the same OS, and the configuration how to create
 shared libraries doesn't belong in a OS section, but a toolchain
 section - but thats being done for like every OS, because in most
 cases there is an assumption that there is only one wide-spread
 compiler/linker for that target OS.
>>>
>>> The way (shared) libraries are built is usually dictated much more by
>>> the OS than by the specific compiler.  It is, after all, the OS that in
>>> the end will be loading them.  Windows is the odd one out here with at
>>> least three totally different schemes in common use.
>>>
>>> If you look at the other ones, the settings are very much per OS and
>>> hardly per compiler at all.  Symbian is a prime example, building with
>>> gcc yet needing a raft of special flags.
>>>
 In any case, i would suggest going with something as simple as
 "windows" or "win32" to stick with microsofts short-form :p
>>>
>>> I'm fine with win32 as well.  Is the 64-bit Windows also called win32?
>>>
>>
>> Win64 is used sometimes when you want to stress the difference, but
>> its the same OS in 64-bit, does it make sense to separate here? Maybe
>> stick to "windows" and keep the 32/64 out of it to avoid confusion?
>
> Some of the target_os cases have * to match different settings, I can
> set it to win*.

That sounds a bit greedy.  Matching win32|win64 should be safe.

-- 
Måns Rullgård
m...@mansr.com
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Martin Storsjö

On Sat, 13 Oct 2012, Hendrik Leppkes wrote:


On Sat, Oct 13, 2012 at 8:14 PM, Måns Rullgård  wrote:

Hendrik Leppkes  writes:


On Sat, Oct 13, 2012 at 7:46 PM, Derek Buitenhuis
 wrote:

On 13/10/2012 1:29 PM, Måns Rullgård wrote:

I don't really like calling the OS msvc.  That is the compiler.  How
about "windows"?


By that logic, shouldn't we also call mingw32 "windows"?



Yeah, technically its the same OS, and the configuration how to create
shared libraries doesn't belong in a OS section, but a toolchain
section - but thats being done for like every OS, because in most
cases there is an assumption that there is only one wide-spread
compiler/linker for that target OS.


The way (shared) libraries are built is usually dictated much more by
the OS than by the specific compiler.  It is, after all, the OS that in
the end will be loading them.  Windows is the odd one out here with at
least three totally different schemes in common use.

If you look at the other ones, the settings are very much per OS and
hardly per compiler at all.  Symbian is a prime example, building with
gcc yet needing a raft of special flags.


In any case, i would suggest going with something as simple as
"windows" or "win32" to stick with microsofts short-form :p


I'm fine with win32 as well.  Is the 64-bit Windows also called win32?



Win64 is used sometimes when you want to stress the difference, but
its the same OS in 64-bit, does it make sense to separate here? Maybe
stick to "windows" and keep the 32/64 out of it to avoid confusion?


Some of the target_os cases have * to match different settings, I can set 
it to win*.


// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Hendrik Leppkes
On Sat, Oct 13, 2012 at 8:14 PM, Måns Rullgård  wrote:
> Hendrik Leppkes  writes:
>
>> On Sat, Oct 13, 2012 at 7:46 PM, Derek Buitenhuis
>>  wrote:
>>> On 13/10/2012 1:29 PM, Måns Rullgård wrote:
 I don't really like calling the OS msvc.  That is the compiler.  How
 about "windows"?
>>>
>>> By that logic, shouldn't we also call mingw32 "windows"?
>>>
>>
>> Yeah, technically its the same OS, and the configuration how to create
>> shared libraries doesn't belong in a OS section, but a toolchain
>> section - but thats being done for like every OS, because in most
>> cases there is an assumption that there is only one wide-spread
>> compiler/linker for that target OS.
>
> The way (shared) libraries are built is usually dictated much more by
> the OS than by the specific compiler.  It is, after all, the OS that in
> the end will be loading them.  Windows is the odd one out here with at
> least three totally different schemes in common use.
>
> If you look at the other ones, the settings are very much per OS and
> hardly per compiler at all.  Symbian is a prime example, building with
> gcc yet needing a raft of special flags.
>
>> In any case, i would suggest going with something as simple as
>> "windows" or "win32" to stick with microsofts short-form :p
>
> I'm fine with win32 as well.  Is the 64-bit Windows also called win32?
>

Win64 is used sometimes when you want to stress the difference, but
its the same OS in 64-bit, does it make sense to separate here? Maybe
stick to "windows" and keep the 32/64 out of it to avoid confusion?
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Måns Rullgård
Hendrik Leppkes  writes:

> On Sat, Oct 13, 2012 at 7:46 PM, Derek Buitenhuis
>  wrote:
>> On 13/10/2012 1:29 PM, Måns Rullgård wrote:
>>> I don't really like calling the OS msvc.  That is the compiler.  How
>>> about "windows"?
>>
>> By that logic, shouldn't we also call mingw32 "windows"?
>>
>
> Yeah, technically its the same OS, and the configuration how to create
> shared libraries doesn't belong in a OS section, but a toolchain
> section - but thats being done for like every OS, because in most
> cases there is an assumption that there is only one wide-spread
> compiler/linker for that target OS.

The way (shared) libraries are built is usually dictated much more by
the OS than by the specific compiler.  It is, after all, the OS that in
the end will be loading them.  Windows is the odd one out here with at
least three totally different schemes in common use.

If you look at the other ones, the settings are very much per OS and
hardly per compiler at all.  Symbian is a prime example, building with
gcc yet needing a raft of special flags.

> In any case, i would suggest going with something as simple as
> "windows" or "win32" to stick with microsofts short-form :p

I'm fine with win32 as well.  Is the 64-bit Windows also called win32?

-- 
Måns Rullgård
m...@mansr.com
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Martin Storsjö

On Sat, 13 Oct 2012, Hendrik Leppkes wrote:


On Sat, Oct 13, 2012 at 7:46 PM, Derek Buitenhuis
 wrote:

On 13/10/2012 1:29 PM, Måns Rullgård wrote:

I don't really like calling the OS msvc.  That is the compiler.  How
about "windows"?


By that logic, shouldn't we also call mingw32 "windows"?



Yeah, technically its the same OS, and the configuration how to create
shared libraries doesn't belong in a OS section, but a toolchain
section - but thats being done for like every OS, because in most
cases there is an assumption that there is only one wide-spread
compiler/linker for that target OS.

In any case, i would suggest going with something as simple as
"windows" or "win32" to stick with microsofts short-form :p


I'm ok with that, will update it accordingly.

// Martin___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Hendrik Leppkes
On Sat, Oct 13, 2012 at 7:46 PM, Derek Buitenhuis
 wrote:
> On 13/10/2012 1:29 PM, Måns Rullgård wrote:
>> I don't really like calling the OS msvc.  That is the compiler.  How
>> about "windows"?
>
> By that logic, shouldn't we also call mingw32 "windows"?
>

Yeah, technically its the same OS, and the configuration how to create
shared libraries doesn't belong in a OS section, but a toolchain
section - but thats being done for like every OS, because in most
cases there is an assumption that there is only one wide-spread
compiler/linker for that target OS.

In any case, i would suggest going with something as simple as
"windows" or "win32" to stick with microsofts short-form :p

- Hendrik
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Derek Buitenhuis
On 13/10/2012 1:29 PM, Måns Rullgård wrote:
> I don't really like calling the OS msvc.  That is the compiler.  How
> about "windows"?

By that logic, shouldn't we also call mingw32 "windows"?

- Derek
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/2] configure: Split out msvc as a separate target OS

2012-10-13 Thread Måns Rullgård
Martin Storsjö  writes:

> The name mingw32 as target OS is both misleading, and very little
> of the target OS specific settings actually match.
>
> Since the target OS default is set based on uname, the default
> (which on MSYS is set to mingw) is overridden by --toolchain=msvc.
> ---
>  configure |   12 
>  1 file changed, 8 insertions(+), 4 deletions(-)

[...]

> +msvc)
> +objformat="win32"
> +ranlib=:
> +enable dos_paths
> +;;

I don't really like calling the OS msvc.  That is the compiler.  How
about "windows"?

-- 
Måns Rullgård
m...@mansr.com
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel