Could you edit your Makefile (in atomic/solaris_sparc) to add the '-traditional-cpp' option to 'gcc -E' and see what happens? (If you could 'mv apr_atomic_sparc.S apr_atomic_sparc.S.bak' first so we can compare that would be cool).
So:
++++
$ gcc -v -traditional-cpp -Wa,-xarch=v8plus -D_ASM -D__STDC__=0 -c apr_atomic>
Reading specs from /opt/SMAW/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.0.3/specs
Configured with: ./configure --prefix=/opt/SMAW/gnu : (reconfigured) ./configure --prefix=/opt/SMAW/gnu : (reconfigured) ./configure --prefix=/opt/SMAW/gnu : (reconfigured) ./configure --prefix=/opt/SMAW/gnu
Thread model: posix
gcc version 3.0.3
/opt/SMAW/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.0.3/tradcpp0 -lang-asm -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=3 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc -D_ASM -D__STDC__=0 apr_atomic_sparc.S -o /var/tmp/ccDlMlua.s
GNU traditional CPP version 3.0.3
/opt/SMAW/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.0.3/../../../../sparc-sun-solaris2.8/bin/as -V -Qy -s -xarch=v8plus -o apr_atomic_sparc.lo /var/tmp/ccDlMlua.s
GNU assembler version 2.11.93.0.2 (sparc-sun-solaris2.8) using BFD version 2.11.93.0.2 20020207
+++
<command line>: warning: "__STDC__" redefined has dispaired.
+++
$ make
make[1]: Entering directory `/export/home/apache20/apache/httpd-2.0/srclib/apr/atomic/solaris_sparc'
gcc -E -traditional-cpp -D_ASM -D__STDC__=0 - < /export/home/apache20/apache/httpd-2.0/srclib/apr/atomic/solaris_sparc/apr_atomic_sparc.s > apr_atomic_sparc.S
/opt/SMAW/gnu/bin/as -xarch=v8plus -K PIC -o apr_atomic_sparc.lo apr_atomic_sparc.S
make[1]: Leaving directory `/export/home/apache20/apache/httpd-2.0/srclib/apr/atomic/solaris_sparc'
+++
The diff.txt attachement is the result of diff of the "gcc -traditional-cpp -E -D_ASM -D__STDC__=0 - < " and the "gcc -E -D_ASM -D__STDC__=0 - < ".
Funny no?
--- apr_atomic_sparc.S Wed Apr 24 18:05:20 2002 +++ apr_atomic_sparc.wrong Wed Apr 24 18:06:50 2002 @@ -1,4 +1,4 @@ -# 1 "" +# 1 "<stdin>" !* ==================================================================== !* The Apache Software License, Version 1.1 !* @@ -50,7 +50,7 @@ !* This software consists of voluntary contributions made by many !* individuals on behalf of the Apache Software Foundation. For more !* information on the Apache Software Foundation, please see -!* <http://www.apache.org/>. +!* <http: !* !* @@ -62,96 +62,12 @@ !* section J.11 (page 333) ! # 1 "/usr/include/sys/asm_linkage.h" 1 3 - - - - - - - - +# 9 "/usr/include/sys/asm_linkage.h" 3 #pragma ident "@(#)asm_linkage.h 1.36 97/09/28 SMI" # 1 "/usr/include/sys/stack.h" 1 3 - - - - - - - - +# 9 "/usr/include/sys/stack.h" 3 #pragma ident "@(#)stack.h 1.18 99/03/23 SMI" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 91 "/usr/include/sys/stack.h" 3 - - -# 103 "/usr/include/sys/stack.h" 3 - - - - - - - - - - - - -# 127 "/usr/include/sys/stack.h" 3 - - - - - - - # 12 "/usr/include/sys/asm_linkage.h" 2 3 # 1 "/usr/include/sys/trap.h" 1 3 @@ -162,222 +78,8 @@ #pragma ident "@(#)trap.h 1.29 99/08/03 SMI" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # 13 "/usr/include/sys/asm_linkage.h" 2 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 54 "/usr/include/sys/asm_linkage.h" 3 - - -# 70 "/usr/include/sys/asm_linkage.h" 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 134 "/usr/include/sys/asm_linkage.h" 3 - - -# 144 "/usr/include/sys/asm_linkage.h" 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 603 "/usr/include/sys/asm_linkage.h" 3 - - - - - - - - - -# 64 "" 2 3 +# 64 "<stdin>" 2 ! %o0 [input] - the address of the value to increment ! %o1 [input] - the increment delta value ! %o2 [local] - work register (was %l0 in book) @@ -386,7 +88,7 @@ ! ! ! - .section ".text"; .align 4; .global apr_atomic_add_sparc; .type apr_atomic_add_sparc, #function; apr_atomic_add_sparc: + ENTRY(apr_atomic_add_sparc) ld [%o0], %o2 ! set o2 to current value _apr_atomic_add_sparc_loop: @@ -402,7 +104,7 @@ ! ! ! - .section ".text"; .align 4; .global apr_atomic_sub_sparc; .type apr_atomic_sub_sparc, #function; apr_atomic_sub_sparc: + ENTRY(apr_atomic_sub_sparc) ld [%o0], %o2 _apr_atomic_sub_sparc_loop: @@ -423,12 +125,11 @@ ! %o2 [input] - value to compare against ! %o0 [output] - the return value ! - .section ".text"; .align 4; .global apr_atomic_cas_sparc; .type apr_atomic_cas_sparc, #function; apr_atomic_cas_sparc: - .section ".text"; .align 4; .global apr_atomic_casptr_sparc; .type apr_atomic_casptr_sparc, #function; apr_atomic_casptr_sparc: + ENTRY(apr_atomic_cas_sparc) + ENTRY(apr_atomic_casptr_sparc) cas [%o0], %o2, %o1 retl mov %o1, %o0 .size apr_atomic_cas_sparc, (.-apr_atomic_cas_sparc) -