util: Solve "invalid target attribute" building error
When building SPDK on aarch64, met error about invalid target attribute 'bmi', 'arch=core2' and 'arch=atom'. Signed-off-by: Richael Zhuang <richael.zhuang@arm.com> Change-Id: I369e61005e6550045e24d84147a71b5dd25c4a52 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466848 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
be04cfc342
commit
d40944a256
@ -60,7 +60,8 @@ extern "C" {
|
||||
/* The following will automatically generate several version of
|
||||
* this function, targeted at different architectures. This
|
||||
* is only supported by GCC 6 or newer. */
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__)
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__) \
|
||||
&& (defined(__i386__) || defined(__x86_64__))
|
||||
__attribute__((target_clones("bmi", "arch=core2", "arch=atom", "default")))
|
||||
#endif
|
||||
static inline uint32_t
|
||||
@ -82,7 +83,8 @@ spdk_align32pow2(uint32_t x)
|
||||
/* The following will automatically generate several version of
|
||||
* this function, targeted at different architectures. This
|
||||
* is only supported by GCC 6 or newer. */
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__)
|
||||
#if defined(__GNUC__) && __GNUC__ >= 6 && !defined(__clang__) \
|
||||
&& (defined(__i386__) || defined(__x86_64__))
|
||||
__attribute__((target_clones("bmi", "arch=core2", "arch=atom", "default")))
|
||||
#endif
|
||||
static inline uint64_t
|
||||
|
Loading…
Reference in New Issue
Block a user