compiler.h: optimization option is not supported before GCC 4.6

-fno-tree-loop-distribute-patterns is not supported before
GCC 4.6

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
wangbowen6 2022-04-22 15:37:21 +08:00 committed by Xiang Xiao
parent 185b1cb1b7
commit b9827f7ede

View File

@ -379,9 +379,11 @@
# if defined(__clang__)
# define no_builtin(n) __attribute__((no_builtin(n)))
# else
# elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4)
# define no_builtin(n) __attribute__((__optimize__("-fno-tree-loop-distribute-patterns")))
#endif
# else
# define no_builtin(n)
# endif
/* SDCC-specific definitions ************************************************/