Changeset 630b9d35 in mainline for kernel/generic/include/memstr.h


Ignore:
Timestamp:
2014-04-21T11:19:29Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
170e181
Parents:
5792d6e
Message:

Unbreak link-time-optimization builds

Apparently, newer version of GCC discards more functions that it
is supposed to and thus it is necessary to explicitly say that
memset & co implementations shall not be discarded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/memstr.h

    r5792d6e r630b9d35  
    3737
    3838#include <typedefs.h>
     39#include <cc.h>
     40
     41#ifdef CONFIG_LTO
     42#define DO_NOT_DISCARD ATTRIBUTE_USED
     43#else
     44#define DO_NOT_DISCARD
     45#endif
    3946
    4047#define memset(dst, val, cnt)  __builtin_memset((dst), (val), (cnt))
     
    4350extern void memsetb(void *, size_t, uint8_t);
    4451extern void memsetw(void *, size_t, uint16_t);
    45 extern void *memmove(void *, const void *, size_t);
     52extern void *memmove(void *, const void *, size_t) DO_NOT_DISCARD;
    4653
    4754#endif
Note: See TracChangeset for help on using the changeset viewer.