This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
mips*rtems* __ATTRIBUTE_IMPURE_PTR__
- From: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- To: Newlib List <newlib at sources dot redhat dot com>
- Cc: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Date: Wed, 19 Nov 2008 18:50:23 +0100
- Subject: mips*rtems* __ATTRIBUTE_IMPURE_PTR__
Hi,
another RTEMS patch.
For mips-targets, newlib puts __ATTRIBUTE_IMPURE_PTR__ into the .sdata
section. This doesn't work for RTEMS, which is why we disable this
behavior.
Patch enclosed below.
Ralf
2008-11-19 Ralf CorsÃpius <ralf.corsepius@rtems.org>
* libc/include/sys/config.h: Don't put
__ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems.
Index: libc/include/sys/config.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
retrieving revision 1.47
diff -u -r1.47 config.h
--- libc/include/sys/config.h 15 Mar 2007 21:32:12 -0000 1.47
+++ libc/include/sys/config.h 19 Nov 2008 17:42:24 -0000
@@ -183,6 +183,10 @@
#if defined(__rtems__)
#define __FILENAME_MAX__ 255
#define _READ_WRITE_RETURN_TYPE _ssize_t
+#if defined(__mips__)
+#undef __ATTRIBUTE_IMPURE_PTR__
+#define __ATTRIBUTE_IMPURE_PTR__
+#endif
#endif
#ifndef __IMPORT