]> granicus.if.org Git - icu/commitdiff
ICU-8765 Fix endianness detection issue in Solaris/GCC and silence some compilation...
authorMichael Ow <mow@svn.icu-project.org>
Mon, 22 Aug 2011 22:42:11 +0000 (22:42 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Mon, 22 Aug 2011 22:42:11 +0000 (22:42 +0000)
X-SVN-Rev: 30562

icu4c/source/aclocal.m4
icu4c/source/common/unicode/platform.h
icu4c/source/configure
icu4c/source/runConfigureICU

index 95c9292337dedb661994a2e7a1db15aab521bf3a..ac85afea802f51e369932a796a77dabc70d75ad3 100644 (file)
@@ -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)
index b93a90a48ddb04da87a31aa0a82d5580c7c75ac0..ba74d2ebd410e35a1cb58e3ab7f88ce636d0dcbd 100644 (file)
 #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)
index 6ebe468d3bc267c69b545569150a5d62471897eb..0dfb4a63c1788411c3e4c101b86cbec9391f3514 100755 (executable)
@@ -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)
index f265ce605d9a5bc7360e8010f6dc19e1b464dd82..5a2777ed7b125b3c8aff4a852cb49f8bbbe34a40 100755 (executable)
@@ -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"