Re: [Mingw-w64-public] aclocal.m4 and Makefile.am out of sync

2016-10-03 Thread Adrien Nader
On Mon, Oct 03, 2016, David Wohlferd wrote:
> On 10/2/2016 6:38 PM, JonY wrote:
> >On 10/3/2016 06:37, David Wohlferd wrote:
> >>So, my testing didn't turn up any problems.  The patch is pretty
> >>big (1,389,398), so I have compressed it and uploaded it to
> >>http://www.LimeGreenSocks.com/gen2.7z (where it is only 82,083).
> >>
> >>Just a reminder: Despite the size, this is 100% regenerated code,
> >>mostly in the build-aux directories.
> >>
> >>Comments (especially about whether we need the beta config.guess)
> >>welcome.  What needs to happen to get this approved to Push?
> >>
> 
> I'm sorry, I'm a bit thick.  Can you clarify?
> 
> >Since it is all regenerated code, I'm OK with it.
> 
> Is this the same as "approved to push?"
> 
> >config.guess is
> >nice, but not essential, no one has complained about unsupported
> >platforms, yet.
> 
> Does this mean you want to use the most-recently-released version?
> Or the beta version (which is even more recent)?  The patch I posted
> uses the released version.  But it could be that "no one has
> complained" because the beta is what is currently checked in.
> 
> While an argument can be made for either, my recommendation is to go
> with the 'released,' and only use the beta if there is a specific
> requirement.  But since "going backward" like this might break
> something (maybe someone did complain at some point?), I felt the
> need to ask.
> 
> My tests were with the 'released' version, but I'm prepared to
> re-test if the beta is preferred.  As the "approver," I assume you
> decide?
> 
> I believe that if I update config.guess, I'm supposed to update
> config.sub too (not knowing the answer to this is another reason to
> stick with the 'released' version).  I have attached a patch for
> config.guess + config.sub to show what has changed.  Note that this
> is going backwards (turning the 'beta' into the 'most recently
> released').

I quickly went through the diff and I've found the following:

>  +amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
>  +   echo x86_64-unknown-msys
>  +   exit ;;

There are also changes that could be related to ARM support ("earm").

Oh and iOS and ASM.js but I think they don't matter much to us (although
maybe we'll soon have that portable POSIX environment in javascript and
we'll build boost with it).

Most of the diff is either quoting or removed and added platforms but
there are also a couple other changes. 

I think it's safer to keep the version that is currently checked in. I
prefer versions from released tarballs but sometimes we'll also need to
handle new platforms. For these cases, I'm perfectly fine with
unreleased versions (autotools perfectly enables such usecases) but I'd
like to see a request somewhere or a slightly more complete commit
message (i.e. "adds support for X and Y") so it's easier to track in the
future.

-- 
Adrien Nader

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] aclocal.m4 and Makefile.am out of sync

2016-10-03 Thread David Wohlferd

On 10/2/2016 6:38 PM, JonY wrote:

On 10/3/2016 06:37, David Wohlferd wrote:

So, my testing didn't turn up any problems.  The patch is pretty
big (1,389,398), so I have compressed it and uploaded it to
http://www.LimeGreenSocks.com/gen2.7z (where it is only 82,083).

Just a reminder: Despite the size, this is 100% regenerated code,
mostly in the build-aux directories.

Comments (especially about whether we need the beta config.guess)
welcome.  What needs to happen to get this approved to Push?



I'm sorry, I'm a bit thick.  Can you clarify?


Since it is all regenerated code, I'm OK with it.


Is this the same as "approved to push?"


config.guess is
nice, but not essential, no one has complained about unsupported
platforms, yet.


Does this mean you want to use the most-recently-released version? Or 
the beta version (which is even more recent)?  The patch I posted uses 
the released version.  But it could be that "no one has complained" 
because the beta is what is currently checked in.


While an argument can be made for either, my recommendation is to go 
with the 'released,' and only use the beta if there is a specific 
requirement.  But since "going backward" like this might break something 
(maybe someone did complain at some point?), I felt the need to ask.


My tests were with the 'released' version, but I'm prepared to re-test 
if the beta is preferred.  As the "approver," I assume you decide?


I believe that if I update config.guess, I'm supposed to update 
config.sub too (not knowing the answer to this is another reason to 
stick with the 'released' version).  I have attached a patch for 
config.guess + config.sub to show what has changed.  Note that this is 
going backwards (turning the 'beta' into the 'most recently released').


dw
diff --git a/mingw-w64-tools/widl/build-aux/config.guess b/mingw-w64-tools/widl/build-aux/config.guess
index 0967f2a..b450eb4 100755
--- a/mingw-w64-tools/widl/build-aux/config.guess
+++ b/mingw-w64-tools/widl/build-aux/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2016-04-02'
+timestamp='2014-11-04'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ timestamp='2016-04-02'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
 # Please send patches to .
 
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -168,27 +168,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	/sbin/$sysctl 2>/dev/null || \
-	/usr/sbin/$sysctl 2>/dev/null || \
-	echo unknown)`
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	armeb) machine=armeb-unknown ;;
 	arm*) machine=arm-unknown ;;
 	sh3el) machine=shl-unknown ;;
 	sh3eb) machine=sh-unknown ;;
 	sh5el) machine=sh5le-unknown ;;
-	earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
-		;;
 	*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -204,13 +197,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		os=netbsd
 		;;
 	esac
-	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
-	earm*)
-		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
-		;;
-	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -221,13 +207,13 @@ case 

Re: [Mingw-w64-public] [PATCH] Make ARM softmath functions experimental, disabled by default

2016-10-03 Thread Kai Tietz
Hello,

patch is indeed a nice improvement.  If Andre has no objections, I am
fine with this patch.

Thanks,
Kai

2016-10-03 14:51 GMT+02:00 Martin Storsjö :
> By default, just forward calls to msvcrt.dll for the functions
> implemented with softmath routines.
>
> The msvcrt math functions might not be fully C99 compliant, but
> the current softfloat implementations are lacking in many other ways
> (e.g. crashing due to infinite recursion for some input values, only
> working for certain ranges of input values, etc.).
>
> For functions that are missing in msvcrt.dll (log2*, exp2*, scalbn*),
> provide small wrappers that fall back on log and pow.
>
> This makes the libav testsuite succeed (when run in wine), when
> built with clang for ARM with mingw-w64 - previously a number of
> tests failed due to faulty math functions.
> ---
>  mingw-w64-crt/Makefile.am   |  6 
>  mingw-w64-crt/configure.ac  | 13 ++---
>  mingw-w64-crt/math/arm/exp2.c   | 64 
> +
>  mingw-w64-crt/math/arm/log2.c   | 64 
> +
>  mingw-w64-crt/math/arm/scalbn.c | 64 
> +
>  5 files changed, 207 insertions(+), 4 deletions(-)
>  create mode 100644 mingw-w64-crt/math/arm/exp2.c
>  create mode 100644 mingw-w64-crt/math/arm/log2.c
>  create mode 100644 mingw-w64-crt/math/arm/scalbn.c
>
> diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
> index 52dac0c..e727e64 100644
> --- a/mingw-w64-crt/Makefile.am
> +++ b/mingw-w64-crt/Makefile.am
> @@ -330,6 +330,7 @@ src_libmingwex32=\
>math/sinf.c   math/sinl.c   math/sinl_internal.S   
>math/tanf.c   math/tanl.S
>
>  # these only go into the ARM32 version:
> +if ENABLE_SOFTMATH
>  src_libmingwexarm32=\
>math/softmath/e_fmod.cmath/softmath/e_fmodf.c   math/softmath/e_powf.c 
>math/softmath/e_pow.c \
>math/softmath/acosf.c math/softmath/acosh.c math/softmath/acosl.c  
>math/softmath/acoshf.cmath/softmath/acoshl.c\
> @@ -347,6 +348,11 @@ src_libmingwexarm32=\
>math/softmath/remquo.cmath/softmath/remquof.c   
> math/softmath/remquol.c   math/softmath/scalbn.cmath/softmath/scalbnf.c   
> \
>math/softmath/scalbnl.c   math/softmath/sin.c   math/softmath/sincos.c 
>math/softmath/sincosf.c   math/softmath/sincosl.c   \
>math/softmath/sinf.c  math/softmath/sinl.c  math/softmath/tanf.c   
>math/softmath/tanl.c
> +else
> +src_libmingwexarm32=\
> +  math/arm/exp2.c   math/arm/log2.c   math/arm/scalbn.c
> +endif
> +
>
>
>  # These intrinsics are target independent:
> diff --git a/mingw-w64-crt/configure.ac b/mingw-w64-crt/configure.ac
> index 884a7ae..06b5e8b 100644
> --- a/mingw-w64-crt/configure.ac
> +++ b/mingw-w64-crt/configure.ac
> @@ -216,13 +216,14 @@ AC_MSG_RESULT([$enable_delay_import_libs])
>  AC_MSG_CHECKING([whether to enable experimental features])
>  AC_ARG_ENABLE([experimental],
>[AS_HELP_STRING([--enable-experimental],
> -[Enable experimental features, valid options are comma separated 
> combination of all, dfp, printf128, registeredprintf. Refer to 
> experimental.txt for descriptions.])],
> +[Enable experimental features, valid options are comma separated 
> combination of all, dfp, printf128, registeredprintf, softmath. Refer to 
> experimental.txt for descriptions.])],
>  [experimental_features=$enable_experimental],
>  [experimental_features="no"])
>
>  enable_dfp=no
>  enable_printf128=no
>  enable_registeredprintf=no
> +enable_softmath=no
>  experiment_list=$($AWK 'BEGIN{OFS=" "; len = split(ARGV@<:@1@:>@,str,","); 
> for(; len != 0; len--) print str@<:@len@:>@ }' "$experimental_features")
>
>  for arg in $experiment_list
> @@ -231,9 +232,10 @@ AS_CASE([$arg],
>[dfp],[enable_dfp=yes],
>[printf128],[enable_printf128=yes],
>[registeredprintf],[enable_registeredprintf=yes],
> -  [all], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; 
> ],
> -  [yes], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; 
> ],
> -  [no],  [enable_dfp=no; enable_printf128=no; enable_registeredprintf=no; ],
> +  [softmath],[enable_softmath=yes],
> +  [all], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; 
> enable_softmath=yes; ],
> +  [yes], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; 
> enable_softmath=yes; ],
> +  [no],  [enable_dfp=no; enable_printf128=no; enable_registeredprintf=no; 
> enable_softmath=no; ],
>[AC_MSG_ERROR([Unknown option \"$experiment\"])]
>  )
>  done
> @@ -242,9 +244,11 @@ AC_MSG_RESULT([$experimental_features])
>  AM_CONDITIONAL([ENABLE_DFP],[ test "$enable_dfp" = "yes" ])
>  AM_CONDITIONAL([ENABLE_PRINTF128],[ test "$enable_printf128" = "yes" ])
>  AM_CONDITIONAL([ENABLE_REGISTEREDPRINTF],[ test "$enable_registeredprintf" = 
> "yes" ])
> +AM_CONDITIONAL([ENABLE_SOFTMATH],[ 

[Mingw-w64-public] [PATCH] Make ARM softmath functions experimental, disabled by default

2016-10-03 Thread Martin Storsjö
By default, just forward calls to msvcrt.dll for the functions
implemented with softmath routines.

The msvcrt math functions might not be fully C99 compliant, but
the current softfloat implementations are lacking in many other ways
(e.g. crashing due to infinite recursion for some input values, only
working for certain ranges of input values, etc.).

For functions that are missing in msvcrt.dll (log2*, exp2*, scalbn*),
provide small wrappers that fall back on log and pow.

This makes the libav testsuite succeed (when run in wine), when
built with clang for ARM with mingw-w64 - previously a number of
tests failed due to faulty math functions.
---
 mingw-w64-crt/Makefile.am   |  6 
 mingw-w64-crt/configure.ac  | 13 ++---
 mingw-w64-crt/math/arm/exp2.c   | 64 +
 mingw-w64-crt/math/arm/log2.c   | 64 +
 mingw-w64-crt/math/arm/scalbn.c | 64 +
 5 files changed, 207 insertions(+), 4 deletions(-)
 create mode 100644 mingw-w64-crt/math/arm/exp2.c
 create mode 100644 mingw-w64-crt/math/arm/log2.c
 create mode 100644 mingw-w64-crt/math/arm/scalbn.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 52dac0c..e727e64 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -330,6 +330,7 @@ src_libmingwex32=\
   math/sinf.c   math/sinl.c   math/sinl_internal.S 
 math/tanf.c   math/tanl.S
 
 # these only go into the ARM32 version:
+if ENABLE_SOFTMATH
 src_libmingwexarm32=\
   math/softmath/e_fmod.cmath/softmath/e_fmodf.c   math/softmath/e_powf.c   
 math/softmath/e_pow.c \
   math/softmath/acosf.c math/softmath/acosh.c math/softmath/acosl.c
 math/softmath/acoshf.cmath/softmath/acoshl.c\
@@ -347,6 +348,11 @@ src_libmingwexarm32=\
   math/softmath/remquo.cmath/softmath/remquof.c   math/softmath/remquol.c  
 math/softmath/scalbn.cmath/softmath/scalbnf.c   \
   math/softmath/scalbnl.c   math/softmath/sin.c   math/softmath/sincos.c   
 math/softmath/sincosf.c   math/softmath/sincosl.c   \
   math/softmath/sinf.c  math/softmath/sinl.c  math/softmath/tanf.c 
 math/softmath/tanl.c
+else
+src_libmingwexarm32=\
+  math/arm/exp2.c   math/arm/log2.c   math/arm/scalbn.c
+endif
+
 
 
 # These intrinsics are target independent:
diff --git a/mingw-w64-crt/configure.ac b/mingw-w64-crt/configure.ac
index 884a7ae..06b5e8b 100644
--- a/mingw-w64-crt/configure.ac
+++ b/mingw-w64-crt/configure.ac
@@ -216,13 +216,14 @@ AC_MSG_RESULT([$enable_delay_import_libs])
 AC_MSG_CHECKING([whether to enable experimental features])
 AC_ARG_ENABLE([experimental],
   [AS_HELP_STRING([--enable-experimental],
-[Enable experimental features, valid options are comma separated 
combination of all, dfp, printf128, registeredprintf. Refer to experimental.txt 
for descriptions.])],
+[Enable experimental features, valid options are comma separated 
combination of all, dfp, printf128, registeredprintf, softmath. Refer to 
experimental.txt for descriptions.])],
 [experimental_features=$enable_experimental],
 [experimental_features="no"])
 
 enable_dfp=no
 enable_printf128=no
 enable_registeredprintf=no
+enable_softmath=no
 experiment_list=$($AWK 'BEGIN{OFS=" "; len = split(ARGV@<:@1@:>@,str,","); 
for(; len != 0; len--) print str@<:@len@:>@ }' "$experimental_features")
 
 for arg in $experiment_list
@@ -231,9 +232,10 @@ AS_CASE([$arg],
   [dfp],[enable_dfp=yes],
   [printf128],[enable_printf128=yes],
   [registeredprintf],[enable_registeredprintf=yes],
-  [all], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; ],
-  [yes], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; ],
-  [no],  [enable_dfp=no; enable_printf128=no; enable_registeredprintf=no; ],
+  [softmath],[enable_softmath=yes],
+  [all], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; 
enable_softmath=yes; ],
+  [yes], [enable_dfp=yes; enable_printf128=yes; enable_registeredprintf=yes; 
enable_softmath=yes; ],
+  [no],  [enable_dfp=no; enable_printf128=no; enable_registeredprintf=no; 
enable_softmath=no; ],
   [AC_MSG_ERROR([Unknown option \"$experiment\"])]
 )
 done
@@ -242,9 +244,11 @@ AC_MSG_RESULT([$experimental_features])
 AM_CONDITIONAL([ENABLE_DFP],[ test "$enable_dfp" = "yes" ])
 AM_CONDITIONAL([ENABLE_PRINTF128],[ test "$enable_printf128" = "yes" ])
 AM_CONDITIONAL([ENABLE_REGISTEREDPRINTF],[ test "$enable_registeredprintf" = 
"yes" ])
+AM_CONDITIONAL([ENABLE_SOFTMATH],[ test "$enable_softmath" = "yes" ])
 AM_COND_IF([ENABLE_DFP],[AC_DEFINE([__ENABLE_DFP],[1],[Build DFP support])])
 AM_COND_IF([ENABLE_PRINTF128],[AC_DEFINE([__ENABLE_PRINTF128],[1],[Build DFP 
support])])
 
AM_COND_IF([ENABLE_REGISTEREDPRINTF],[AC_DEFINE([__ENABLE_REGISTEREDPRINTF],[1],[Build
 DFP support])])
+AM_COND_IF([ENABLE_SOFTMATH],[AC_DEFINE([__ENABLE_SOFTMATH],[1],[Build