Index: libraries/source/nvtt/README.txt =================================================================== --- libraries/source/nvtt/README.txt +++ libraries/source/nvtt/README.txt @@ -4,6 +4,8 @@ cmake-freebsd.patch (fixes build on FreeBSD) issue188.patch (fixes http://code.google.com/p/nvidia-texture-tools/issues/detail?id=188) issue261.patch (fixes https://github.com/castano/nvidia-texture-tools/issues/261) + pr270.patch (from https://github.com/castano/nvidia-texture-tools/pull/270) rpath.patch (fixes .so file search paths for bundled copy) win-shared-build.patch (adapted from https://github.com/castano/nvidia-texture-tools/pull/285) musl-build.patch (fixes build on musl linux; contributed by voroskoi, with a part by leper, see https://code.wildfiregames.com/D2491) + arm-build.patch (fixes build on non-aarch64 arm, TODO send upstream after Stan tests it) Index: libraries/source/nvtt/patches/arm-build.patch =================================================================== --- /dev/null +++ libraries/source/nvtt/patches/arm-build.patch @@ -0,0 +1,28 @@ +--- + src/nvcore/Debug.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/nvcore/Debug.cpp b/src/nvcore/Debug.cpp +index 7379971..f96b937 100644 +--- a/src/nvcore/Debug.cpp ++++ b/src/nvcore/Debug.cpp +@@ -665,6 +665,9 @@ namespace + # elif NV_CPU_PPC + ucontext_t * ucp = (ucontext_t *)secret; + return (void *) ucp->uc_mcontext.regs->nip; ++# elif NV_CPU_ARM ++ ucontext_t * ucp = (ucontext_t *)secret; ++ return (void *) ucp->uc_mcontext.arm_pc; + # elif NV_CPU_AARCH64 + ucontext_t * ucp = (ucontext_t *)secret; + return (void *) ucp->uc_mcontext.pc; +@@ -1021,7 +1024,7 @@ void debug::dumpCallstack(MessageHandler *messageHandler, int callstackLevelsToS + writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack + + for (uint i = 0; i < lines.count(); i++) { +- messageHandler->log(lines[i], NULL); ++ messageHandler->log(lines[i], va_list()); + delete lines[i]; + } + } +-- Index: libraries/source/nvtt/patches/pr270.patch =================================================================== --- /dev/null +++ libraries/source/nvtt/patches/pr270.patch @@ -0,0 +1,21 @@ +--- + src/nvconfig.h.in | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/nvconfig.h.in b/src/nvconfig.h.in +index 16da646..6a8ad2c 100644 +--- a/src/nvconfig.h.in ++++ b/src/nvconfig.h.in +@@ -1,7 +1,11 @@ + #ifndef NV_CONFIG + #define NV_CONFIG + ++#if NV_OS_DARWIN && !NV_OS_IOS ++#cmakedefine01 HAVE_UNISTD_H ++#else + #cmakedefine HAVE_UNISTD_H ++#endif + #cmakedefine HAVE_STDARG_H + #cmakedefine HAVE_SIGNAL_H + #cmakedefine HAVE_EXECINFO_H +-- Index: libraries/source/nvtt/src/src/nvconfig.h.in =================================================================== --- libraries/source/nvtt/src/src/nvconfig.h.in +++ libraries/source/nvtt/src/src/nvconfig.h.in @@ -1,7 +1,11 @@ #ifndef NV_CONFIG #define NV_CONFIG +#if NV_OS_DARWIN && !NV_OS_IOS +#cmakedefine01 HAVE_UNISTD_H +#else #cmakedefine HAVE_UNISTD_H +#endif #cmakedefine HAVE_STDARG_H #cmakedefine HAVE_SIGNAL_H #cmakedefine HAVE_EXECINFO_H Index: libraries/source/nvtt/src/src/nvcore/Debug.cpp =================================================================== --- libraries/source/nvtt/src/src/nvcore/Debug.cpp +++ libraries/source/nvtt/src/src/nvcore/Debug.cpp @@ -665,6 +665,9 @@ # elif NV_CPU_PPC ucontext_t * ucp = (ucontext_t *)secret; return (void *) ucp->uc_mcontext.regs->nip; +# elif NV_CPU_ARM + ucontext_t * ucp = (ucontext_t *)secret; + return (void *) ucp->uc_mcontext.arm_pc; # elif NV_CPU_AARCH64 ucontext_t * ucp = (ucontext_t *)secret; return (void *) ucp->uc_mcontext.pc; @@ -1021,7 +1024,7 @@ writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack for (uint i = 0; i < lines.count(); i++) { - messageHandler->log(lines[i], NULL); + messageHandler->log(lines[i], va_list()); delete lines[i]; } }