autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Autoconf on Solaris 10 64-bit Sparcv9


From: Chino Aureus
Subject: Autoconf on Solaris 10 64-bit Sparcv9
Date: Sat, 29 Apr 2006 12:36:25 +0800

Hi,

I 'm currently porting my application (shared library actually) to 64-bit.
I'm using autotools (i.e. automake, autoconf, etc...).

In Solaris 10, I was able to compile (doing ./configure, make and make
install) my shared library ok but as 32-bit.  However, since I want this to
be compiled as 64-bit, I added the -m64 and -Wl,-64 options to CPPFLAGS and
LDFLAGS respectively.  When I compile:

1. Generated objects files.. i.e. *.o  are in 64-bit
2. When It tries to link all the objects files, It seems it is trying to
generated a 32-bit library file (.so):
ERROR...........
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file .libs/libNecropolis_la-Logger.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to
.libs/libNecropolis.so.1.

Please help, I think I'm missing something.

Below is my Makefile.am
======================
#
# Use this Makefile.am when compiling on SunOS5.10 64-bit sparcv9 system
#
INCLUDES = $(all_includes) -I$(ACE_ROOT) -I../include
METASOURCES = AUTO
lib_LTLIBRARIES = libNecropolis.la
libNecropolis_la_LIBADD = \
   -lACE -L$(ACE_ROOT)/lib \
   -L/usr/sfw/lib/sparcv9 \
   -L/usr/lib/sparcv9 \
   -L/usr/local/lib/sparcv9 \
   -L/lib/sparcv9 \
   -L/usr/ccs/lib/sparcv9
libNecropolis_la_CPPFLAGS = -D_REENTRANT -m64
libNecropolis_la_LDFLAGS = -module -shared -version-info 1:1:0
-Wl,-soname=libNecropolis,-64
libNecropolis_la_SOURCES = \
   Logger.cpp \
   NCRPLS_Acceptor.cpp \
   NCRPLS_Config.cpp \
   NCRPLS_Connection_ThreadPool.cpp \
   NCRPLS_Monitor.cpp \
   NCRPLS_Monitor_Timer.cpp \
   NCRPLS_Parser_Iface.cpp \
   NCRPLS_ServerConn_Handler.cpp \
   NCRPLS_Server_Engine.cpp \
   NCRPLS_Task.cpp

Regards,
Chino


reply via email to

[Prev in Thread] Current Thread [Next in Thread]