http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60892
Bug ID: 60892 Summary: GCC fails to build with Linux 2.6.21 headers. Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: toojays at toojays dot net CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org I got the following errors while trying to build gcc-4.9 (from the 20140416 snapshot) for a Linux 2.6.21 system (Maemo 4 / diablo). Configuration was run via ../gcc-4.9-20140416/configure --program-suffix=-4.9 --disable-shared --enable-languages=c,c++ --enable-checking=release I got not complaints from the, but the build failed at: xgcc -B/home/maemo/gcc-4.9-20140416/build-dir/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.9-20140416/libquadmath -I ../../../gcc-4.9-20140416/libquadmath/../include -g -O2 -MT math/catanq.lo -MD -MP -MF $depbase.Tpo -c -o math/catanq.lo ../../../gcc-4.9-20140416/libquadmath/math/catanq.c &&\ mv -f $depbase.Tpo $depbase.Plo ../../../../gcc-4.9-20140416/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:390:30: error: 'EVIOCGREP' was not declared in this scope unsigned IOCTL_EVIOCGREP = EVIOCGREP; ^ ../../../../gcc-4.9-20140416/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:399:30: error: 'EVIOCSREP' was not declared in this scope unsigned IOCTL_EVIOCSREP = EVIOCSREP; ^ ../../../../gcc-4.9-20140416/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:682:36: error: 'FS_IOC_GETFLAGS' was not declared in this scope unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS; ^ ../../../../gcc-4.9-20140416/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:683:38: error: 'FS_IOC_GETVERSION' was not declared in this scope unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION; ^ ../../../../gcc-4.9-20140416/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:684:36: error: 'FS_IOC_SETFLAGS' was not declared in this scope unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS; ^ ../../../../gcc-4.9-20140416/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:685:38: error: 'FS_IOC_SETVERSION' was not declared in this scope unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION; http://gcc.gnu.org/install/specific.html does not mention a minimum kernel version for GCC. http://gcc.gnu.org/install/configure.html does not explain how to disable building the sanitizer. I don't particularly mind if I can't have the sanitizer, but expect the GCC configure script to detect that, and disable the sanitizer build automatically. This bug is similar in spirit to bug 59068, but I'm filing a separate issue since the root cause is different.