ARC: MWDT: workaround paddr_t defined in both Zephyr and toolchain
MWDT provides paddr_t type and it conflicts witn Zephyr definition: - Zephyr defines paddr_t as a uintptr_t - MWDT defines paddr_t as a unsigned long This causes extra warnings. However we can safely define paddr_t as a unsigned long for the case when MWDT toolchain is used as they are both unsighned, have same size and aligning. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
e0a9a93cb5
commit
8097989a01
2 changed files with 28 additions and 1 deletions
27
include/arch/arc/arc_addr_types.h
Normal file
27
include/arch/arc/arc_addr_types.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2021 Synopsys.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_
|
||||
#define ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
/*
|
||||
* MWDT provides paddr_t type and it conflicts witn Zephyr definition:
|
||||
* - Zephyr defines paddr_t as a uintptr_t
|
||||
* - MWDT defines paddr_t as a unsigned long
|
||||
* This causes extra warnings. However we can safely define
|
||||
* paddr_t as a unsigned long for the case when MWDT toolchain is used as
|
||||
* they are both unsighned, have same size and aligning.
|
||||
*/
|
||||
#ifdef __CCAC__
|
||||
typedef unsigned long paddr_t;
|
||||
typedef void *vaddr_t;
|
||||
#else
|
||||
#include <arch/common/addr_types.h>
|
||||
#endif
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
#endif /* ZEPHYR_INCLUDE_ARCH_ARC_ADDR_TYPES_H_ */
|
|
@ -29,7 +29,7 @@
|
|||
#include <arch/arc/v2/aux_regs.h>
|
||||
#include <arch/arc/v2/arcv2_irq_unit.h>
|
||||
#include <arch/arc/v2/asm_inline.h>
|
||||
#include <arch/common/addr_types.h>
|
||||
#include <arch/arc/arc_addr_types.h>
|
||||
#include <arch/arc/v2/error.h>
|
||||
|
||||
#ifdef CONFIG_ARC_CONNECT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue