According to the address-sanitizer home page it comes only with the gcc 4.8 or above. Isn't there anyway of using it with gcc 4.7?
-
1Do you think the official homepage is lying? – Lightness Races in Orbit Jul 19 '15 at 17:48
1 Answers
No, there is no reliable way (to get ASAN before GCC 4.8). ASAN requires compiler support and is very intimately connected to your particular compiler (and version, and host and target systems, and specific configuration, etc...)
In other words, try to compile a recent GCC (that is, GCC 5.2 in july 2015; use that since ASAN did progress since 4.8 and you'll get more -fsanitize=
options in recent versions of GCC) from its downloaded source code. See hints here & there. You should try some recent Linux distribution.
(on Linux or other POSIX systems, you don't need root privileges to configure, compile, and install gcc-mine-5
in $HOME/soft/
; you need appropriate ../gcc-5.2/configure
options, notably --prefix=$HOME/soft --program-suffix=-mine-5
, then add $HOME/soft/bin/
in your PATH
then run with CC=gcc-mine-5
e.g. for make
)

- 1
- 1

- 223,805
- 18
- 296
- 547