=== modified file 'gcc/config/arm/arm.c' --- gcc/config/arm/arm.c 2013-02-28 10:26:41 +0000 +++ gcc/config/arm/arm.c 2013-03-04 08:39:02 +0000 @@ -280,6 +280,8 @@ static void arm_canonicalize_comparison (int *code, rtx *op0, rtx *op1, bool op0_preserve_value); +static unsigned HOST_WIDE_INT arm_asan_shadow_offset (void); + /* Table of machine attributes. */ static const struct attribute_spec arm_attribute_table[] = @@ -649,6 +651,9 @@ #define TARGET_CANONICALIZE_COMPARISON \ arm_canonicalize_comparison +#undef TARGET_ASAN_SHADOW_OFFSET +#define TARGET_ASAN_SHADOW_OFFSET arm_asan_shadow_offset + struct gcc_target targetm = TARGET_INITIALIZER; /* Obstack for minipool constant handling. */ @@ -27393,4 +27398,12 @@ } +/* Implement the TARGET_ASAN_SHADOW_OFFSET hook. */ + +static unsigned HOST_WIDE_INT +arm_asan_shadow_offset (void) +{ + return (unsigned HOST_WIDE_INT) 1 << 29; +} + #include "gt-arm.h" === modified file 'gcc/config/arm/linux-eabi.h' --- gcc/config/arm/linux-eabi.h 2013-01-10 20:38:27 +0000 +++ gcc/config/arm/linux-eabi.h 2013-03-26 09:59:11 +0000 @@ -84,10 +84,14 @@ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) +#undef ASAN_CC1_SPEC +#define ASAN_CC1_SPEC "%{fsanitize=*:-funwind-tables}" + #undef CC1_SPEC #define CC1_SPEC \ - LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ - GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) + LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC, \ + GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \ + ANDROID_CC1_SPEC) #define CC1PLUS_SPEC \ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) === modified file 'libsanitizer/configure.tgt' --- libsanitizer/configure.tgt 2013-02-11 23:13:37 +0000 +++ libsanitizer/configure.tgt 2013-03-04 08:39:02 +0000 @@ -29,6 +29,8 @@ ;; sparc*-*-linux*) ;; + arm*-*-linux*) + ;; x86_64-*-darwin[1]* | i?86-*-darwin[1]*) TSAN_SUPPORTED=no ;;