[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help: 64 Bit Solaris 10
From: |
Bob Friesenhahn |
Subject: |
Re: Help: 64 Bit Solaris 10 |
Date: |
Mon, 5 Dec 2005 19:47:41 -0600 (CST) |
On Mon, 5 Dec 2005, Edward Maros wrote:
This may be a frequent question, but I have not been able to find a
solution yet. I am trying to port out application to 64bit using a
sparc4u running Solaris 10. The application uses
autoconf/automake/libtool/gcc for configuration and building of targets.
With my first attempt at going 64 bit, I hit a problem since libtool
seems to configure only 32bit (at least for creating shared objects). Am
I missing something that I could do to make the leap to 64 bit?
In order to make things easy, you can create some simple shell-script
wrappers. For example, I have a 'gcc-64' script with this content:
#!/bin/sh
exec /usr/local/bin/gcc-4.0.1 -m64 "$@"
and a 'c++-64' script with this content:
#!/bin/sh
exec /usr/local/bin/c++-4.0.1 -m64 "$@"
and then at configure time I just do
./configure CC=gcc-64 CXX=c++-64
sometimes there are problems due to library search paths. If there
are problems you can add
LDFLAGS="-L/path/to/64bit/libs -R/path/to/64bit/libs"
to the mix.
If the above seems to complicated and messy, then you can use this
additional approach which makes things super-easy. I created a
/usr/local/sparc64 directory for 64-bit stuff and a
/usr/local/sparc64/share/config.site file to provide configure
defaults whenever that prefix is used. This makes 64-bits pretty
easy.
Here are the contents of a sample config.site file:
# config.site for configure
#
echo 'Applying settings for 64-bit build ...'
# Change some defaults.
test "$prefix" = NONE && prefix=/usr/local/sparc64
PATH="$prefix/bin:$PATH"
export PATH
#echo "${libdir}"
#echo "${exec_prefix}"
if test "${libdir}" = '${exec_prefix}/lib'
then
libdir=`echo ${prefix}/lib`
fi
CC_DEFAULT="gcc-64"
CXX_DEFAULT="c++-64"
#CPPFLAGS_DEFAULT=`echo -I${prefix}/include`
CFLAGS_DEFAULT=-'O2 -g'
CXXFLAGS_DEFAULT='-O -g'
LDFLAGS_DEFAULT=`echo -L${libdir}` # -R${libdir}
LIBS_DEFAULT=
if test "${ac_env_CC_set}" != set
then
CC="$CC_DEFAULT"
fi
if test "${ac_env_CXX_set}" != set
then
CXX="$CXX_DEFAULT"
fi
if test "${ac_env_CFLAGS_set}" != set
then
CFLAGS="$CFLAGS_DEFAULT"
fi
if test "${ac_env_CXXFLAGS_set}" != set
then
CXXFLAGS="$CXXFLAGS_DEFAULT"
fi
if test "${ac_env_CPPFLAGS_set}" != set
then
CPPFLAGS="$CPPFLAGS_DEFAULT"
fi
if test "${ac_env_LDFLAGS_set}" = set
then
LDFLAGS="$LDFLAGS $LDFLAGS_DEFAULT"
else
LDFLAGS="$LDFLAGS_DEFAULT"
fi
echo "CC = \"$CC\""
echo "CXX = \"$CXX\""
echo "CFLAGS = \"$CFLAGS\""
echo "CXXFLAGS = \"$CXXFLAGS\""
echo "CPPFLAGS = \"$CPPFLAGS\""
echo "LDFLAGS = \"$LDFLAGS\""
Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
- Help: 64 Bit Solaris 10, Edward Maros, 2005/12/05
- Re: Help: 64 Bit Solaris 10, Tim Rice, 2005/12/05
- Re: Help: 64 Bit Solaris 10, Ralf Wildenhues, 2005/12/05
- Re: Help: 64 Bit Solaris 10, Edward Maros, 2005/12/06
- Re: Help: 64 Bit Solaris 10, Bob Friesenhahn, 2005/12/06
- Re: Help: 64 Bit Solaris 10, Edward Maros, 2005/12/07
- Re: Help: 64 Bit Solaris 10, Bob Friesenhahn, 2005/12/07
- Re: Help: 64 Bit Solaris 10, Bob Friesenhahn, 2005/12/07
Re: Help: 64 Bit Solaris 10,
Bob Friesenhahn <=