From subversion at mplayerhq.hu Sun Oct 11 09:36:38 2020 From: subversion at mplayerhq.hu (komh) Date: Sun, 11 Oct 2020 09:36:38 +0300 (EEST) Subject: [MPlayer-cvslog] r38198 - trunk/loader/win32.c Message-ID: <20201011063638.6981668BABC@ffbox0-bg.mplayerhq.hu> Author: komh Date: Sun Oct 11 09:36:37 2020 New Revision: 38198 Log: loader: fix compilation ----- loader/win32.c: In function 'mreq_private': loader/win32.c:354:28: error: implicit declaration of function 'av_malloc'; did you mean 'valloc'? [-Werror=implicit-function-declaration] 354 | alloc_header* header = av_malloc(nsize); | ^~~~~~~~~ | valloc loader/win32.c:354:28: warning: initialization of 'alloc_header *' {aka 'struct alloc_header_t *'} from 'int' makes pointer from integer without a cast [-Wint-conversion] loader/win32.c: In function 'my_release': loader/win32.c:439:5: error: implicit declaration of function 'av_free' [-Werror=implicit-function-declaration] 439 | av_free(header); | ^~~~~~~ ----- Modified: trunk/loader/win32.c Modified: trunk/loader/win32.c ============================================================================== --- trunk/loader/win32.c Sun Aug 30 20:44:21 2020 (r38197) +++ trunk/loader/win32.c Sun Oct 11 09:36:37 2020 (r38198) @@ -82,6 +82,7 @@ for DLL to know too much about its envir #include "osdep/mmap.h" #endif #include "osdep/mmap_anon.h" +#include "libavutil/mem.h" #include "libavutil/avstring.h" #include "cpudetect.h" From komh78 at gmail.com Sun Oct 11 10:26:42 2020 From: komh78 at gmail.com (KO Myung-Hun) Date: Sun, 11 Oct 2020 16:26:42 +0900 Subject: [MPlayer-cvslog] r38197 - trunk/configure In-Reply-To: <20200830174422.2335568806E@ffbox0-bg.mplayerhq.hu> References: <20200830174422.2335568806E@ffbox0-bg.mplayerhq.hu> Message-ID: <5F82B3B2.8040007@chollian.net> Hi/2. reimar wrote: > Author: reimar > Date: Sun Aug 30 20:44:21 2020 > New Revision: 38197 > > Log: > configure: check that stdatomic.h actually works correctly. > > In particular, that it does not create e.g. dependencies on > libatomic. In that case the compat fallback will actually work better. > > Modified: > trunk/configure > > Modified: trunk/configure > ============================================================================== > --- trunk/configure Sun Aug 30 18:54:24 2020 (r38196) > +++ trunk/configure Sun Aug 30 20:44:21 2020 (r38197) > @@ -3960,7 +3960,9 @@ echores "$_fast_inttypes" > > echocheck "stdatomic.h" > stdatomic_h=no > -header_check stdatomic.h && stdatomic_h=yes > +# need to use statement_check because some implementations (Rasbian) create a dependency > +# on libatomic, in which case we rather want to use the fallback > +statement_check stdatomic.h "atomic_int_least64_t a; atomic_fetch_add_explicit(&a, 5, memory_order_relaxed)" && stdatomic_h=yes > echores "$stdatomic_h" > if test "$stdatomic_h" = no ; then > CFLAGS="-Icompat/atomics/gcc $CFLAGS" This breaks OS/2 builds with --enable-runtime-cpudetection using gcc v9.1. First, the above test fails because -march=i486 is used if --enable-runtime-cpudetection is used without --target like: Undefined symbol ___atomic_fetch_add_8 referenced from text segment __atomic_fetch_and_add_n builtins are supported on -march=i586 or later. Second, compat/atomic/gcc/stdatomic.h uses __sync builtins. However, some __sync builtins are supported on i586 or later, too. As a result, linkage fails like: undefined symbol ___sync_fetch_and_add_8 undefined symbol ___sync_fetch_and_sub_8 -- KO Myung-Hun Using Mozilla SeaMonkey 2.7.2 Under OS/2 Warp 4 for Korean with FixPak #15 In VirtualBox v6.1.10 on Intel Core i7-3615QM 2.30GHz with 8GB RAM Korean OS/2 User Community : http://www.os2.kr/ From eclipse7 at gmx.net Sat Oct 31 22:34:07 2020 From: eclipse7 at gmx.net (Alexander Strasser) Date: Sat, 31 Oct 2020 21:34:07 +0100 Subject: [MPlayer-cvslog] r38194 - trunk/configure In-Reply-To: <20200830152741.B449468AA85@ffbox0-bg.mplayerhq.hu> References: <20200830152741.B449468AA85@ffbox0-bg.mplayerhq.hu> Message-ID: <20201031203407.GC1111@xklotz.local> On 2020-08-30 18:27 +0300, reimar wrote: > Author: reimar > Date: Sun Aug 30 18:27:41 2020 > New Revision: 38194 > > Log: > configure: Fix arm CPU extension selection > > If runtime cpudetection is off, we need to set all of > march, mcpu and mfpu. > Otherwise compiling on e.g. Rasbian will result in > a build with no NEON support even when the CPU > supports it. > > Modified: > trunk/configure > > Modified: trunk/configure > ============================================================================== > --- trunk/configure Sat Aug 22 00:13:38 2020 (r38193) > +++ trunk/configure Sun Aug 30 18:27:41 2020 (r38194) > @@ -2478,6 +2478,9 @@ case "$host_arch" in > aarch64) > arch='aarch64' > iproc='aarch64' > + if test "$_runtime_cpudetection" = no ; then > + cflag_check -march=native -mcpu=native -mfpu=auto && _march="-march=native -mcpu=native -mfpu=auto" > + fi > ;; > > arm*) > @@ -2487,6 +2490,9 @@ case "$host_arch" in > def_av_fast_unaligned='#define AV_HAVE_FAST_UNALIGNED 1' > def_local_aligned='#define HAVE_LOCAL_ALIGNED 1' > test $_fast_clz = "auto" && _fast_clz=yes > + if test "$_runtime_cpudetection" = no ; then > + cflag_check -march=native -mcpu=native -mfpu=auto && _march="-march=native -mcpu=native -mfpu=auto" > + fi > ;; > > avr32) > @@ -9416,8 +9422,11 @@ $def_openssl > #define CONFIG_VAAPI 0 > > #define HAVE_ALIGNED_STACK 1 > +#define HAVE_AS_ARCH_DIRECTIVE 1 > #define HAVE_AS_DN_DIRECTIVE 1 > +#define HAVE_AS_FPU_DIRECTIVE 1 > #define HAVE_AS_FUNC 1 > +#define HAVE_AS_OBJECT_ARCH 1 These changes seem a bit underrepresented in the commit message. Are they necessary for a good and optimized ARM build? > #define HAVE_ASM_MOD_Q 1 > #define HAVE_ATOMICS_GCC 1 > #define HAVE_COPYSIGN 1 Alexander From eclipse7 at gmx.net Sat Oct 31 22:38:51 2020 From: eclipse7 at gmx.net (Alexander Strasser) Date: Sat, 31 Oct 2020 21:38:51 +0100 Subject: [MPlayer-cvslog] r38195 - trunk/configure In-Reply-To: <20200830155129.2EDA268808D@ffbox0-bg.mplayerhq.hu> References: <20200830155129.2EDA268808D@ffbox0-bg.mplayerhq.hu> Message-ID: <20201031203851.GD1111@xklotz.local> On 2020-08-30 18:51 +0300, reimar wrote: > Author: reimar > Date: Sun Aug 30 18:51:28 2020 > New Revision: 38195 > > Log: > configure: allow using --enable-runtime-cpudetection for Arm builds. > > This is mostly to allow undoing the effects of the previous > patch which adds -march=native if it is not set > > Modified: > trunk/configure > > Modified: trunk/configure > ============================================================================== > --- trunk/configure Sun Aug 30 18:27:41 2020 (r38194) > +++ trunk/configure Sun Aug 30 18:51:28 2020 (r38195) > @@ -1920,7 +1920,7 @@ fi > echo "Detected operating system: $system_name" > echo "Detected host architecture: $host_arch" > > -if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then > +if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc && ! arm; then > die "Runtime CPU detection only works for x86, x86-64 and PPC!" > fi > > @@ -9716,6 +9716,14 @@ If you suspect a bug, please read DOCS/H > > EOF > > +if test "$_runtime_cpudetection" = yes && arm; then > + cat << EOF > +WARNING: --enable-runtime-cpudetection is not fully supported on Arm, > +it only compiles for your compilers default target instead of the host > +CPU (-match=native). Here is a little typo, should be: -march=native If anyone is pushing changes ATM, please consider fix the typo too. Thanks in advance. > +EOF > +fi > + > if test "$warn_cflags" = yes; then > cat <