This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mips atomicity.h selection

The mips version of atomicity.h is selected by default for mips-*
targets (but not for other mips* targets).  The problem is,
it uses instructions only available in MIPS II and above.

At one point Eric committed a patch to fix this:

but a clean-up seems to have negated its effect:

To be honest, I'm not sure why it's suddenly become a problem now.
I've been using a mid-Jan version of libstdc++-v3 on mips-rewrite
branch without problems.

Still, the use of the atomic operations in locale::id::_M_id
is now causing most C++ mips-elf programs to fail during startup.
The patch below is just a variation of Eric's original (the variation
coming about because I tested it before seeing the history).

Perhaps we could move to using the mips atomicity.h for all mips64
targets?  Not done here since I just wanted to fix the mips-elf case.

Tested on mips-elf.  OK to install?


	* (mips*): Use the generic atomicity.h by default.

RCS file: /cvs/gcc/gcc/libstdc++-v3/,v
retrieving revision 1.57
diff -c -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.57
***	15 Apr 2003 06:36:25 -0000	1.57
---	4 May 2003 12:23:50 -0000
*************** case "${target_cpu}" in
*** 75,80 ****
--- 75,85 ----
+   mips*)
+     # cpu/mips/atomicity.h needs MIPS II or above.  Only use it
+     # where it is known to be safe.
+     ATOMICITYH="cpu/generic"
+     ;;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]