Subject: Re: bug#23133: gzip-1.7: Segmentation Fault with solarisstudio12.4 on Solaris10 x64
From: Paul Eggert <[email-masked]>
To: Kiyoshi KANAZAWA <[email-masked]>
Cc: [email-masked]
Date: Mon, 28 Mar 2016 16:35:52 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 03/28/2016 02:46 AM, Kiyoshi KANAZAWA wrote:
> I tried to build gzip-1.7 with solarisstudio12.4 cc, on Solaris10 x64,
>
> and had 'Segmentation Fault' in make check.
>
> % ./configure CC=cc CFLAGS='-m64 -g'

Thanks for reporting that. This exposed some bugs in configure.ac and 
lib/match.c: the configuration procedure assumes that, since cc 
assembles x86 instructions successfully, the x86 code will actually work 
when called from x86-64 code. I fixed this by installing the attached patch.

Also, since -m64 affects the preprocessor output, you need to set 
CPPFLAGS and/or put the -m64 into CC instead.  Something like the 
following should work with gzip 1.7:

./configure CC='cc -m64' CFLAGS='-g' DEFS='-D NO_ASM'

(A space is required between '-D' and 'NO_ASM'.) With the patch, plain 
'./configure CC="cc -m64" CFLAGS=-g' should also work.