Signed overflow optimization hazards in the kernel
Signed overflow optimization hazards in the kernel
Posted Aug 16, 2012 7:25 UTC (Thu) by hobocken (guest, #85839)Parent article: Signed overflow optimization hazards in the kernel
»Fortunately for the Linux kernel, GCC will generate the subtraction and comparison for -O1 or less. But optimizations can migrate to lower optimization levels over time, and there may come a time when either performance or energy-efficiency considerations motivate the Linux kernel to move to higher optimization levels. If that happens, what can be done?«
I don't understand the paragraph above. The kernel is already compiled
with -O2 or -Os.
From the top level Makefile:
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else
KBUILD_CFLAGS += -O2
endif
