From d284d42e71b125d9908ae2d6042d17ee09597ecb Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 23 Dec 2020 01:06:02 -0800 Subject: [PATCH] fix compilation with mips16 Some users wrongly pass both -mips16 and -mdsp when compiling on MIPS platforms. Handle such a case. Signed-off-by: Rosen Penev --- libFDK/include/mips/abs_mips.h | 2 +- libFDK/include/mips/scale_mips.h | 2 +- libFDK/include/scramble.h | 2 +- libFDK/src/fft_rad2.cpp | 2 +- libFDK/src/mips/scale_mips.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libFDK/include/mips/abs_mips.h b/libFDK/include/mips/abs_mips.h index dbb2063..5644bc0 100644 --- a/libFDK/include/mips/abs_mips.h +++ b/libFDK/include/mips/abs_mips.h @@ -107,7 +107,7 @@ amm-info@iis.fraunhofer.de #if defined(__GNUC__) && defined(__mips__) -#if defined(__mips_dsp) +#if defined(__mips_dsp) && !defined(__mips16) #define FUNCTION_fixabs_D #define FUNCTION_fixabs_I #define FUNCTION_fixabs_S diff --git a/libFDK/include/mips/scale_mips.h b/libFDK/include/mips/scale_mips.h index 3c141fc..882ef35 100644 --- a/libFDK/include/mips/scale_mips.h +++ b/libFDK/include/mips/scale_mips.h @@ -103,7 +103,7 @@ amm-info@iis.fraunhofer.de #ifndef SCALE_MIPS_H #define SCALE_MIPS_H -#if defined(__mips_dsp) +#if defined(__mips_dsp) && !defined(__mips16) /*! * diff --git a/libFDK/include/scramble.h b/libFDK/include/scramble.h index f07ebed..e7cead9 100644 --- a/libFDK/include/scramble.h +++ b/libFDK/include/scramble.h @@ -108,7 +108,7 @@ amm-info@iis.fraunhofer.de #if defined(__arm__) #include "arm/scramble_arm.h" -#elif defined(__mips__) && defined(__mips_dsp) +#elif defined(__mips__) && defined(__mips_dsp) && !defined(__mips16) #include "mips/scramble_mips.h" #endif diff --git a/libFDK/src/fft_rad2.cpp b/libFDK/src/fft_rad2.cpp index 27f3aa0..f457f8b 100644 --- a/libFDK/src/fft_rad2.cpp +++ b/libFDK/src/fft_rad2.cpp @@ -109,7 +109,7 @@ amm-info@iis.fraunhofer.de #if defined(__arm__) #include "arm/fft_rad2_arm.cpp" -#elif defined(__GNUC__) && defined(__mips__) && defined(__mips_dsp) +#elif defined(__GNUC__) && defined(__mips__) && defined(__mips_dsp) && !defined(__mips16) #include "mips/fft_rad2_mips.cpp" #endif diff --git a/libFDK/src/mips/scale_mips.cpp b/libFDK/src/mips/scale_mips.cpp index 1a3d33c..ff295d9 100644 --- a/libFDK/src/mips/scale_mips.cpp +++ b/libFDK/src/mips/scale_mips.cpp @@ -100,7 +100,7 @@ amm-info@iis.fraunhofer.de *******************************************************************************/ -#if defined(__mips_dsp) +#if defined(__mips_dsp) && !defined(__mips16) #ifndef FUNCTION_getScalefactor_DBL #define FUNCTION_getScalefactor_DBL