native_simulator: Get latest from upstream
Align with native_simulator's upstream main 3ccb09ec00e291f699219c0e3f5b14b6b1c7ceb6 Which includes: 3ccb09e nsi_errno: Add new API to get the current host side errno 32eab87 Makefile: Ser a macro to distinguish build in runner context Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
0f1d816c3c
commit
71b9d16558
3 changed files with 20 additions and 2 deletions
|
@ -68,8 +68,8 @@ NSI_CPPFLAGS?=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTE
|
||||||
|
|
||||||
NO_PIE_CO:=-fno-pie -fno-pic
|
NO_PIE_CO:=-fno-pie -fno-pic
|
||||||
DEPENDFLAGS:=-MMD -MP
|
DEPENDFLAGS:=-MMD -MP
|
||||||
COMMON_BUILD_FLAGS:=${NSI_DEBUG} ${NSI_WARNINGS} ${NSI_OPT} ${NO_PIE_CO} -DNSI_N_CPUS=${NSI_N_CPUS}\
|
COMMON_BUILD_FLAGS:=-DNSI_RUNNER_BUILD ${NSI_DEBUG} ${NSI_WARNINGS} ${NSI_OPT} ${NO_PIE_CO} \
|
||||||
-ffunction-sections -fdata-sections ${DEPENDFLAGS} ${NSI_BUILD_OPTIONS}
|
-DNSI_N_CPUS=${NSI_N_CPUS} -ffunction-sections -fdata-sections ${DEPENDFLAGS} ${NSI_BUILD_OPTIONS}
|
||||||
CFLAGS:=-std=c11 ${COMMON_BUILD_FLAGS} ${NSI_BUILD_C_OPTIONS}
|
CFLAGS:=-std=c11 ${COMMON_BUILD_FLAGS} ${NSI_BUILD_C_OPTIONS}
|
||||||
CXXFLAGS:=${COMMON_BUILD_FLAGS} ${NSI_BUILD_CXX_OPTIONS}
|
CXXFLAGS:=${COMMON_BUILD_FLAGS} ${NSI_BUILD_CXX_OPTIONS}
|
||||||
FINALLINK_FLAGS:=${NO_PIE_CO} -no-pie ${NSI_WARNINGS} \
|
FINALLINK_FLAGS:=${NO_PIE_CO} -no-pie ${NSI_WARNINGS} \
|
||||||
|
|
|
@ -103,7 +103,13 @@
|
||||||
#define NSI_ERRNO_MID_EOVERFLOW 139 /**< Value overflow */
|
#define NSI_ERRNO_MID_EOVERFLOW 139 /**< Value overflow */
|
||||||
#define NSI_ERRNO_MID_ECANCELED 140 /**< Operation canceled */
|
#define NSI_ERRNO_MID_ECANCELED 140 /**< Operation canceled */
|
||||||
|
|
||||||
|
/* Convert a errno value to the intermediate represetation to pass it to the other side */
|
||||||
int nsi_errno_to_mid(int err);
|
int nsi_errno_to_mid(int err);
|
||||||
|
/* Convert a errno value from the intermediate representation into the local libC value */
|
||||||
int nsi_errno_from_mid(int err);
|
int nsi_errno_from_mid(int err);
|
||||||
|
/* Return the middleground representation of the current host libC errno */
|
||||||
|
int nsi_get_errno_in_mid(void);
|
||||||
|
/* Return the local representation of the current host libC errno */
|
||||||
|
int nsi_host_get_errno(void);
|
||||||
|
|
||||||
#endif /* NSI_COMMON_SRC_NSI_ERRNO_H */
|
#endif /* NSI_COMMON_SRC_NSI_ERRNO_H */
|
||||||
|
|
|
@ -128,3 +128,15 @@ int nsi_errno_from_mid(int err)
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(NSI_RUNNER_BUILD)
|
||||||
|
int nsi_get_errno_in_mid(void)
|
||||||
|
{
|
||||||
|
return nsi_errno_to_mid(errno);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int nsi_host_get_errno(void)
|
||||||
|
{
|
||||||
|
return nsi_errno_from_mid(nsi_get_errno_in_mid());
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue