> In principle, you could try --disable-libsanitizer > --disable-target-libsanitizer but I am not sure whether that works, a > fortnight ago, Janne remarked at #gcc that it didn't seem to work – maybe you > have more luck. > > Your Linux 2.6.18 is already quite old (September 2007) thus I wouldn't be > surprised that that's the reason. According to > https://github.com/torvalds/linux/commit/cdd6c482c9ff9c55475ee7392ec8f672eddb7be6 > , the file "perf_event.h" was renamed from "perf_counter.h" in September > 2009 (2.6.32?). > > Regarding Binutils: "GNU binutils – Necessary in some circumstances, optional > in others. See the host/target specific instructions for your platform for > the exact requirements." Thus, that's kind of documented at > http://gcc.gnu.org/install/prerequisites.html – even if it is not that > helpful. – I don't know how old your binutils were.
That’s not documented at all. I have read the host/target specific instructions, but there is no mention of a minimal binutils and/or Linux kernel versions for Linux targets or x86-linux or x86_64-linux. Not a word. I don’t like that building GCC has such strict dependencies on kernels/binutils/whatever versions. E.g., Linux 2.6.18 is the kernel in Redhat’s RHEL 5, which is still sold and supported. But that’s only my opinion. However, the fact that it is not tested/detected at compile-time is uncool. The fact that it is not documented is, plain and simple, bad behavior. FX