From 0cf1a41a2f387dec9dcd15a714131a6d9fdf1a93 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 10 Dec 2009 22:26:20 +0000 Subject: s-linux-sparc.ads: New file. * s-linux-sparc.ads: New file. * gcc-interface/Makefile.in (SPARC/Linux): Use it. From-SVN: r155144 --- gcc/ada/ChangeLog | 5 ++ gcc/ada/gcc-interface/Makefile.in | 2 +- gcc/ada/s-linux-sparc.ads | 120 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 gcc/ada/s-linux-sparc.ads (limited to 'gcc/ada') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6334bbc..cf22b66 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2009-12-10 Eric Botcazou + + * s-linux-sparc.ads: New file. + * gcc-interface/Makefile.in (SPARC/Linux): Use it. + 2009-12-04 Eric Botcazou * gcc-interface/trans.c (add_decl_expr): At toplevel, mark the diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 975db0f..c307283 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1797,7 +1797,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),) a-intnam.ads. -- +-- -- +-- -- +------------------------------------------------------------------------------ + +-- This is the SPARC version of this package + +-- This package encapsulates cpu specific differences between implementations +-- of GNU/Linux, in order to share s-osinte-linux.ads. + +-- PLEASE DO NOT add any with-clauses to this package or remove the pragma +-- Preelaborate. This package is designed to be a bottom-level (leaf) package + +with Interfaces.C; + +package System.Linux is + pragma Preelaborate; + + ----------- + -- Errno -- + ----------- + + EAGAIN : constant := 11; + EINTR : constant := 4; + EINVAL : constant := 22; + ENOMEM : constant := 12; + EPERM : constant := 1; + ETIMEDOUT : constant := 110; + + ------------- + -- Signals -- + ------------- + + SIGHUP : constant := 1; -- hangup + SIGINT : constant := 2; -- interrupt (rubout) + SIGQUIT : constant := 3; -- quit (ASCD FS) + SIGILL : constant := 4; -- illegal instruction (not reset) + SIGTRAP : constant := 5; -- trace trap (not reset) + SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future + SIGIOT : constant := 6; -- IOT instruction + SIGEMT : constant := 7; -- EMT + SIGFPE : constant := 8; -- floating point exception + SIGKILL : constant := 9; -- kill (cannot be caught or ignored) + SIGBUS : constant := 10; -- bus error + SIGSEGV : constant := 11; -- segmentation violation + SIGSYS : constant := 12; -- bad system call + SIGPIPE : constant := 13; -- write on a pipe with no one to read it + SIGALRM : constant := 14; -- alarm clock + SIGTERM : constant := 15; -- software termination signal from kill + SIGURG : constant := 16; -- urgent condition on IO channel + SIGSTOP : constant := 17; -- stop (cannot be caught or ignored) + SIGTSTP : constant := 18; -- user stop requested from tty + SIGCONT : constant := 19; -- stopped process has been continued + SIGCHLD : constant := 20; -- child status change + SIGCLD : constant := 20; -- alias for SIGCHLD + SIGTTIN : constant := 21; -- background tty read attempted + SIGTTOU : constant := 22; -- background tty write attempted + SIGIO : constant := 23; -- I/O now possible (4.2 BSD) + SIGPOLL : constant := 23; -- pollable event occurred + SIGXCPU : constant := 24; -- CPU time limit exceeded + SIGXFSZ : constant := 25; -- filesize limit exceeded + SIGVTALRM : constant := 26; -- virtual timer expired + SIGPROF : constant := 27; -- profiling timer expired + SIGWINCH : constant := 28; -- window size change + SIGLOST : constant := 29; -- File lock lost + SIGPWR : constant := 29; -- power-fail restart + SIGUSR1 : constant := 30; -- user defined signal 1 + SIGUSR2 : constant := 31; -- user defined signal 2 + + SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal + SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal + SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal + + SIGUNUSED : constant := 0; + SIGSTKFLT : constant := 0; + -- These don't exist for Linux/SPARC. The constants are present + -- so that we can continue to use a-intnam-linux.ads. + + -- struct_sigaction offsets + + sa_handler_pos : constant := 0; + sa_mask_pos : constant := Standard'Address_Size / 8; + sa_flags_pos : constant := 128 + sa_mask_pos; + + SA_SIGINFO : constant := 16#200#; + SA_ONSTACK : constant := 16#001#; + + -- 24 bytes for 32-bit and 40 bytes for 64-bit, aligned like 'long' + + type pthread_mutex_t is record + L1, L2, L3, L4 : Interfaces.C.long; + I1, I2 : Interfaces.C.int; + end record; + pragma Convention (C, pthread_mutex_t); + +end System.Linux; -- cgit v1.1