check_consistency should be disabled for GCC 5 and above since there is
no fixed PIC register in GCC 5 and above. Check __GNUC_PREREQ (5,0)
instead OPTIMIZE_FOR_GCC_5 since OPTIMIZE_FOR_GCC_5 is false with
-fno-omit-frame-pointer.
# define EXTRAVAR_5
#endif
-/* Consistency check for position-independent code. */
-#if defined __PIC__ && !defined OPTIMIZE_FOR_GCC_5
+/* Consistency check for position-independent code. Disabled for GCC 5
+ and above since there is no fixed PIC register in GCC 5 and above. */
+#if defined __PIC__ && !__GNUC_PREREQ (5,0)
# define check_consistency() \
({ int __res; \
__asm__ __volatile__ \