mirror of
https://github.com/OpenAMP/libmetal.git
synced 2026-08-18 11:29:49 +08:00
lib/errno.h: defined(__ARMCC_VERSION) for use GCC compile lib/autmoic:fix compiler error: nuttx/include/metal/compiler/gcc/atomic.h:19:13: error: conflicting type qualifiers for 'atomic_flag' 19 | typedef int atomic_flag; | ^~~~~~~~~~~ In file included from nuttx/include/nuttx/net/netdev_lowerhalf.h:38, from virtio/virtio-net.c:33: prebuilts/gcc/linux/arm/lib/gcc/arm-none-eabi/13.2.1/include/ stdatomic.h:233:3: note: previous declaration of 'atomic_flag' with type 'atomic_flag' 233 | } atomic_flag; | ^~~~~~~~~~~ nuttx/include/metal/compiler/gcc/atomic.h:20:14: error: conflicting type qualifiers for 'atomic_char' 20 | typedef char atomic_char; ^~~~~~~~~~~ Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
26 lines
594 B
C
26 lines
594 B
C
/*
|
|
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
/*
|
|
* @file compiler.h
|
|
* @brief Compiler specific primitives for libmetal.
|
|
*/
|
|
|
|
#ifndef __METAL_COMPILER__H__
|
|
#define __METAL_COMPILER__H__
|
|
|
|
#if defined(__GNUC__)
|
|
# include <metal/compiler/gcc/compiler.h>
|
|
#elif defined(__ICCARM__)
|
|
# include <metal/compiler/iar/compiler.h>
|
|
#elif defined(__ARMCC_VERSION)
|
|
# error "MDK-ARM ARMCC compiler requires the GNU extensions to work correctly"
|
|
#else
|
|
# error "Missing compiler support"
|
|
#endif
|
|
|
|
#endif /* __METAL_COMPILER__H__ */
|