Hi John,
I had some technical problems with my sparc system, but finally got
them resolved today. I have attached the diff of the configure.ac that
I used. It worked on Sparc and X86 Solaris.
I have also included the diff for the common/slp_atomic.c file that I am
using on my Sparc machine (using gcc with the Sun provided ld). Without
this change I get linker errors unless I force the use of the GNU ld.
Thanks
Jim
John Calcote wrote:
Jim,
You're right - I didn't anticipate solaris on a non-sparc architecture
(duh!). Anyway, I can't make any permanent changes right now to the
project because sf.net is having a little svn melt-down - it appears
they're out of disk space. :)
I'll get on it as soon as that problem is cleared up. If you want to
take a stab at it, you can look at line 168 in configure.ac. Looks
like we may need an additional check for arch here, so we can set the
-mcpu flag to v9 ONLY if the arch is SPARC. We needed this flag
because the default was v8, and some of the calls we use are not
available on v8 - causes compiler errors.
This is pure shell script, so feel free to hack away - you probably
just need an if statement here to check for $host_cpu=sparc or
something like that - it will actually be easier for you to look at
the value of host_cpu on a SPARC machine (add echo $host_cpu to the
bottom of configure.ac, run autogen.sh, run ./configure, and look at
the value at the bottom - then you'll know what to check for).
John
jim marshall wrote:
Using GCC 3.4.6, I did the standard configure and when I build I get
the following
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
-I. -I.. -I../../common -DSOLARIS -g -O2 -Wall -mcpu=v9 -O3 -MT
slp_atomic.lo -MD -MP -MF .deps/slp_atomic.Tpo -c -o slp_atomic.lo
../../common/slp_atomic.c
gcc -DHAVE_CONFIG_H -I. -I.. -I../../common -DSOLARIS -g -O2 -Wall
-mcpu=v9 -O3 -MT slp_atomic.lo -MD -MP -MF .deps/slp_atomic.Tpo -c
../../common/slp_atomic.c -fPIC -DPIC -o .libs/slp_atomic.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
../../common/slp_atomic.c:1: error: bad value (v9) for -mtune= switch
here are the host info on Sol x86
host_cpu='i386'
host_os='solaris2.9'
The same variables on Sparc
host_cpu='sparc'
host_os='solaris2.9'
It appears that solaris is the only platform in which the '-mcpu'
flag is used, is it really needed? If so I suspect we need to add an
additional test in the configure script to test for the CPU info
(around line 24957).
-Jim
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openslp-devel mailing list
Openslp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-devel
--
Jim Marshall
Sr. Staff Engineer
WBEM Solutions, Inc.
978-947-3607
Index: slp_atomic.c
===================================================================
--- slp_atomic.c (revision 1568)
+++ slp_atomic.c (working copy)
@@ -148,7 +148,7 @@
void sparc_asm_code(void)
{
asm( ".align 8");
- asm( ".global sparc_atomic_add_32");
+ asm( ".local sparc_atomic_add_32");
asm( ".type sparc_atomic_add_32, #function");
asm( "sparc_atomic_add_32:");
asm( " membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad");
@@ -164,7 +164,7 @@
asm( "nop");
asm( ".align 8");
- asm( ".global sparc_atomic_xchg_32");
+ asm( ".local sparc_atomic_xchg_32");
asm( ".type sparc_atomic_xchg_32, #function");
asm( "sparc_atomic_xchg_32:");
asm( " membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad");
Index: configure.ac
===================================================================
--- configure.ac (revision 1568)
+++ configure.ac (working copy)
@@ -165,11 +165,16 @@
case "$host_os" in
*linux*) CPPFLAGS="$CPPFLAGS -DLINUX" ;;
- *solaris*) CPPFLAGS="$CPPFLAGS -DSOLARIS" GCC_OS_FLAGS="-mcpu=v9" ;;
+ *solaris*) CPPFLAGS="$CPPFLAGS -DSOLARIS" ;;
*aix*) CPPFLAGS="$CPPFLAGS -DAIX" ;;
*hpux*) CPPFLAGS="$CPPFLAGS -DHPUX" ;;
esac
+# Determine if on sparc and if so set cpu to v9
+if test x$host_cpu = xsparc; then
+ GCC_OS_FLAGS="-mcpu=v9"
+fi
+
#
# Set C/C++ compiler-specific warning/optimization/option flags
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openslp-devel mailing list
Openslp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-devel