Fix several ZNeo compile issues. There are more. Pthreads: Fix a could of places where FAR was added when it is not appropriate. This matters to ZNeo which depends on definitions of NEAR and FAR points.

This commit is contained in:
Gregory Nutt 2019-06-03 13:06:58 -06:00
parent 25f42dd076
commit 84a57f8fa0
7 changed files with 46 additions and 24 deletions

View File

@ -62,11 +62,30 @@ Version 5.2.1
Version 5.3.0 Version 5.3.0
I started verification using 5.30 on June 2, 2019. There are lots of I started verification using 5.30 on June 2, 2019. To you this toolchain, I had to suppress the gmtime() and gmtimer() because these were causing an internal compiler error:
compile issues; most look like compiler problems (but only a single
internal error). Other errors are the consequence of commits to the time\lib_gmtimer.c
OS that did not follow C89. It will take some time to get a clean P2: Internal Error(0xB47E59):
compile again. Please contact Technical Support
This is the change to suppress building these files:
diff --git a/libs/libc/time/Make.defs b/libs/libc/time/Make.defs
index 5c9b746778..8327e287f4 100644
--- a/libs/libc/time/Make.defs
+++ b/libs/libc/time/Make.defs
@@ -44,7 +44,7 @@ ifdef CONFIG_LIBC_LOCALTIME
CSRCS += lib_localtime.c lib_asctime.c lib_asctimer.c lib_ctime.c
CSRCS += lib_ctimer.c
else
-CSRCS += lib_mktime.c lib_gmtime.c lib_gmtimer.c
+CSRCS += lib_mktime.c # lib_gmtime.c lib_gmtimer.c
ifdef CONFIG_TIME_EXTENDED
CSRCS += lib_dayofweek.c lib_asctime.c lib_asctimer.c lib_ctime.c
CSRCS += lib_ctimer.c
The consequence is, of course, that these interfaces will not be available
to applications.
Other Versions Other Versions
If you use any version of ZDS-II other than 5.1.1, 5.2.1, or 5.3.0 or If you use any version of ZDS-II other than 5.1.1, 5.2.1, or 5.3.0 or

View File

@ -57,7 +57,7 @@ ZDSVERSION := 5.2.1
endif endif
ifeq ($(CONFIG_WINDOWS_NATIVE),y) ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ZDSINSTALLDIR = $(INSTALLROOT)/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION) ZDSINSTALLDIR = $(INSTALLROOT)/ZDSII_ZNEO_$(ZDSVERSION)
INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"} INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
ZDSBINDIR = $(INSTALLDIR)\bin ZDSBINDIR = $(INSTALLDIR)\bin
ZDSSTDINCDIR = $(INSTALLDIR)\include\std ZDSSTDINCDIR = $(INSTALLDIR)\include\std
@ -73,7 +73,7 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ARCHUSRINCLUDES = -usrinc:. ARCHUSRINCLUDES = -usrinc:.
else else
WINTOOL = y WINTOOL = y
ZDSINSTALLDIR = $(INSTALLROOT)/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION) ZDSINSTALLDIR = $(INSTALLROOT)/ZDSII_ZNEO_$(ZDSVERSION)
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
ZDSBINDIR = $(INSTALLDIR)/bin ZDSBINDIR = $(INSTALLDIR)/bin
ZDSSTDINCDIR = $(INSTALLDIR)/include/std ZDSSTDINCDIR = $(INSTALLDIR)/include/std
@ -156,11 +156,11 @@ LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)z16f2800100zcog$(DELIM)scripts
# Tool names/pathes # Tool names/pathes
CROSSDEV = CROSSDEV =
CC = zneocc.exe CC = $(ZDSBINDIR)$(DELIM)zneocc.exe
CPP = gcc -E CPP = gcc -E
LD = zneolink.exe LD = $(ZDSBINDIR)$(DELIM)zneolink.exe
AS = zneoasm.exe AS = $(ZDSBINDIR)$(DELIM)zneoasm.exe
AR = zneolib.exe AR = $(ZDSBINDIR)$(DELIM)zneolib.exe
# File extensions # File extensions
@ -216,11 +216,11 @@ define PREPROCESS
endef endef
define COMPILE define COMPILE
$(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile) $(Q) "$(CC)" $(CFLAGS) `cygpath -w "$1"`
endef endef
define ASSEMBLE define ASSEMBLE
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile) $(Q) "$(AS)" $(AFLAGS) `cygpath -w "$1"`
endef endef
define MOVEOBJ define MOVEOBJ
@ -252,7 +252,8 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
# Windows-native host tools # Windows-native host tools
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative #MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
else else
# Linux/Cygwin host tool definitions # Linux/Cygwin host tool definitions
@ -264,7 +265,7 @@ else
# This is the tool to use for dependencies (i.e., none) # This is the tool to use for dependencies (i.e., none)
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mkwindeps.sh MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
# ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies # ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies

View File

@ -41,12 +41,13 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/wqueue.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdbool.h> #include <stdbool.h>
#include <signal.h> #include <signal.h>
#include <nuttx/wqueue.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
@ -281,7 +282,7 @@ int nxsig_kill(pid_t pid, int signo);
* This is an internal OS interface. It is functionally equivalent to * This is an internal OS interface. It is functionally equivalent to
* sigwaitinfo() except that: * sigwaitinfo() except that:
* *
* - It is not a cancellaction point, and * - It is not a cancellation point, and
* - It does not modify the errno value. * - It does not modify the errno value.
* *
* Input Parameters: * Input Parameters:
@ -403,7 +404,7 @@ int nxsig_nanosleep(FAR const struct timespec *rqtp,
* This is an internal OS interface. It is functionally equivalent to * This is an internal OS interface. It is functionally equivalent to
* the standard sleep() application interface except that: * the standard sleep() application interface except that:
* *
* - It is not a cancellaction point, and * - It is not a cancellation point, and
* - There is no check that the action of the signal is to invoke a * - There is no check that the action of the signal is to invoke a
* signal-catching function or to terminate the process. * signal-catching function or to terminate the process.
* *
@ -437,7 +438,7 @@ unsigned int nxsig_sleep(unsigned int seconds);
* This is an internal OS interface. It is functionally equivalent to * This is an internal OS interface. It is functionally equivalent to
* the standard nxsig_usleep() application interface except that: * the standard nxsig_usleep() application interface except that:
* *
* - It is not a cancellaction point, and * - It is not a cancellation point, and
* - It does not modify the errno value. * - It does not modify the errno value.
* *
* See the description of usleep() for additional information that is not * See the description of usleep() for additional information that is not

View File

@ -475,8 +475,8 @@ int pthread_attr_getstack(FAR pthread_attr_t *attr,
/* Get run-time stack address and size */ /* Get run-time stack address and size */
FAR void *pthread_get_stackaddr_np(FAR pthread_t thread); FAR void *pthread_get_stackaddr_np(pthread_t thread);
ssize_t pthread_get_stacksize_np(FAR pthread_t thread); ssize_t pthread_get_stacksize_np(pthread_t thread);
/* To create a thread object and runnable thread, a routine must be specified /* To create a thread object and runnable thread, a routine must be specified
* as the new thread's start routine. An argument may be passed to this * as the new thread's start routine. An argument may be passed to this

View File

@ -63,7 +63,8 @@
* *
****************************************************************************/ ****************************************************************************/
int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, FAR size_t *stacksize) int pthread_attr_getstacksize(FAR const pthread_attr_t *attr,
FAR size_t *stacksize)
{ {
int ret; int ret;

View File

@ -63,7 +63,7 @@
* *
****************************************************************************/ ****************************************************************************/
void *pthread_get_stackaddr_np(FAR pthread_t thread) void *pthread_get_stackaddr_np(pthread_t thread)
{ {
FAR struct pthread_tcb_s *tcb = FAR struct pthread_tcb_s *tcb =
(FAR struct pthread_tcb_s *)sched_gettcb((pid_t)thread); (FAR struct pthread_tcb_s *)sched_gettcb((pid_t)thread);

View File

@ -65,7 +65,7 @@
* *
****************************************************************************/ ****************************************************************************/
ssize_t pthread_get_stacksize_np(FAR pthread_t thread) ssize_t pthread_get_stacksize_np(pthread_t thread)
{ {
FAR struct pthread_tcb_s *tcb = FAR struct pthread_tcb_s *tcb =
(FAR struct pthread_tcb_s *)sched_gettcb((pid_t)thread); (FAR struct pthread_tcb_s *)sched_gettcb((pid_t)thread);