ICU-8765 Fix endianness detection issue in Solaris/GCC and silence some compilation warnings
X-SVN-Rev: 30562
This commit is contained in:
parent
02375bb109
commit
6f6b1b346c
7
icu4c/source/aclocal.m4
vendored
7
icu4c/source/aclocal.m4
vendored
@ -454,8 +454,7 @@ AC_DEFUN(AC_CHECK_STRICT_COMPILE,
|
||||
then
|
||||
case "${host}" in
|
||||
*-*-solaris*)
|
||||
CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long"
|
||||
CFLAGS="$CFLAGS -D__STDC__=0";;
|
||||
CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
|
||||
*-*-hpux*)
|
||||
echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see <http://bugs.icu-project.org/trac/ticket/8493>"
|
||||
CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
|
||||
@ -474,10 +473,6 @@ AC_DEFUN(AC_CHECK_STRICT_COMPILE,
|
||||
if test "$GXX" = yes
|
||||
then
|
||||
CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
|
||||
case "${host}" in
|
||||
*-*-solaris*)
|
||||
CXXFLAGS="$CXXFLAGS -D__STDC__=0";;
|
||||
esac
|
||||
else
|
||||
case "${host}" in
|
||||
*-*-cygwin)
|
||||
|
@ -136,6 +136,13 @@
|
||||
#elif defined(sun) || defined(__sun)
|
||||
/* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris from SunOS? */
|
||||
# define U_PLATFORM U_PF_SOLARIS
|
||||
# if defined(__GNUC__)
|
||||
/* Solaris/GCC needs this header file to get the proper endianness. Normally, this
|
||||
* header file is included with stddef.h but on Solairs/GCC, the GCC version of stddef.h
|
||||
* is included which does not include this header file.
|
||||
*/
|
||||
# include <sys/isa_defs.h>
|
||||
# endif
|
||||
#elif defined(_AIX) || defined(__TOS_AIX__)
|
||||
# define U_PLATFORM U_PF_AIX
|
||||
#elif defined(_hpux) || defined(hpux) || defined(__hpux)
|
||||
|
7
icu4c/source/configure
vendored
7
icu4c/source/configure
vendored
@ -4315,8 +4315,7 @@ $as_echo "$ac_use_strict_options" >&6; }
|
||||
then
|
||||
case "${host}" in
|
||||
*-*-solaris*)
|
||||
CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long"
|
||||
CFLAGS="$CFLAGS -D__STDC__=0";;
|
||||
CFLAGS="$CFLAGS -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
|
||||
*-*-hpux*)
|
||||
echo "# Note: We are not using '-ansi' with HP/UX GCC because int64_t broke, see <http://bugs.icu-project.org/trac/ticket/8493>"
|
||||
CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long";;
|
||||
@ -4335,10 +4334,6 @@ $as_echo "$ac_use_strict_options" >&6; }
|
||||
if test "$GXX" = yes
|
||||
then
|
||||
CXXFLAGS="$CXXFLAGS -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
|
||||
case "${host}" in
|
||||
*-*-solaris*)
|
||||
CXXFLAGS="$CXXFLAGS -D__STDC__=0";;
|
||||
esac
|
||||
else
|
||||
case "${host}" in
|
||||
*-*-cygwin)
|
||||
|
@ -158,7 +158,7 @@ case $platform in
|
||||
CC=gcc; export CC
|
||||
CXX=g++; export CXX
|
||||
RELEASE_CFLAGS=-O1
|
||||
RELEASE_CXXFLAGS=-O3
|
||||
RELEASE_CXXFLAGS=-O2
|
||||
;;
|
||||
SolarisX86)
|
||||
THE_OS="SOLARIS X86"
|
||||
|
Loading…
Reference in New Issue
Block a user