stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r560206 - in /incubator/stdcxx/trunk: etc/config/gcc.config src/i86/atomic.s
Date Fri, 27 Jul 2007 11:56:14 GMT
Author: faridz
Date: Fri Jul 27 04:56:13 2007
New Revision: 560206

URL: http://svn.apache.org/viewvc?view=rev&rev=560206
Log:
2007-07-27 Farid Zaripov <Farid_Zaripov@epam.com>

	* gcc.config [__CYGWIN__]: Added -D_REENTRANT option in
	multithreaded builds. Don't define AS_EXT as .s.
	* atomic.s [__CYGWIN__]: Prepend symbol names by '_'.

Modified:
    incubator/stdcxx/trunk/etc/config/gcc.config
    incubator/stdcxx/trunk/src/i86/atomic.s

Modified: incubator/stdcxx/trunk/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/gcc.config?view=diff&rev=560206&r1=560205&r2=560206
==============================================================================
--- incubator/stdcxx/trunk/etc/config/gcc.config (original)
+++ incubator/stdcxx/trunk/etc/config/gcc.config Fri Jul 27 04:56:13 2007
@@ -230,14 +230,12 @@
     endif
 else
     # on Cygwin use MingW-threads by default
-    MULTI_CPPFLAGS_POSIX = -mthreads
+    # -mthreads not defines _REENTRANT
+    MULTI_CPPFLAGS_POSIX = -D_REENTRANT -mthreads
     MULTI_LDFLAGS_POSIX  = -mthreads
 
     # link with libcatgets and libiconv
     LDLIBS += -lcatgets -liconv
-
-    # set the assembler file suffix to .s
-    AS_EXT = .s
 endif
 
 MULTI_CPPFLAGS_SOLARIS = -threads

Modified: incubator/stdcxx/trunk/src/i86/atomic.s
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/i86/atomic.s?view=diff&rev=560206&r1=560205&r2=560206
==============================================================================
--- incubator/stdcxx/trunk/src/i86/atomic.s (original)
+++ incubator/stdcxx/trunk/src/i86/atomic.s Fri Jul 27 04:56:13 2007
@@ -33,6 +33,14 @@
 #  define TYPE_DIR(ign1, ign2)
 #endif
 
+#if defined (__CYGWIN__)
+   /* on cygwin used COFF object file format
+      C-functions names should prepended by '_' */
+#  define SYMNAME(name)    _##name
+#else
+#  define SYMNAME(name)    name
+#endif
+
     .text
     .align 4
 
@@ -43,10 +51,10 @@
  * the original (before assignment) 8-bit value of *x.
  **************************************************************************/
 
-    .globl __rw_atomic_xchg8
+    .globl SYMNAME (__rw_atomic_xchg8)
     TYPE_DIR (__rw_atomic_xchg8, @function)
 
-__rw_atomic_xchg8:                 /* ; char (char *x, char y)        */
+SYMNAME (__rw_atomic_xchg8):       /* ; char (char *x, char y)        */
     mov           4(%esp), %ecx    /* ; %ecx = x                      */
     movb          8(%esp), %al     /* ; %al = y                       */
     xchg          %al, (%ecx)      /* ; %al <-> (%ecx)                */
@@ -60,10 +68,10 @@
  * the original (before assignment) 16-bit value of *x.
  **************************************************************************/
 
-    .globl __rw_atomic_xchg16
+    .globl SYMNAME (__rw_atomic_xchg16)
     TYPE_DIR (__rw_atomic_xchg16, @function)
 
-__rw_atomic_xchg16:                /* ; short (short *x, short y)     */
+SYMNAME (__rw_atomic_xchg16):      /* ; short (short *x, short y)     */
     mov           4(%esp), %ecx    /* ; %ecx = x                      */
     mov           8(%esp), %eax    /* ; %eax = y                      */
     xchgw         %ax, (%ecx)      /* ; %ax <-> (%ecx)                */
@@ -77,10 +85,10 @@
  * the original (before assignment) 32-bit value of *x.
  **************************************************************************/
 
-    .globl __rw_atomic_xchg32
+    .globl SYMNAME (__rw_atomic_xchg32)
     TYPE_DIR (__rw_atomic_xchg32, @function)
 
-__rw_atomic_xchg32:                /* ; int (int *x, int y)           */
+SYMNAME (__rw_atomic_xchg32):      /* ; int (int *x, int y)           */
     movl          4(%esp), %ecx    /* ; %ecx = x                      */
     movl          8(%esp), %eax    /* ; %eax = y                      */
     xchgl         %eax, (%ecx)     /* ; %eax <-> (%ecx)               */
@@ -94,10 +102,10 @@
  * the new (after increment) 8-bit value of *x.
  **************************************************************************/
 
-    .globl __rw_atomic_add8
+    .globl SYMNAME (__rw_atomic_add8)
     TYPE_DIR (__rw_atomic_add8, @function)
 
-__rw_atomic_add8:                  /* ; char (char *dst, int inc)     */
+SYMNAME (__rw_atomic_add8):        /* ; char (char *dst, int inc)     */
     mov            4(%esp), %ecx   /* ; %ecx = dst                    */
     mov            8(%esp), %eax   /* ; %eax = inc                    */
     mov            %eax, %edx      /* ; */
@@ -118,10 +126,10 @@
  * the new (after increment) 16-bit value of *x.
  **************************************************************************/
 
-     .globl __rw_atomic_add16
+     .globl SYMNAME (__rw_atomic_add16)
     TYPE_DIR (__rw_atomic_add16, @function)
 
-__rw_atomic_add16:                 /* ; long (long *dst, long inc)    */
+SYMNAME (__rw_atomic_add16):       /* ; long (long *dst, long inc)    */
     mov            4(%esp), %ecx   /* ; %ecx = dst                    */
     mov            8(%esp), %eax   /* ; %eax = inc                    */
     mov            %eax, %edx      /* ; */
@@ -142,10 +150,10 @@
  * the new (after increment) 32-bit value of *x.
  **************************************************************************/
 
-    .globl __rw_atomic_add32
+    .globl SYMNAME (__rw_atomic_add32)
     TYPE_DIR (__rw_atomic_add32, @function)
 
-__rw_atomic_add32:                 /* ; long (long *dst, long inc)    */
+SYMNAME (__rw_atomic_add32):       /* ; long (long *dst, long inc)    */
     movl           4(%esp), %ecx   /* ; %ecx = dst                    */
     movl           8(%esp), %edx   /* ; %edx = inc                    */
     movl           %edx, %eax      /* ; */



Mime
View raw message