Files
haikuports/media-libs/flac/patches/flac-1.3.2.patchset
Jerome Duval 4cd69eb13f flac: fix gcc2 build.
* fix #1422.
2017-08-26 12:00:35 +02:00

95 lines
4.6 KiB
Plaintext

From 46090c80c97bef8acd7df98d96be6860e1b73648 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 27 Nov 2014 17:02:30 +0000
Subject: remove unrecognized gcc flags
diff --git a/configure.ac b/configure.ac
index 070ab35..c438589 100644
--- a/configure.ac
+++ b/configure.ac
@@ -396,8 +396,8 @@ fi
XIPH_GCC_VERSION
if test x$ac_cv_c_compiler_gnu = xyes ; then
- CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
- CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
+ CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
+ CXXFLAGS="$CXXFLAGS -Wall -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
--
2.7.0
From ccd459faf2ea8541d3020a9a8a57a345a259f32f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 26 Aug 2017 11:50:31 +0200
Subject: gcc2 fixes
diff --git a/include/FLAC++/decoder.h b/include/FLAC++/decoder.h
index 0b93906..ed8bd91 100644
--- a/include/FLAC++/decoder.h
+++ b/include/FLAC++/decoder.h
@@ -225,11 +225,15 @@ namespace FLAC {
File();
virtual ~File();
+#if __GNUC__ > 2
using Stream::init;
+#endif
virtual ::FLAC__StreamDecoderInitStatus init(FILE *file); ///< See FLAC__stream_decoder_init_FILE()
virtual ::FLAC__StreamDecoderInitStatus init(const char *filename); ///< See FLAC__stream_decoder_init_file()
virtual ::FLAC__StreamDecoderInitStatus init(const std::string &filename); ///< See FLAC__stream_decoder_init_file()
+#if __GNUC__ > 2
using Stream::init_ogg;
+#endif
virtual ::FLAC__StreamDecoderInitStatus init_ogg(FILE *file); ///< See FLAC__stream_decoder_init_ogg_FILE()
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const char *filename); ///< See FLAC__stream_decoder_init_ogg_file()
virtual ::FLAC__StreamDecoderInitStatus init_ogg(const std::string &filename); ///< See FLAC__stream_decoder_init_ogg_file()
diff --git a/include/FLAC++/encoder.h b/include/FLAC++/encoder.h
index b01a545..491a1ff 100644
--- a/include/FLAC++/encoder.h
+++ b/include/FLAC++/encoder.h
@@ -235,11 +235,15 @@ namespace FLAC {
File();
virtual ~File();
+#if __GNUC__ > 2
using Stream::init;
+#endif
virtual ::FLAC__StreamEncoderInitStatus init(FILE *file); ///< See FLAC__stream_encoder_init_FILE()
virtual ::FLAC__StreamEncoderInitStatus init(const char *filename); ///< See FLAC__stream_encoder_init_file()
virtual ::FLAC__StreamEncoderInitStatus init(const std::string &filename); ///< See FLAC__stream_encoder_init_file()
+#if __GNUC__ > 2
using Stream::init_ogg;
+#endif
virtual ::FLAC__StreamEncoderInitStatus init_ogg(FILE *file); ///< See FLAC__stream_encoder_init_ogg_FILE()
virtual ::FLAC__StreamEncoderInitStatus init_ogg(const char *filename); ///< See FLAC__stream_encoder_init_ogg_file()
virtual ::FLAC__StreamEncoderInitStatus init_ogg(const std::string &filename); ///< See FLAC__stream_encoder_init_ogg_file()
diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c
index b9df19a..ee3fc7e 100644
--- a/src/libFLAC/cpu.c
+++ b/src/libFLAC/cpu.c
@@ -65,7 +65,6 @@ static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE = 0x02000000;
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE2 = 0x04000000;
#endif
-#if FLAC__HAS_X86INTRIN || FLAC__AVX_SUPPORTED
/* these are flags in ECX of CPUID AX=00000001 */
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSE3 = 0x00000001;
static const unsigned FLAC__CPUINFO_IA32_CPUID_SSSE3 = 0x00000200;
@@ -78,7 +77,6 @@ static const unsigned FLAC__CPUINFO_IA32_CPUID_AVX = 0x10000000;
static const unsigned FLAC__CPUINFO_IA32_CPUID_FMA = 0x00001000;
/* these are flags in EBX of CPUID AX=00000007 */
static const unsigned FLAC__CPUINFO_IA32_CPUID_AVX2 = 0x00000020;
-#endif
#if defined FLAC__CPU_IA32 || defined FLAC__CPU_X86_64
static uint32_t
--
2.7.0