Port to Oracle Solaris Studio 12.4
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 28 Mar 2016 23:26:45 +0000 (16:26 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 28 Mar 2016 23:27:45 +0000 (16:27 -0700)
Problem reported by Kiyoshi KANAZAWA in: http://bugs.gnu.org/23133
* NEWS: Document this.
* configure.ac (ASMV): Do not define if NO_ASM is
anywhere in DEFS; it doesn't need to be surrounded by white space.
* lib/match.c: Do not use x86 version if __x86_64__ is defined.

NEWS
configure.ac
lib/match.c

diff --git a/NEWS b/NEWS
index d2bf9763e3d23d0626c48183eacaa2f961c1fd45..fdae647c77780cb62b12c1fcb5c70ca8cf3db8e7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,14 @@ GNU gzip NEWS                                    -*- outline -*-
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+** Bug fixes
+
+  Port to Oracle Solaris Studio 12 on x86-64.
+  [bug present since at least gzip-1.2.4]
+
+  When configuring gzip, ./configure DEFS='...-DNO_ASM...' now
+  suppresses assembler again.  [bug introduced in gzip-1.3.5]
+
 
 * Noteworthy changes in release 1.7 (2016-03-27) [stable]
 
index f64df6b3444ed105835e7b02eabf4c8347a28b55..08ad445023e9c79472bcd756efc17a02fe59a65e 100644 (file)
@@ -204,8 +204,8 @@ AC_OBJEXT
 AC_CACHE_CHECK([for an assembler syntax supported by this package],
   [gzip_cv_assembler],
   [gzip_cv_assembler=no
-   case " $DEFS " in
-   *' NO_ASM '*) ;;
+   case $DEFS in
+   *NO_ASM*) ;;
    *)
      if cp $srcdir/lib/match.c _match.S &&
         eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" &&
index 884603873cfb5ea65642c86f4a259630d4faf205..41fb03e4bd3dad28f48a6e7b02effeec0d053b38 100644 (file)
   error: DYN_ALLOC not yet supported in match.s
 #endif
 
-#if defined(i386) || defined(_I386) || defined(__i386) || defined(__i386__)
+/* On x86-64, Sun C 5.13 (Oracle Solaris Studio 12.4) 'cc -E -m64'
+   defines i386 when compiling .s or .S files!  Luckily it also
+   defines __x86_64__.  See Bug#23133.  */
+#if ((defined i386 || defined _I386 || defined __i386 || defined __i386__) \
+     && !defined __x86_64__)
 
 /* This version is for 386 Unix or OS/2 in 32 bit mode.
  * Warning: it uses the AT&T syntax: mov source,dest