Re: [flac-dev] How to change the dynamic library project name ogg to libogg?
On 06/06/23 02:33 AM, m b wrote: Hi, I use CMake to generate FLAC dynamic link library projects for Visual Studio, in the CMake user interface window, the "BUILD_SHARED_LIBS" is enabled. The CMake generates the FLAC and ogg dynamic library projects. The Visual Studio builds the FLAC.dll and ogg.dll, and the FLAC.dll depends on ogg.dll. However, in my previous projects, the file name of the dynamic library for ogg is libogg.dll, now the FLAC.dll (version 1.4.2) required ogg.dll, I have to make a copy of libogg.ll and rename it to ogg.dll, they are duplicate files. So I want the CMake-generated project file name is libogg, not ogg. I check the CMakeLists.txt and confilgure file in flac-1.4.2, and don't find how to change ogg project name to libogg. Might have to figure out where cmake is installed on Windows, find the file Modules\Platform\Windows.cmake and edit the line set(CMAKE_SHARED_LIBRARY_PREFIX "") # lib to SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") Which will of course cause all DLL's to have the lib prefix. Might be a different Platform file to edit too as I'm making assumptions and haven't actually tested, no Windows here. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] 1.4.0 release candidate
On 09/06/22 11:25 AM, Martijn van Beurden wrote: Op do 1 sep. 2022 om 07:32 schreef Martijn van Beurden mailto:mva...@gmail.com>>: I invite anyone interested to build from git, run the test suite and report back any problems. Comparisons of compression and speed between current git and 1.3.4 are also welcome. Shared configure build builds fine on OS/2, static, libtool wanted to do a hard link which fails here. Need to look better and make a bug report I guess. Tests fail at, fractional block size test (blocksize=33 samples=31) encode... ERROR make[1]: *** [check] Error 1 Which I blame on a crappy dd port. The build did complain and output a lot of errors in the doxygen phase, probably a port or version (1.8.17) problem, not a big deal. Seems to be a code page problem with the test suite too, K:\...\flac-to-flac-metadata-test-files>ls *flac ƒñö.flac input-SCVAUP.flac input-VA.flac input-SCPAP.flac input-SCVPAP.flac ήΣÎòÎØ.flac input-SCVA.flac input-SVAUP.flac Pr├©ve.flac Guess UTF8 file names, libc here is still broken when it comes to UTF Thanks for the work on flac, Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] issue with flac versions > 1.3.2
On 04/22/22 02:45 PM, Scott Brown wrote: on flac 1.3.2 and earlier, shntool has no problem reading in the decoded flac data from std out. But on 1.3.3 and 1.3.4, shntool doesn't seem to recognize the decoded flac data as valid PCM data. 1. I hope I'm making sense. and 2. What changed in 1.3.3+ that may cause this? Perhaps try doing a git bisect between 1.3.2 and 1.3.3 to find the commit that broke things? Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Prelease now available
On 07/19/19 02:35 PM, Erik de Castro Lopo wrote: Erik de Castro Lopo wrote: Hopefull the final release candidate: http://mega-nerd.com/tmp/flac-1.3.3rc3.tar.xz http://mega-nerd.com/tmp/flac-1.3.3rc3.tar.xz.asc I am assuming everyone was happy with that and that I can release a new version. Compiles without warnings here and passes all the tests I tried and am fine with a release. Make check does seem to be getting less portable, with dash, (pdk)sh and (mk)sh here, FLAC__TEST_LEVEL=1 FLAC__TEST_WITH_VALGRIND=no ECHO_N="-n" ECHO_C="" ./test_libFLAC.sh common.sh: 20: common.sh: Illegal number: make[1]: *** [check] Error 2 Also notice that you're using COMSPEC, a DOS thing that is set in all Dosish operating systems including here on OS/2, to check for Windows. Not too important for a minor OS and it would eventually die here due to a crappy dd port. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] os/2 support using Watcom
On 01/23/17 01:01 AM, Erik de Castro Lopo wrote: > Dave Yeo wrote: > >> >GCC supports __declspec(dllexport) though it still needs a def file, >> >with no exports. Libtool doesn't currently and as flac uses libtool... > So you're happy with this patch? > > http://lists.xiph.org/pipermail/flac-dev/2017-January/006170.html > No. Lots of errors such as ../../include/FLAC/export.h:77:18: error: expected identifier or '(' before ')' token #define FLAC_API __declspec(__cdecl) ... as GCC doesn't like the __cdecl macro. If going this route then perhaps, diff --git a/include/FLAC/export.h b/include/FLAC/export.h index d52f0bb..5d40421 100644 --- a/include/FLAC/export.h +++ b/include/FLAC/export.h @@ -66,6 +66,13 @@ #define FLAC_API __declspec(dllimport) #endif +#elif defined(__OS2__) +#if defined(FLAC_API_EXPORTS) && defined(__WATCOMC__) && defined(__SW_BD) +#define FLAC_API __declspec(__cdecl) __declspec(dllexport) +#else +#define FLAC_API __declspec(dllexport) +#endif + #elif defined(FLAC__USE_VISIBILITY_ATTR) #define FLAC_API __attribute__ ((visibility ("default"))) Another option is for the caller to define FLAC_API, eg #define FLAC_API __declspec(__cdecl) #include <flac\all.h> diff --git a/include/FLAC/export.h b/include/FLAC/export.h index d52f0bb..07cfe59 100644 --- a/include/FLAC/export.h +++ b/include/FLAC/export.h @@ -56,6 +56,7 @@ * \{ */ +#ifndef FLAC_API #if defined(FLAC__NO_DLL) #define FLAC_API @@ -66,6 +67,10 @@ #define FLAC_API __declspec(dllimport) #endif +#elif defined(__OS2__) +#define FLAC_API __declspec(dllexport) +#endif + #elif defined(FLAC__USE_VISIBILITY_ATTR) #define FLAC_API __attribute__ ((visibility ("default"))) @@ -73,7 +78,7 @@ #define FLAC_API #endif - +#endif /** These #defines will mirror the libtool-based library version number, see * http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning */ This assumes that Ozkan isn't pursuing his OpenWatcom patches which isn't clear. Either way callers should be able to define FLAC_API. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] os/2 support using Watcom
On 01/22/17 10:55 AM, lvqcl wrote: Ozkan Sezerwrote: The attached set of patches adds support for OS/2 using Watcom compiler (tested with Open Watcom 1.9). My only interest was building a working dll (the last patch in the set adds a makefile for it), therefore I did not touch other places: If there is interest, I can do so. Patches that remove warnings of DJGPP compiler broke support for Visual Studio 2005/2008. I don't care about these versions really, but I find it very amusing that 20-years old and almost forgotten platforms are more important than 10-years old. ___ I'll note that the next release of (OEM branded) OS/2 is due on Mar 31st. So still not dead. https://www.arcanoae.com/ Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] os/2 support using Watcom
On 01/22/17 05:35 AM, Ozkan Sezer wrote: The attached set of patches adds support for OS/2 using Watcom compiler (tested with Open Watcom 1.9). My only interest was building a working dll (the last patch in the set adds a makefile for it), therefore I did not touch other places: If there is interest, I can do so. Most of the patches can have s/__EMX__/__OS2__/ excepting the nasm.h one. nasm.h should test for OBJ_FORMAT_obj as obj is also correct when building with GCC flags -Zomf. Not sure about the assembly prefix as generally cdecl is correct for OS/2, perhaps test for defined (__WATCOMC__) && defined (__OS2__) Will the GCC built flac8.dll link with Watcom with something like diff --git a/include/FLAC/export.h b/include/FLAC/export.h index d52f0bb..96d5422 100644 --- a/include/FLAC/export.h +++ b/include/FLAC/export.h @@ -69,6 +69,9 @@ #elif defined(FLAC__USE_VISIBILITY_ATTR) #define FLAC_API __attribute__ ((visibility ("default"))) +#elif defined (__WATCOMC__) && defined (__OS2__) +#define FLAC_API __declspec(__cdecl) + #else #define FLAC_API Not sure if a OMF import lib is required but easy enough to create with implib or emximp Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] FLAC 1.3.2 has been released
On 01/02/17 11:43 PM, Erik de Castro Lopo wrote: Please let me know if any download.xiph.org/flac/ site is missing the 1.3.2 files. The Oregon State U, Open Source Lab mirror is still missing 1.3.2 Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Do we need a pre-release?
On 12/08/16 12:24 AM, Thomas Zander wrote: On 7 December 2016 at 21:08, Erik de Castro Lopowrote: lvqcl.mail wrote: "make -f Makefile.lite" also doesn't work out of box. Didn't work for the 1.3.1 release either. Makes me wonder why we even keep it around. Because it works on many systems with only tiny tweaks (e.g. passing an env var) without the mess that is GNU autotools. I use it frequently and always thought of it of an fine asset to have (which other projects lack). Would be nice to keep it IMHO. I agree. Here it would require a lot of tweaking but it is still a good beginning point for someone who needs a plain makefile. Even if slightly broken, it should be kept as a template. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Do we need a pre-release?
On 12/06/16 11:46 PM, Erik de Castro Lopo wrote: Erik de Castro Lopo wrote: Unfortunately I've lost/forgotten my Xiph SVN password. While I get that sorted out for the real release, the pre-releases are here: http://mega-nerd.com/tmp/flac-1.3.2pre1-win.zip http://mega-nerd.com/tmp/flac-1.3.2pre1.tar.xz Forgot to mention that I have tested this on x86_64/linux, armhf/linux and powerpc/linux. Builds fine on OS/2 and the only test failures are due to dd failures, eg ... Generating multiple input files from noise... ERROR: creating files with dd ... Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [PATCH] Fix compilation on OS/2
On 02/08/16 03:25 AM, Erik de Castro Lopo wrote: The configure stuff in the second seems overly complex. Is something like this: AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) if test x$have_clock_gettime = xyes; then AC_DEFINE(HAVE_CLOCK_GETTIME) fi not sufficient? You can either test this and provide an updated patch or I can fix it here. Yes, much simpler and works fine. Thanks Dave From 6fe1a1c2a254e212227a208d241c9328469176c4 Mon Sep 17 00:00:00 2001 From: Dave Yeo <dave.r.yeo@gmail.com> Date: Tue, 2 Feb 2016 20:19:59 -0800 Subject: [PATCH] Use gettimeofday() for benchmarking Some operating systems such as OS/2 don't have any of the CLOCK* API implemented Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com> --- configure.ac | 5 + microbench/util.c | 38 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 915869b..b577248 100644 --- a/configure.ac +++ b/configure.ac @@ -371,6 +371,11 @@ AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN) AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man]) fi +AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) +if test x$have_clock_gettime = xyes; then +AC_DEFINE(HAVE_CLOCK_GETTIME) +fi + # only matters for x86 AC_CHECK_PROGS(NASM, nasm) AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM") diff --git a/microbench/util.c b/microbench/util.c index ff1c3fb..dbd4bc1 100644 --- a/microbench/util.c +++ b/microbench/util.c @@ -95,7 +95,7 @@ benchmark_function (void (*testfunc) (void), unsigned count) return counter_diff (, ) / count ; } /* benchmark_function */ -#else +#elif defined HAVE_CLOCK_GETTIME #include #include @@ -131,6 +131,42 @@ benchmark_function (void (*testfunc) (void), unsigned count) return timespec_diff (, ) / count ; } /* benchmark_function */ +#else + +#include +#include + +static double +timeval_diff (const struct timeval * start, const struct timeval * end) +{ struct timeval diff; + +if (end->tv_usec - start->tv_usec < 0) +{ diff.tv_sec = end->tv_sec - start->tv_sec - 1 ; +diff.tv_usec = 100 + end->tv_usec - start->tv_usec ; +} +else +{ diff.tv_sec = end->tv_sec - start->tv_sec ; +diff.tv_usec = end->tv_usec-start->tv_usec ; +} ; + +return diff.tv_sec + 1e-6 * diff.tv_usec ; +} + +double +benchmark_function (void (*testfunc) (void), unsigned count) +{ struct timeval start, end; + unsigned k ; + + gettimeofday(, NULL); + + for (k = 0 ; k < count ; k++) + testfunc () ; + + gettimeofday(, NULL); + + return timeval_diff (, ) / count ; +} /* benchmark_function */ + #endif static int -- 2.0.0 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] [PATCH] Fix compilation on OS/2
On 01/24/16 12:29 PM, Erik de Castro Lopo wrote:> Dave Yeo wrote: > >> After this the build dies with, >> util.c: In function 'benchmark_function': >> util.c:124:17: error: 'CLOCK_PROCESS_CPUTIME_ID' undeclared (first use >> in this function) >> clock_gettime (CLOCK_PROCESS_CPUTIME_ID, ) ; >> >> Would using gettimeofday() be accurate enough? > > AS a fall back yes, but not as replacement on platforms with clock_gettime(). > >> Perhaps simpler just to >> disable the microbench test on OS/2 as gettimeofday() would require a >> configure test and OS/2 is a minor platform? > > > I would accept a patch that disables the microsbenchmark on OS/2 I would > also accept one that uses gettimeofday() when clock_gettime() is not > available. Here's one attempt, added configure options to disable AVX and clock_gettime, only tested on OS/2. With this compilation succeeds on OS/2. Make check does eventually fail with, ... WAVE fixup test... prepare... encode... decode... compare... OK AIFF fixup test... prepare... encode... decode... compare... OK Generating multiple input files from noise... ERROR: creating files with dd ... which I don't understand. Perhaps buggy dd. I take it this succeeds on Windows. Since $COMSPEC is set here we take the if_win path. Dave From 7e7e97eedd6df9ceb49d701cd68bc0133aebb4c0 Mon Sep 17 00:00:00 2001 From: Dave Yeo <dave.r.yeo@gmail.com> Date: Sun, 24 Jan 2016 22:09:50 -0800 Subject: [PATCH 1/2] Enable disabling AVX and AVX2 instructions through a configure option Handy for toolchains or operating systems that don't support AVX or AVX2 Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com> --- configure.ac | 13 + src/libFLAC/include/private/cpu.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index d6bb2d0..915869b 100644 --- a/configure.ac +++ b/configure.ac @@ -238,6 +238,19 @@ AC_DEFINE(FLAC__USE_ALTIVEC) AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions]) fi +AC_ARG_ENABLE(avx, +AC_HELP_STRING([--disable-avx], [Disable AVX, AVX2 optimizations]), +[case "${enableval}" in + yes) use_avx=true ;; + no) use_avx=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-avx) ;; +esac],[use_avx=true]) +AM_CONDITIONAL(FLaC__USE_AVX, test "x$use_avx" = xtrue) +if test "x$use_avx" = xtrue ; then +AC_DEFINE(FLAC__USE_AVX) +AH_TEMPLATE(FLAC__USE_AVX, [define to enable use of AVX instructions]) +fi + AC_ARG_ENABLE(thorough-tests, AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]), [case "${enableval}" in diff --git a/src/libFLAC/include/private/cpu.h b/src/libFLAC/include/private/cpu.h index 380f4f0..46d01e3 100644 --- a/src/libFLAC/include/private/cpu.h +++ b/src/libFLAC/include/private/cpu.h @@ -78,9 +78,11 @@ #define FLAC__SSE2_SUPPORTED 1 #define FLAC__SSSE3_SUPPORTED 1 #define FLAC__SSE4_1_SUPPORTED 1 +#ifdef FLAC__USE_AVX #define FLAC__AVX_SUPPORTED 1 #define FLAC__AVX2_SUPPORTED 1 #define FLAC__FMA_SUPPORTED 1 +#endif #else /* for GCC older than 4.9 */ #define FLAC__SSE_TARGET(x) #ifdef __SSE__ -- 2.0.0 From 75ce4c6c622f0882012f0e04f20004d1c3f136bc Mon Sep 17 00:00:00 2001 From: Dave Yeo <dave.r.yeo@gmail.com> Date: Tue, 2 Feb 2016 20:19:59 -0800 Subject: [PATCH 2/2] Use gettimeofday() for benchmarking Some operating systems such as OS/2 don't have any of the CLOCK* API implemented Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com> --- configure.ac | 14 ++ microbench/util.c | 38 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 915869b..ec5466d 100644 --- a/configure.ac +++ b/configure.ac @@ -371,6 +371,20 @@ AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN) AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man]) fi +# Check for clock_gettime() +CheckClockGettime() +{ +AC_ARG_ENABLE(clock_gettime, +AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=yes]]]), + , enable_clock_gettime=yes) +if test x$enable_clock_gettime = xyes; then +AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) +if test x$have_clock_gettime = xyes; then +AC_DEFINE(HAVE_CLOCK_GETTIME) +fi +fi +} + # only matters for x86 AC_CHECK_PROGS(NASM, nasm) AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM") diff --git a/microbench/util.c b/microbench/util.c index ff1c3fb..dbd4bc1 100644 --- a/microbench/util.c +++ b/microbench/util.c @@ -95,7 +95,7 @@ benchmark_function (void (*testfunc) (void), unsigned count) return counter_diff (, ) / count ; } /* benchmark_function */ -#else +#elif defi
Re: [flac-dev] Lets do a 1.3.2 release
On 01/19/16 01:04 PM, lvqcl wrote: > Dave Yeo wrote: > >>> I cannot find information what version of binutils supports AVX/AVX2/FMA >>> instructions, but IIRC OS/2 doesn't support AVX instructions anyway, >>> so it doesn't matter much. >> >> Surprisingly, I've yet to have a report of an AVX related crash or trap >> (used in FFmpeg and projects based on it, Mozilla, probably others). >> As I understand it, support is a matter of saving the extended registers >> during a context switch and perhaps our kernel had some future proofing >> added towards the end. > > WinXP/Vista also don't support AVX but ffmpeg doesn't crash there. > > IIRC, OS must explicitely enable AVX support, and an application must check > whether the OS supports AVX or not. OK, that makes sense and after looking quickly at Agners optimizing_assembly.pdf I can see how FFmpeg does it though I still find it hard to follow the code in flac. The second version of the patch is to be preferred. I'll have to ask the Russians about their alternative kernel (OS/4) Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Lets do a 1.3.2 release
On 01/18/16 01:46 PM, lvqcl wrote: > Dave Yeo wrote: > >> The nature of the error implies AVX2 support that is missing but I'm not >> much up on assembly, >> >> Best to be safe so updated patch attached. >> I've also opened a ticket, http://trac.netlabs.org/rpm/ticket/165#ticket >> Dave > > I cannot find information what version of binutils supports AVX/AVX2/FMA > instructions, but IIRC OS/2 doesn't support AVX instructions anyway, > so it doesn't matter much. Surprisingly, I've yet to have a report of an AVX related crash or trap (used in FFmpeg and projects based on it, Mozilla, probably others). As I understand it, support is a matter of saving the extended registers during a context switch and perhaps our kernel had some future proofing added towards the end. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Lets do a 1.3.2 release
On 01/18/16 07:42 AM, lvqcl wrote: Dave Yeo wrote: >Seems that the default binutils on OS/2 is too old to support AVX2, >attached patch works around this. Not the best solution as best would be >configure tests, but simple. Are you sure that these binutils support AVX and FMA? (Currently libFLAC doesn't contain AVX and FMA instructions). If they aren't supported then it's better to include them too into #if !defined __OS2__ ... #endif. The nature of the error implies AVX2 support that is missing but I'm not much up on assembly, make[4]: Entering directory `K:/usr/local/src/flac/src/libFLAC' CC lpc_intrin_avx2.lo R:/tmp/ccwvrScM.s: Assembler messages: R:/tmp/ccwvrScM.s:495: Error: operand type mismatch for `vbroadcastss' ... R:/tmp/ccwvrScM.s:8773: Error: operand type mismatch for `vpsrlq' R:/tmp/ccwvrScM.s:8778: Error: no such instruction: `vpermd %ymm1,%ymm5,%ymm0' R:/tmp/ccwvrScM.s:8859: Error: operand type mismatch for `vpmovzxdq' ... Best to be safe so updated patch attached. I've also opened a ticket, http://trac.netlabs.org/rpm/ticket/165#ticket Dave From dc164a696709fc9965a1c8c452800c596872d993 Mon Sep 17 00:00:00 2001 From: Dave Yeo <dave.r.yeo@gmail.com> Date: Mon, 18 Jan 2016 10:31:51 -0800 Subject: [PATCH] OS/2 currently has too old of a binutils to support AVX Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com> --- src/libFLAC/include/private/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libFLAC/include/private/cpu.h b/src/libFLAC/include/private/cpu.h index 380f4f0..1c8428c 100644 --- a/src/libFLAC/include/private/cpu.h +++ b/src/libFLAC/include/private/cpu.h @@ -78,9 +78,11 @@ #define FLAC__SSE2_SUPPORTED 1 #define FLAC__SSSE3_SUPPORTED 1 #define FLAC__SSE4_1_SUPPORTED 1 +#if !defined __OS2__ #define FLAC__AVX_SUPPORTED 1 #define FLAC__AVX2_SUPPORTED 1 #define FLAC__FMA_SUPPORTED 1 +#endif #else /* for GCC older than 4.9 */ #define FLAC__SSE_TARGET(x) #ifdef __SSE__ -- 2.0.0 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Lets do a 1.3.2 release
On 01/08/16 02:56 AM, Erik de Castro Lopo wrote: HI all, I think its time for a new release. The current code base is stable and I've been building it for x86_64/linux, powerpc/linux, armhf/linux, x86_64/darwin in a Jenkins build bot. I'm pretty sure others have been building regularly on their platforms of interest Seems that the default binutils on OS/2 is too old to support AVX2, attached patch works around this. Not the best solution as best would be configure tests, but simple. I'll file a bug about this but it'll be a while before anything is done about it. After this the build dies with, util.c: In function 'benchmark_function': util.c:124:17: error: 'CLOCK_PROCESS_CPUTIME_ID' undeclared (first use in this function) clock_gettime (CLOCK_PROCESS_CPUTIME_ID, ) ; Would using gettimeofday() be accurate enough? Perhaps simpler just to disable the microbench test on OS/2 as gettimeofday() would require a configure test and OS/2 is a minor platform? Dave From 15985f472037734032183a399b5841a09a0dc950 Mon Sep 17 00:00:00 2001 From: Dave Yeo <dave.r.yeo@gmail.com> Date: Sat, 9 Jan 2016 22:34:44 -0800 Subject: [PATCH] OS/2 currently has too old of a binutils to support AVX2 Signed-off-by: Dave Yeo <dave.r.yeo@gmail.com> --- src/libFLAC/include/private/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libFLAC/include/private/cpu.h b/src/libFLAC/include/private/cpu.h index 380f4f0..1e737cb 100644 --- a/src/libFLAC/include/private/cpu.h +++ b/src/libFLAC/include/private/cpu.h @@ -79,7 +79,9 @@ #define FLAC__SSSE3_SUPPORTED 1 #define FLAC__SSE4_1_SUPPORTED 1 #define FLAC__AVX_SUPPORTED 1 +#if !defined __OS2__ /* Currently binutils are too old to support AVX2 */ #define FLAC__AVX2_SUPPORTED 1 +#endif #define FLAC__FMA_SUPPORTED 1 #else /* for GCC older than 4.9 */ #define FLAC__SSE_TARGET(x) -- 2.0.0 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] How to check for 64-bit CPU?
On 12/29/15 11:31 AM, Erik de Castro Lopo wrote: > Rafaël Carré wrote: > >> That would need a special case for Linux x32 which is x86_64 with 32 >> bits pointers > > It won't be wrong for x32, just sub-optimal. > > Please feel free to suggest a way to detect x32. > Shouldn't these tests be in configure and at worst x32 can be passed as target. Dave > ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] config.rpath?
Building flac git head on OS/2 dies when running sh /usr/bin/autoreconf --install --force ... configure.ac:32: installing './compile' configure.ac:35: installing './config.guess' configure.ac:344: error: required file './config.rpath' not found configure.ac:35: installing './config.sub' configure.ac:26: installing './install-sh' configure.ac:26: installing './missing' examples/c/decode/file/Makefile.am: installing './depcomp' autoreconf: failed to run automake: SYS0003=0x3: The system cannot find the path specified [K:\usr\local\src\flac]sh /usr/bin/automake configure.ac:344: error: required file './config.rpath' not found ... Is this an auto tools porting bug or flac bug? Touch flac/config.rpath seems to fix the issue. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] config.rpath?
On 07/31/15 11:53 PM, Erik de Castro Lopo wrote: Dave Yeo wrote: Building flac git head on OS/2 dies when running sh /usr/bin/autoreconf --install --force Don't run autoreconf, use autogen.sh in the FLAC git repo which contains: touch config.rpath using a port of DASH, [K:\usr\local\src\flac]sh autogen.sh function: not found autogen.sh: 13: Syntax error: } unexpected Plus symlinks are unwanted. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] config.rpath?
On 08/01/15 12:55 AM, Erik de Castro Lopo wrote: I've just switched autogen.sh from bash to sh and made sure it works with /bin/bash Plus symlinks are unwanted. I've also added a --no-symlinks option to autogen.sh. Happy now?:-) Yes, always nice to have plain sh being the requirement. Also tested with [pdk]sh. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [PATCH] configure: only use -mstackrealign on mingw32/os2
On 04/10/15 10:05 PM, Tristan Matthews wrote: And only for i686. LGTM, thanks Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [PATCH] configure: only use -mstackrealign for mingw32
On 04/10/15 02:10 pm, Erik de Castro Lopo wrote: Tristan Matthews wrote: --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index eb9b0cc..e7d68c3 100644 --- a/configure.ac +++ b/configure.ac @@ -399,9 +399,11 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then if test x$asm_optimisation$sse_os = xyesyes ; then XIPH_ADD_CFLAGS([-msse2]) -XIPH_ADD_CFLAGS([-mstackrealign]) fi +fi +if test $host_os = mingw32 ; then +XIPH_ADD_CFLAGS([-mstackrealign]) fi XIPH_ADD_CFLAGS([-Wextra]) Everyone happy with this patch? Should it be a case statement so other OSes can be added or just use || ? OS/2 should also have the -mstackrealign option added as well. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] ensure that stack is aligned for SSE functions if using mingw32
On 03/09/15 03:59 PM, lvqcl wrote: Tristan Matthews wrote: Unable to test on win32 at the moment, please give this a try. Feedback welcome. I wonder why misaligned stack is a problem only for the FLAC library. There are many other libraries inside VLC... BTW: FLAC 1.3.1 uses -msse2 option by default. Do you remove it? Otherwise libFLAC may crash anywhere else (if its stack is not aligned). One workaround is to use -mstackrealign where ever -msse2 is used Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] New release
On 11/22/14 07:14 PM, Erik de Castro Lopo wrote: Once I publis the patch, I like to release FLAC 1.3.1 immediately and would therefore like to make sure that all the different platforms build correctly. Git head builds fine on OS/2 Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] PATCH: OS SSE support detection, version 2
On 03/14/14 10:15 PM, lvqcl wrote: Maybe it's better and simpler to change configure.ac so that --enable-sse is on by default if the target OS is Windows? Why not just reverse the --enable-sse so it is the default and if anyone really needs to support something without kernel support for sse they can configure with --disable-sse. Seems most everything supports sse at this point in time, Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Pre-release 1.3.0pre4 (hopefully the last)
On 04/28/13 02:38 am, Erik de Castro Lopo wrote: Hi all, I have tagged 1.3.0pre4 in git and provided a tarball here: http://downloads.xiph.org/releases/flac/beta/flac-1.3.0pre4.tar.xz On OS/2 compile dies here, CC win_utf8_io/win_utf8_io.lo win_utf8_io/win_utf8_io.c:13:75: error: windows.h: No such file or directory ... with lots of more errors. The problem is in configure.ac. I don't have new enough autotools to test properly but applying this directly to configure fixes it. The build also dies here, CC utils.o utils.c: In function 'get_console_width': utils.c:177: error: storage size of 'w' isn't known utils.c:178: error: 'TIOCGWINSZ' undeclared (first use in this function) utils.c:178: error: (Each undeclared identifier is reported only once utils.c:178: error: for each function it appears in.) utils.c:177: warning: unused variable 'w' possible solution that returns a VIO consoles width attached. Dave --- configure.ac.orig 2013-04-28 17:03:16.0 -0700 +++ configure.ac 2013-04-28 17:06:08.0 -0700 @@ -126,12 +126,15 @@ os_is_windows=no case $host in - *-*-cygwin|*mingw*|*emx*) + *-*-cygwin|*mingw*) # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2 LT_NO_UNDEFINED=-no-undefined CPPFLAGS=-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS os_is_windows=yes ;; + *emx*) + LT_NO_UNDEFINED=-no-undefined + ;; *) LT_NO_UNDEFINED= ;; --- utils.c.bak 2013-04-28 19:00:20.0 -0700 +++ utils.c 2013-04-28 19:05:24.0 -0700 @@ -173,6 +173,10 @@ int width = 80; #ifdef _WIN32 width = win_get_console_width(); +#elif __EMX__ +int s[2]; +_scrsize (s); +width = s[0]; #else struct winsize w; if (ioctl(STDOUT_FILENO, TIOCGWINSZ, w) != -1) width = w.ws_col; ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Can't cross-compile from git now.
On 03/12/13 12:39 pm, Erik de Castro Lopo wrote: For the Linux - Windows cross compile for instance, this detects SSP as working, but when I compile it fails with: CC stream_encoder_framing.lo CC window.lo CCLD libFLAC.la Creating library file: .libs/libFLAC.dll.a .libs/metadata_iterators.o:metadata_iterators.c:(.text+0x8d): undefined reference to `___stack_chk_guard' .libs/metadata_iterators.o:metadata_iterators.c:(.text+0x121): undefined reference to `___stack_chk_guard' .libs/metadata_iterators.o:metadata_iterators.c:(.text+0x14f): undefined reference to `___stack_chk_fail' The odd thinh is, if I use this MinGW cross-compiler to compile a small program, it works perfectly. The problem aboce is related to building a Windows DLL. I can get around the undefined symbol errors by doing make LDFLAGS=-lssp Perhaps Windows and FreeBSD will also work if linked against ssp.a / ssp.dll. OF course this introduces another dependency. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] flac 1.3.0pre2 pre-release
Hi, On 03/09/13 03:37 am, Erik de Castro Lopo wrote: Hi all, Second and hopefully final pre-release is here: http://downloads.xiph.org/releases/flac/beta/ OS/2 now needs this patch. --- configure.ac.orig 2013-03-11 21:52:54.0 -0700 +++ configure.ac2013-03-11 21:53:30.0 -0700 @@ -378,7 +378,7 @@ XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) case $host_os in - mingw32msvc | mingw32 | freebsd* ) + mingw32msvc | mingw32 | freebsd* | os2*) # Stack protector not working on these platforms 2013/03/09. ;; *) Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Testing needed
On 02/26/12 10:58 pm, Erik de Castro Lopo wrote: If you're interested in pursuing this please try changing line 175 of src/share/utf8/iconvert.c from: k = iconv(cd2, 0, 0, ob, obl); to: k = iconv(cd2, 0, 0, (const char**) ob, obl); and seeing if there is a warning with the replacement. Shouldn't that be changing k = iconv(cd2, ib, ibl, ob, obl); to k = iconv(cd2,(const char**) ib, ibl, ob, obl); which here gets rid of the warning on line 175. ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Testing needed
On 02/26/12 10:37 pm, Erik de Castro Lopo wrote: Dave Yeo wrote: Couple of simple patches attached. Patches applied. Thanks. I also see that static builds are now broken, alloc.c:37 (../../src/share/grabbag/.libs/grabbag.a(alloc.o)): Definition of symbol _safe_malloc_mul_2op_ (multiply defined) memory.c:224 (../../src/libFLAC/.libs/FLAC.a(memory.o)): Definition of symbol _safe_malloc_mul_2op_ (multiply defined) make.exe[3]: *** [metaflac.exe] Error 1 Haven't looked into it yet as it is bed time here. Thanks Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Testing needed
On 02/26/12 02:18 am, Erik de Castro Lopo wrote: Hi all, I think we're getting close to the first FLAC release in over 4 years. I have tested whats currently in Git on x86, x86_64 and PowerPC Linux and would appreciate reports of successful compiles (and even more importantly any failures) on OSX, Windows and elsewhere. Hi, build dies here on OS/2 as aout is a very simple object format and doesn't support most types of .section. ... sh ../../../strip_non_asm_libtool_args.sh nasm -f aout -d OBJ_FORMAT_aout -i./ bitreader_asm.nasm -DDLL_EXPORT -DPIC -o .libs/bitreader_asm.o nasm -f aout -d OBJ_FORMAT_aout -i./ bitreader_asm.nasm -DDLL_EXPORT -o .libs/bitreader_asm.o nasm.h:77: error: segment name `.note.GNU-stack progbits noalloc noexec nowrite align=1' not recognized ... Wrapping the section with %ifndef OBJ_FORMAT_aout fixes it. There are also warnings about implicit declarations of _response() and _wildcard() fixed by including stdlib.h I also see the same iconv warnings as mingw. Couple of simple patches attached. Dave From 4cea5aa4078df0f5de503b26e6bc1f07017adfdd Mon Sep 17 00:00:00 2001 From: Dave Yeo dave.r.yeo@gmail.com Date: Sun, 26 Feb 2012 12:14:15 -0800 Subject: [PATCH 1/2] a.out format does not support many .section directives --- src/libFLAC/ia32/nasm.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/libFLAC/ia32/nasm.h b/src/libFLAC/ia32/nasm.h index afc3e12..8455772 100644 --- a/src/libFLAC/ia32/nasm.h +++ b/src/libFLAC/ia32/nasm.h @@ -74,5 +74,7 @@ _%1: %1: %endmacro +%ifndef OBJ_FORMAT_aout section .note.GNU-stack progbits noalloc noexec nowrite align=1 +%endif -- 1.7.2.3 From 015912a1e30b1214b1c20fbb4976cd734936bee4 Mon Sep 17 00:00:00 2001 From: Dave Yeo dave.r.yeo@gmail.com Date: Sun, 26 Feb 2012 12:18:06 -0800 Subject: [PATCH 2/2] Include stdlib.h for _response() and _wildcard() declarations on OS/2 --- src/metaflac/main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/metaflac/main.c b/src/metaflac/main.c index a6dbc29..1b4d208 100644 --- a/src/metaflac/main.c +++ b/src/metaflac/main.c @@ -23,6 +23,7 @@ #include operations.h #include options.h #include locale.h +#include stdlib.h int main(int argc, char *argv[]) { -- 1.7.2.3 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Compiling flac for OSX 10.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/09/12 10:44 pm, Glenn McCord wrote: In file included from main.c:26: /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory This error makes no sense, perhaps your install is broken? What is line 4 of /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h? Here stdarg.h ultimately links to 386/stdarg.h where the macros for va_start and va_end are defined. main.c: In function ?usage_error?: main.c:1116: warning: implicit declaration of function ?va_start? main.c:1120: warning: implicit declaration of function ?va_end? make[3]: *** [main.o] Error 1 Grep your include tree, I guess /Developer/SDKs/MacOSX10.4u.sdk/usr/include, for va_start and va_end for the include where they are defined. Dave -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (OS/2) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBTzTE43oc36Ns6m33AQKIEQf/diS0YuKVnVQmCAadBCmKIUWKR+Rv3UaA y15Pl8qzTacfOwMNRXYj+yb1c35GwlQVfNhrGlRsS1Su4kXNgm/0I3G+ZZKQ3rPB vNMdDDQQnpk1Auc6IR3Zf0sUWJK4NNJpPokXf9EfkQSR/5//1tjoXKMZyD4WsrmT BUvOQni3nbekai2QLfvh74S3q2tAy+GEAJS3FSipej+ZMI0efIETHVzuS7QN3WBt s0KtgY+GPUOmQkrTod6Iixoz3mANY70QfylluTmhQd/e0rabgiUDwOT+kL/BZi/k G5x4hrIjJe7vugxkqCEAu0qQNpb1n0w3UnIkW75vWGzaN7zNsmKOWQ== =5v5r -END PGP SIGNATURE- ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [PATCH] Remove even more CPP hackery
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/08/12 01:32 am, Erik de Castro Lopo wrote: Dave Yeo wrote: Another try Actually there are still some issues with this patch, mainly around your changes to incluce/FLAC/ordinals.h. This file is a public header file and hence, your changes: Sorry about that, forgot that it is a public header. [...] rely on config.h which is only available when FLAC is compiled, not when this file is installed in /usr/include/FLAC or whereever. I'll accept the rest of the patch. For the problem of this file, I think the best solution is to just remove all the CPP hackery and assume that a C99 stdint.h is available. THis would then make it incumbent on any developer that includes (either directly or indirectly) include/FLAC/ordinals.h to include some version of stdint.h first, even if it is just a mininal one with typedefs for the minimal set of sized ints. Does that make sense? Yes that makes sense. Requiring a C99 compliant compiler seems quite reasonable. Dave -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (OS/2) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBTzNshnoc36Ns6m33AQKt5Af7BnGpopuXhyPJEYHc6NgYMMM8F6VzEtFa MREYy7gT0hw/2jGzQ2BV0bAJk3xvTUrgXt79l9/WDCbudkSLiarAZXHMGI8gi0nJ qfxEih7bzSO5SkTK+NRAtxFQFUXW+pqKigQZgjnw7zFCPO+gNCBR0Lx8OHEnn258 QmbGxTqxAboo1gRCmolJr2y2oa3be/fqMDKKysCOA6g+DFzQiCyBwjM/Pc+rI1bA mrQ7exyXv8yDTsXlQrOsYpG8plzMxb3DaiWys6ugXB0OAMEUt6ncZh88qO7ccYQ8 v7JsdmBPsadG2jKbIgJiRca9qLdKbHrfF33clfj7tADMdTdayle+lQ== =02lV -END PGP SIGNATURE- ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] [PATCH] Remove even more CPP hackery
On 02/07/12 02:08 pm, JonY wrote: On 2/8/2012 03:33, Dave Yeo wrote: On 02/07/12 12:03 am, Erik de Castro Lopo wrote: Dave Yeo wrote: This commit will break OS/2's EMX 0.9d library (GCC 2.8.1) which has been been replaced by klibc. Considering the age of EMX and lack of testing and that klibc contains so many improvements I think this is exceptable. Sorry Dave, I can't do that. Or rather sorry, the patch doesn't apply. Probably a line wrapping issue. Maybe you should try send it as an attachment. Another try Dave Why is inttypes.h using OS ifdefs? Shouldn't it be HAVE_INTTYPES_H? I didn't want to touch any Borland C related stuff without being able to test. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] [PATCH] Remove even more CPP hackery
This commit will break OS/2's EMX 0.9d library (GCC 2.8.1) which has been been replaced by klibc. Considering the age of EMX and lack of testing and that klibc contains so many improvements I think this is exceptable. --- include/FLAC/ordinals.h | 17 + src/flac/main.c |2 +- src/libFLAC/metadata_iterators.c |2 +- src/libFLAC/metadata_object.c |2 +- src/share/grabbag/cuesheet.c |2 +- src/test_libFLAC/metadata_manip.c |2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/FLAC/ordinals.h b/include/FLAC/ordinals.h index 80d055b..dc2dafc 100644 --- a/include/FLAC/ordinals.h +++ b/include/FLAC/ordinals.h @@ -32,10 +32,18 @@ #ifndef FLAC__ORDINALS_H #define FLAC__ORDINALS_H -#if !(defined(_MSC_VER) || defined(__BORLANDC__) || defined(__EMX__)) +#if HAVE_CONFIG_H +# include config.h +#endif + +#if !(defined(_MSC_VER) || defined(__BORLANDC__)) #include inttypes.h #endif +#if HAVE_STDINT_H +#include stdint.h +#endif + typedef signed char FLAC__int8; typedef unsigned char FLAC__uint8; @@ -46,13 +54,6 @@ typedef __int64 FLAC__int64; typedef unsigned __int16 FLAC__uint16; typedef unsigned __int32 FLAC__uint32; typedef unsigned __int64 FLAC__uint64; -#elif defined(__EMX__) -typedef short FLAC__int16; -typedef long FLAC__int32; -typedef long long FLAC__int64; -typedef unsigned short FLAC__uint16; -typedef unsigned long FLAC__uint32; -typedef unsigned long long FLAC__uint64; #else typedef int16_t FLAC__int16; typedef int32_t FLAC__int32; diff --git a/src/flac/main.c b/src/flac/main.c index e673a78..d35c960 100644 --- a/src/flac/main.c +++ b/src/flac/main.c @@ -43,7 +43,7 @@ #include utils.h #include vorbiscomment.h -#if defined _MSC_VER || defined __MINGW32__ || defined __EMX__ +#if defined _MSC_VER || defined __MINGW32__ #define FLAC__STRCASECMP stricmp #else #define FLAC__STRCASECMP strcasecmp diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c index e9d5275..32e8ed3 100644 --- a/src/libFLAC/metadata_iterators.c +++ b/src/libFLAC/metadata_iterators.c @@ -3312,7 +3312,7 @@ void set_file_stats_(const char *filename, struct stat *stats) srctime.modtime = stats-st_mtime; (void)chmod(filename, stats-st_mode); (void)utime(filename, srctime); -#if !defined _MSC_VER !defined __BORLANDC__ !defined __MINGW32__ !defined __EMX__ +#if !defined _MSC_VER !defined __BORLANDC__ !defined __MINGW32__ (void)chown(filename, stats-st_uid, -1); (void)chown(filename, -1, stats-st_gid); #endif diff --git a/src/libFLAC/metadata_object.c b/src/libFLAC/metadata_object.c index b7a3280..9196313 100644 --- a/src/libFLAC/metadata_object.c +++ b/src/libFLAC/metadata_object.c @@ -1375,7 +1375,7 @@ FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_entry_matches(const FLAC FLAC__ASSERT(0 != entry.entry entry.length 0); { const FLAC__byte *eq = (FLAC__byte*)memchr(entry.entry, '=', entry.length); -#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ || defined __EMX__ +#if defined _MSC_VER || defined __BORLANDC__ || defined __MINGW32__ #define FLAC__STRNCASECMP strnicmp #else #define FLAC__STRNCASECMP strncasecmp diff --git a/src/share/grabbag/cuesheet.c b/src/share/grabbag/cuesheet.c index 7e62945..15ca5f3 100644 --- a/src/share/grabbag/cuesheet.c +++ b/src/share/grabbag/cuesheet.c @@ -240,7 +240,7 @@ static char *local__get_field_(char **s, FLAC__bool allow_quotes) static FLAC__bool local__cuesheet_parse_(FILE *file, const char **error_message, unsigned *last_line_read, FLAC__StreamMetadata *cuesheet, unsigned sample_rate, FLAC__bool is_cdda, FLAC__uint64 lead_out_offset) { -#if defined _MSC_VER || defined __MINGW32__ || defined __EMX__ +#if defined _MSC_VER || defined __MINGW32__ #define FLAC__STRCASECMP stricmp #else #define FLAC__STRCASECMP strcasecmp diff --git a/src/test_libFLAC/metadata_manip.c b/src/test_libFLAC/metadata_manip.c index f0b941f..19c4e14 100644 --- a/src/test_libFLAC/metadata_manip.c +++ b/src/test_libFLAC/metadata_manip.c @@ -259,7 +259,7 @@ static void set_file_stats_(const char *filename, struct stat *stats) srctime.modtime = stats-st_mtime; (void)chmod(filename, stats-st_mode); (void)utime(filename, srctime); -#if !defined _MSC_VER !defined __MINGW32__ !defined __EMX__ +#if !defined _MSC_VER !defined __MINGW32__ (void)chown(filename, stats-st_uid, -1); (void)chown(filename, -1, stats-st_gid); #endif -- 1.7.2.3 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [flac-dev] Moving CPP hackery
On 02/03/12 09:20 pm, Erik de Castro Lopo wrote: Hi all, especially David Yeo and JonY, I've started moving compiler specific CPP hacker into a separate file at include/share/compat.h. Eventually I hope to be able to move all of the require CPP hackery for $random_compiler into this file and have any C file which needs any compiler specific tweak to include this new compatibilty header. My belief is that one this CPP hackery is all in one place, it will be far easier to modify and keep correct. So, I would be very greatful if David Yeo and JonY could test current git HEAD and provide a patch if anything breaks. I will hold off on any further hacking for a couple of days to give you guys time to test this. Compiles and seems fine here with --disable-asm-optimizations. I'll send a couple of patches to fix building a DLL and using the right object format with nasm in a bit. My apologies in advance if I break threading with those patches, still learning git. Dave ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] [PATCH 1/2] OS/2 also needs -no-undefined to build a DLL
--- configure.ac |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 36ac6c6..32bdd5f 100644 --- a/configure.ac +++ b/configure.ac @@ -103,9 +103,11 @@ esac AC_SUBST(OBJ_FORMAT) case $host in - *-*-cygwin|*mingw*) - # define this variable for enabling strict exports with libtool; for now, it's only supported by Win32 + *-*-cygwin|*mingw*|*emx*) + # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2 LT_NO_UNDEFINED=-no-undefined + ;; + *-*-cygwin|*mingw*) # -lwsock32 only needed because of ntohl() usage, can get rid of after that's gone: MINGW_WINSOCK_LIBS=-lwsock32 ;; -- 1.7.2.3 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
[flac-dev] [PATCH 2/2] OS/2 EMX natively uses AOUT so pass -f aout to NASM
--- configure.ac |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 32bdd5f..06b910a 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,7 @@ case $host in i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;; *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;; *-*-darwin*) OBJ_FORMAT=macho ;; + *emx*) OBJ_FORMAT=aout ;; *) OBJ_FORMAT=elf ;; esac AC_SUBST(OBJ_FORMAT) -- 1.7.2.3 ___ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev
Re: [Flac-dev] Git branch with compiling fixes for win32
On 11/09/11 02:58 pm, Erik de Castro Lopo wrote: If anyone else has Flac patches that they would like to see commited to the Xiph Git repo, now would be a good time to speak up. A couple of build system fixes for OS/2. Not very experienced with git so just attaching. Dave From e47dc34e2025cf0b700a8ff9ebbb7fac7e7999f1 Mon Sep 17 00:00:00 2001 From: Dave Yeo dave.r.yeo@gmail.com Date: Tue, 15 Nov 2011 20:37:16 -0800 Subject: [PATCH 1/2] GCC on OS/2 defaults to A.OUT so nasm should also generate A.OUT object files --- configure.in |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index c6497a0..516edea 100644 --- a/configure.in +++ b/configure.in @@ -93,6 +93,7 @@ case $host in i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;; *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;; *-*-darwin*) OBJ_FORMAT=macho ;; + *os2*) OBJ_FORMAT=aout ;; *) OBJ_FORMAT=elf ;; esac AC_SUBST(OBJ_FORMAT) -- 1.7.2.3 From 99a10229202ece9fd0be41af387911c694038187 Mon Sep 17 00:00:00 2001 From: Dave Yeo dave.r.yeo@gmail.com Date: Tue, 15 Nov 2011 21:25:47 -0800 Subject: [PATCH 2/2] Libtool fix for OS/2 to create shared libs (DLL) Libtool dies with this error libtool: link: warning: undefined symbols not allowed in i386-pc-os2-emx shared libraries without being passed --no-undefined --- configure.in |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure.in b/configure.in index 516edea..efed8dc 100644 --- a/configure.in +++ b/configure.in @@ -100,11 +100,15 @@ AC_SUBST(OBJ_FORMAT) case $host in *-*-cygwin|*mingw*) - # define this variable for enabling strict exports with libtool; for now, it's only supported by Win32 + # define this variable for enabling strict exports with libtool LT_NO_UNDEFINED=-no-undefined # -lwsock32 only needed because of ntohl() usage, can get rid of after that's gone: MINGW_WINSOCK_LIBS=-lwsock32 ;; + *os2*) + # OS/2 also supports this variable and needs it to produce a DLL + LT_NO_UNDEFINED=-no-undefined + ;; *) LT_NO_UNDEFINED= MINGW_WINSOCK_LIBS= -- 1.7.2.3 ___ Flac-dev mailing list Flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev