diff options
author | Jose Ruiz <ruiz@adacore.com> | 2008-07-30 15:03:32 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-07-30 15:03:32 +0200 |
commit | f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5 (patch) | |
tree | c8d430dcadbd4486ea1435759e643eff045f98f3 /gcc/ada/adaint.c | |
parent | 88462e8132982857e69c9e7f0d8481f8443e8bbc (diff) | |
download | gcc-f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5.zip gcc-f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5.tar.gz gcc-f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5.tar.bz2 |
2008-07-30 Jose Ruiz <ruiz@adacore.com>
* adaint.c
(__gnat_file_exists): Do not use __gnat_stat for RTX.
(__main for RTX in RTSS mode): Create this dummy procedure symbol to
avoid the use of this symbol from libgcc.a in RTX kernel mode.
* cio.c
(put_int, put_int_stderr, put_char, put_char_stderr): For RTX we call
the function RtPrintf for console output.
* argv.c Do not use the environ variable for RTX.
* gnatlink.adb (gnatlink): The part that handles the --RTS option has
been moved before the call to Osint.Add_Default_Search_Dirs in order
to take into account the flags in system.ads (RTX_RTSS_Kernel_Module)
from the appropriate run time.
* targparm.ads
(RTX_RTSS_Kernel_Module_On_Target): Add this flag that is set to True if
target is a RTSS module for RTX.
* targparm.adb (Targparm_Tags, RTX_Str, Targparm_Str): Add tag RTX for
RTX_RTSS_Kernel_Module
(Get_Target_Parameters): Add processing of RTX_RTSS_Kernel_Module flag.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for RTX): Use gcc
exception handling mechanism for Windows and RTX in Win32 mode, but
not for RTX in kernel mode (RTSS).
(LIBGNAT_SRCS): Remove ada.h
From-SVN: r138305
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 8f7bcab..29f649a 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -1061,6 +1061,7 @@ __gnat_readdir (DIR *dirp, char *buffer, int *len) /* Not supported in RTX */ return NULL; + #elif defined (__MINGW32__) struct _tdirent *dirent = _treaddir ((_TDIR*)dirp); @@ -1606,7 +1607,7 @@ __gnat_stat (char *name, struct stat *statbuf) int __gnat_file_exists (char *name) { -#if defined (__MINGW32__) && !defined (RTX) +#ifdef __MINGW32__ /* On Windows do not use __gnat_stat() because a bug in Microsoft _stat() routine. When the system time-zone is set with a negative offset the _stat() routine fails on specific files like CON: */ @@ -3048,11 +3049,14 @@ __gnat_sals_init_using_constructors () #endif } +#ifdef RTX + /* In RTX mode, the procedure to get the time (as file time) is different in RTSS mode and Win32 mode. In order to avoid duplicating an Ada file, we introduce an intermediate procedure to link against the corresponding one in each situation. */ -#ifdef RTX + +extern void GetTimeAsFileTime(LPFILETIME pTime); void GetTimeAsFileTime(LPFILETIME pTime) { @@ -3062,6 +3066,16 @@ void GetTimeAsFileTime(LPFILETIME pTime) GetSystemTimeAsFileTime (pTime); /* w32 interface */ #endif } + +#ifdef RTSS +/* Add symbol that is required to link. It would otherwise be taken from + libgcc.a and it would try to use the gcc constructors that are not + supported by Microsoft linker. */ + +extern void __main (void); + +void __main (void) {} +#endif #endif #if defined (linux) || defined(__GLIBC__) |