OpenCores
URL https://opencores.org/ocsvn/hf-risc/hf-risc/trunk

Subversion Repositories hf-risc

[/] [hf-risc/] [trunk/] [tools/] [riscv-gnu-toolchain-master/] [patches/] [newlib] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
--- original-newlib/libgloss/configure
2
+++ newlib/libgloss/configure
3
@@ -678,6 +678,7 @@ sparc_leon
4
 sparc
5
 wince
6
 mips
7
+riscv
8
 rs6000
9
 mn10200
10
 mn10300
11
@@ -2449,6 +2450,10 @@ case "${target}" in
12
        subdirs="$subdirs mips"
13
 
14
        ;;
15
+  riscv*-*-*)
16
+       subdirs="$subdirs riscv"
17
+
18
+       ;;
19
   powerpc-*-*|powerpcle-*-*)
20
        subdirs="$subdirs rs6000"
21
 
22
--- original-newlib/libgloss/configure.in
23
+++ newlib/libgloss/configure.in
24
@@ -75,6 +75,9 @@ case "${target}" in
25
   mips*-*-*)
26
        AC_CONFIG_SUBDIRS([mips])
27
        ;;
28
+  riscv*-*-*)
29
+       AC_CONFIG_SUBDIRS([riscv])
30
+       ;;
31
   powerpc-*-*|powerpcle-*-*)
32
        AC_CONFIG_SUBDIRS([rs6000])
33
        ;;
34
--- original-newlib/newlib/configure.host
35
+++ newlib/newlib/configure.host
36
@@ -210,6 +210,10 @@ case "${host_cpu}" in
37
   mep)
38
        machine_dir=mep
39
        ;;
40
+  riscv*)
41
+       machine_dir=riscv
42
+       newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
43
+       ;;
44
   mips*)
45
        machine_dir=mips
46
        ;;
47
--- original-newlib/newlib/libc/include/machine/ieeefp.h
48
+++ newlib/newlib/libc/include/machine/ieeefp.h
49
@@ -170,6 +170,14 @@
50
 #define __IEEE_LITTLE_ENDIAN
51
 #endif
52
 
53
+#ifdef __riscv__
54
+# ifdef _RISCVEL
55
+#  define __IEEE_LITTLE_ENDIAN
56
+# else
57
+#  define __IEEE_BIG_ENDIAN
58
+# endif
59
+#endif
60
+
61
 #ifdef __i960__
62
 #define __IEEE_LITTLE_ENDIAN
63
 #endif
64
--- original-newlib/newlib/libc/include/machine/setjmp.h
65
+++ newlib/newlib/libc/include/machine/setjmp.h
66
@@ -338,6 +338,11 @@ _BEGIN_STD_C
67
 #define _JBLEN 0x44
68
 #endif
69
 
70
+#ifdef __riscv__
71
+#define _JBTYPE long
72
+#define _JBLEN ((16*sizeof(long) + 12*sizeof(double))/sizeof(long))
73
+#endif
74
+
75
 #ifdef _JBLEN
76
 #ifdef _JBTYPE
77
 typedef        _JBTYPE jmp_buf[_JBLEN];
78
--- original-newlib/newlib/libc/include/sys/config.h
79
+++ newlib/newlib/libc/include/sys/config.h
80
@@ -75,7 +75,7 @@
81
 #define _POINTER_INT short
82
 #endif
83
 
84
-#if defined(__m68k__) || defined(__mc68000__)
85
+#if defined(__m68k__) || defined(__mc68000__) || defined(__riscv__)
86
 #define _READ_WRITE_RETURN_TYPE _ssize_t
87
 #endif
88
 
89
--- original-newlib/newlib/libc/include/sys/types.h
90
+++ newlib/newlib/libc/include/sys/types.h
91
@@ -147,6 +147,9 @@ typedef     char *  caddr_t;
92
 #define __caddr_t_defined
93
 #endif
94
 
95
+#ifdef __ino_t_defined
96
+typedef __ino_t ino_t;
97
+#else
98
 #ifndef __CYGWIN__
99
 #if defined(__MS_types__) || defined(__rtems__) || \
100
     defined(__sparc__) || defined(__SPU__)
101
@@ -155,6 +158,7 @@ typedef     unsigned long   ino_t;
102
 typedef        unsigned short  ino_t;
103
 #endif
104
 #endif /*__CYGWIN__*/
105
+#endif /*__ino_t_defined*/
106
 
107
 #ifdef __MS_types__
108
 typedef unsigned long vm_offset_t;
109
@@ -197,6 +201,9 @@ typedef int pid_t;
110
 typedef _mode_t mode_t;
111
 #endif
112
 
113
+#ifdef __mode_t_defined
114
+typedef __mode_t mode_t;
115
+#else
116
 #ifndef __CYGWIN__
117
 typedef        long key_t;
118
 #endif
119
@@ -218,8 +225,13 @@ typedef unsigned int mode_t _ST_INT32;
120
 #endif
121
 #endif /* ! __MS_types__ */
122
 #endif /*__CYGWIN__*/
123
+#endif /*__mode_t_defined*/
124
 
125
+#ifdef __nlink_t_defined
126
+typedef __nlink_t nlink_t;
127
+#else
128
 typedef unsigned short nlink_t;
129
+#endif /*__nlink_t_defined*/
130
 
131
 /* We don't define fd_set and friends if we are compiling POSIX
132
    source, or if we have included (or may include as indicated
133
--- original-newlib/newlib/libc/machine/configure
134
+++ newlib/newlib/libc/machine/configure
135
@@ -811,6 +811,7 @@ m88k
136
 mep
137
 microblaze
138
 mips
139
+riscv
140
 mn10200
141
 mn10300
142
 moxie
143
@@ -11882,6 +11883,8 @@ subdirs="$subdirs a29k"
144
  ;;
145
        mips) subdirs="$subdirs mips"
146
  ;;
147
+       riscv) subdirs="$subdirs riscv"
148
+ ;;
149
        mn10200) subdirs="$subdirs mn10200"
150
  ;;
151
        mn10300) subdirs="$subdirs mn10300"
152
--- original-newlib/newlib/libc/machine/configure.in
153
+++ newlib/newlib/libc/machine/configure.in
154
@@ -50,6 +50,7 @@ if test -n "${machine_dir}"; then
155
        mep ) AC_CONFIG_SUBDIRS(mep) ;;
156
        microblaze ) AC_CONFIG_SUBDIRS(microblaze) ;;
157
        mips) AC_CONFIG_SUBDIRS(mips) ;;
158
+       riscv) AC_CONFIG_SUBDIRS(riscv) ;;
159
        mn10200) AC_CONFIG_SUBDIRS(mn10200) ;;
160
        mn10300) AC_CONFIG_SUBDIRS(mn10300) ;;
161
        moxie) AC_CONFIG_SUBDIRS(moxie) ;;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.