Hi,
after recent sanitzer library merge to GCC we have noticed, that for older kernel versions ARM_VFPREGS_SIZE is not defined that leads to such error on arm-none-linux-gnueabi:
libtool: compile: /tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/./gcc/xgcc -shared-libgcc -B/tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/g cc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/./gcc -nostdinc++ -L/tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/arm-none-linux-gnueabi/ libstdc++-v3/src -L/tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/arm-none-linux-gnueabi/libstdc++-v3/src/.libs -L/tmp/1800227_1.tmpdir/ aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-linux-gnueabi/gcc3/arm-none-linux-gnueabi/libstdc++-v3/libsupc++/.libs -B/tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/t ools/arm-none-linux-gnueabi/bin/ -B/tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-linux-gnueabi/lib/ -isystem /tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gc c-fsf-gccsrc/tools/arm-none-linux-gnueabi/include -isystem /tmp/1800227_1.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/arm-none-linux-gnueabi/sys-include -D_GNU_SOURCE -D_DEBU G -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_RPC_XDR_H=1 -DHAVE_TIRPC_RPC_XDR_H=0 -I. -I/tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsr c/libsanitizer/sanitizer_common -I.. -I /tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libsanitizer/include -isystem /tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/ gccsrc/libsanitizer/include/system -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -fun wind-tables -fvisibility=hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v3/include/arm-none-linux-gnueabi -I/tmp/1800227_1.tmpdir/aci-gcc-fsf/sources /gcc-fsf/gccsrc/libsanitizer/../libstdc++-v3/libsupc++ -std=gnu++11 -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE -I /tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/ libsanitizer/../libbacktrace -I ../libbacktrace -I /tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libsanitizer/../include -include /tmp/1800227_1.tmpdir/aci-gcc-fsf/so urces/gcc-fsf/gccsrc/libsanitizer/libbacktrace/backtrace-rename.h -g -O2 -D_GNU_SOURCE -MT sanitizer_platform_limits_posix.lo -MD -MP -MF .deps/sanitizer_platform_limits_posix.T po -c /tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -fPIC -DPIC -o .libs/sanitizer_platform_limits_p osix.o /tmp/1800227_1.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:326:44: error: 'ARM_VFPREGS_SIZE' was not declared in t his scope unsigned struct_user_vfpregs_struct_sz = ARM_VFPREGS_SIZE; ^~~~~~~~~~~~~~~~ make[4]: *** [sanitizer_platform_limits_posix.lo] Error 1
After some investigation, I found out that ptrace_getvfpregs and ptrace_setvfpregs have a guard against such an issue:
int ptrace_getfpxregs = -1; int ptrace_setfpxregs = -1; #endif // PTRACE_GETFPXREGS/PTRACE_SETFPXREGS +#if defined(PTRACE_GETVFPREGS) && defined(PTRACE_SETVFPREGS) + int ptrace_getvfpregs = PTRACE_GETVFPREGS; + int ptrace_setvfpregs = PTRACE_SETVFPREGS; +#else + int ptrace_getvfpregs = -1; + int ptrace_setvfpregs = -1; +#endif
Perhaps we could do the same thing for ARM_VFPREGS_SIZE?