fix libjpeg-turbo can't build with combined archs

This commit is contained in:
halx99 2020-12-02 21:18:13 -08:00
parent 098ee5e06f
commit b911741252
4 changed files with 18 additions and 4 deletions

View File

@ -222,7 +222,8 @@ message(STATUS "CMAKE_ASM_FLAGS = ${EFFECTIVE_ASM_FLAGS}")
# so we remove TurboJPEG official complex check logic which not properly works with
# Apple xcode11+ clang
message(STATUS "GAS is working properly")
add_library(simd OBJECT ${CPU_TYPE}/jsimd_neon.S ${CPU_TYPE}/jsimd.c)
# add_library(simd OBJECT ${CPU_TYPE}/jsimd_neon.S ${CPU_TYPE}/jsimd.c)
add_library(simd OBJECT jsimd.c jsimd_neon.S)
if(CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED)
set_target_properties(simd PROPERTIES POSITION_INDEPENDENT_CODE 1)

View File

@ -25,7 +25,6 @@
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
#if defined(__arm__)
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack, "", %progbits /* mark stack as non-executable */
@ -2879,5 +2878,3 @@ asm_function jsimd_huff_encode_one_block_neon
.purgem emit_byte
.purgem put_bits
.purgem checkbuf15
#endif

8
external/jpeg/simd/jsimd.c vendored Normal file
View File

@ -0,0 +1,8 @@
// By halx99, This file is only workaround for build ios combined archs
#if defined(__APPLE__)
#if defined(__arm__)
#include "arm/jsimd.c"
#elif defined(__arm64__)
#include "arm64/jsimd.c"
#endif
#endif

8
external/jpeg/simd/jsimd_neon.S vendored Normal file
View File

@ -0,0 +1,8 @@
// By halx99, This file is only workaround for build ios combined archs
#if defined(__APPLE__)
#if defined(__arm__)
#include "arm/jsimd_neon.S"
#elif defined(__arm64__)
#include "arm64/jsimd_neon.S"
#endif
#endif