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>
Refactor all processor headers which had the same content
into a generic set, to reduce the number of duplicates.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The predefined macro __CC_ARM available on 5.x is migrated to the
macro __arm__ for the version 6.x. Add defines to support both versions.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
The lib/atomic.h exports memory_order enum into the global namespace,
but none of its enumerators. According to Section 7.3.3 "The using
declaration" of the C++ standard: "specifying an enumeration name
in a using-declaration does not declare its enumerators in
the using-declaration's declarative region." See also:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0943r1.html
Signed-off-by: Sergei Korneichuk <sergei.korneichuk@amd.com>
The MDK-ARM ARMCC doesn't provide the "stdatomic.h", however, with the
option "--gnu", it can support the standard gcc atomic routines.
This patch makes the armcc compiler use the "compiler/gcc/atomic.h"
Signed-off-by: Haithem Rahmani <haithem.rahmani@st.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
This is necessary for the use of libmetal together with C++ clients that
require <atomic> as the replacement headers create a conflict with
<atomic>.
Signed-off-by: Simon Leiner <simon@leiner.me>
Use cpp atomic if cpp compiler is used as the
c atomic definition doesn't work with the cpp
atomic definition.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
This change will save compilation time from looking into the directory
containing the current file for the header files.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Allow using libmetal in c++ program.
When c++ program uses libmetal, it will use
the default atomic impelementation defined
in libmetal library.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
This commit sets up the basic infrastructure necessary for the project:
- Documentation generation and installation using Doxygen.
- Configuration options and template headers with option substitution.
- Self-tests using cmake add_test() commands.
- Configurable selection, build, and install of static and shared
libraries, as well as handling for dependencies (libsysfs,
libhugetlbfs) for linux builds.
- Cross compilation for bare-metal and Linux target platforms.
- Basic infrastructure for initialization, logging, etc. and
separation between common, and system specific code.