png: Try to fix neon issue on iphone armv7

(cherry picked from commit e57042e8a9)
This commit is contained in:
Rémi Verschelde 2016-10-15 15:36:18 +02:00
parent aa1367595e
commit f4414e3e03

View file

@ -6,22 +6,26 @@ env_png = env.Clone()
if (env["libpng"] == "builtin"): if (env["libpng"] == "builtin"):
thirdparty_dir = "#thirdparty/libpng/" thirdparty_dir = "#thirdparty/libpng/"
thirdparty_sources = [ thirdparty_sources = [
thirdparty_dir + "png.c", "png.c",
thirdparty_dir + "pngerror.c", "pngerror.c",
thirdparty_dir + "pngget.c", "pngget.c",
thirdparty_dir + "pngmem.c", "pngmem.c",
thirdparty_dir + "pngpread.c", "pngpread.c",
thirdparty_dir + "pngread.c", "pngread.c",
thirdparty_dir + "pngrio.c", "pngrio.c",
thirdparty_dir + "pngrtran.c", "pngrtran.c",
thirdparty_dir + "pngrutil.c", "pngrutil.c",
thirdparty_dir + "pngset.c", "pngset.c",
thirdparty_dir + "pngtrans.c", "pngtrans.c",
thirdparty_dir + "pngwio.c", "pngwio.c",
thirdparty_dir + "pngwrite.c", "pngwrite.c",
thirdparty_dir + "pngwtran.c", "pngwtran.c",
thirdparty_dir + "pngwutil.c", "pngwutil.c",
] ]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_png.add_source_files(env.drivers_sources, thirdparty_sources)
env_png.Append(CPPPATH = [thirdparty_dir])
# Currently .ASM filter_neon.S does not compile on NT. # Currently .ASM filter_neon.S does not compile on NT.
import os import os
@ -30,16 +34,14 @@ if (env["libpng"] == "builtin"):
env_neon = env_png.Clone(); env_neon = env_png.Clone();
if "S_compiler" in env: if "S_compiler" in env:
env_neon['CC'] = env['S_compiler'] env_neon['CC'] = env['S_compiler']
#env_neon.Append(CPPFLAGS = ["-DPNG_ARM_NEON"]) neon_sources = []
thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c"))
thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon_intrinsics.c"))
neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S"))
env.drivers_sources += neon_sources
else: else:
env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=0"]) env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=0"])
#env_png.add_source_files(env.drivers_sources, thirdparty_sources)
env.drivers_sources += thirdparty_sources # Concatenation necessary for neon objects it seems?
env_png.Append(CPPPATH = [thirdparty_dir])
# Godot source files # Godot source files
env_png.add_source_files(env.drivers_sources, "*.cpp") env_png.add_source_files(env.drivers_sources, "*.cpp")