mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 02:40:08 +00:00
parent
d5e7870532
commit
9b854e1496
@ -221,7 +221,12 @@ namespace Genode {
|
||||
* \param dst destination buffer
|
||||
* \param i byte value
|
||||
* \param size buffer size in bytes
|
||||
*
|
||||
* The compiler attribute is needed to prevent the
|
||||
* generation of a 'memset()' call in the 'while' loop
|
||||
* with gcc 10.
|
||||
*/
|
||||
__attribute((optimize("no-tree-loop-distribute-patterns")))
|
||||
inline void *memset(void *dst, int i, size_t size)
|
||||
{
|
||||
while (size--) ((char *)dst)[size] = i;
|
||||
|
@ -196,6 +196,9 @@ SRC_NOLINK += accessors.c \
|
||||
vnode_if.c \
|
||||
xlat_mbr_fstype.c
|
||||
|
||||
# prevent the generation of a 'memset()' call in 'memset()'
|
||||
CC_OPT_memset = -fno-tree-loop-distribute-patterns
|
||||
|
||||
INC_DIR += $(REP_DIR)/src/include \
|
||||
$(RUMP_BASE)/include \
|
||||
$(RUMP_PORT_DIR)/src/lib/libc/include \
|
||||
|
@ -13,6 +13,9 @@ LIBC_STRING_DIR = $(LIBC_DIR)/lib/libc/string
|
||||
|
||||
SRC_C = $(filter-out $(FILTER_OUT),$(notdir $(wildcard $(LIBC_STRING_DIR)/*.c)))
|
||||
|
||||
# prevent the generation of a 'memset()' call in 'memset()'
|
||||
CC_OPT_memset += -fno-tree-loop-distribute-patterns
|
||||
|
||||
include $(REP_DIR)/lib/mk/libc-common.inc
|
||||
|
||||
vpath %.c $(LIBC_STRING_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user