[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff 2.8.1 dumps core on HPUX 10.20
From: |
Bob Proulx |
Subject: |
Re: diff 2.8.1 dumps core on HPUX 10.20 |
Date: |
Sun, 29 Dec 2002 21:53:50 -0700 |
User-agent: |
Mutt/1.4i |
Paul Eggert <address@hidden> [2002-12-29 11:20:51 -0800]:
> > From: Jost Martin <address@hidden>
> > Date: Fri, 29 Nov 2002 11:56:00 +0100
> >
> > I'm trying to compile diff 2.8.1 on HPUX 10.20 using the HP
> > ANSI-C-Compiler.
> > cc +DAportable -Aa +O2 -D_POSIX_SOURCE -D_HPUX_SOURCE
> > -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -L/pd/libs/lib/ -o diff
> > analyze.o context.o diff.o dir.o ed.o ifdef.o io.o normal.o side.o
> > util.o version.o ../lib/libdiffutils.a
> > ...
> > /usr/ccs/bin/ld: (Warning) LDW instruction from file io.o(0xf0c)
> > accesses nonaligned data - check alignment options.
> Thanks for your bug report. This sounds quite strange. I don't know
> HP-UX, but it vaguely sounds like you are compiling with aggressive
> optimization options that break diffutils, either because of a
> compiler bug, or because the options produce an implementation that is
> too strict about type punning.
Well +O2 is pretty tame. That is the basic optimization. So I don't
think it is aggressive optimization. +O3 and +O4 is where it gets
interesting. But before that it is pretty safe.
I can't recreate the problem on my hpux 10.20 machine. I just tried
and diff 2.8.1 works fine for me using the native hpux ansi compiler.
This was incentive for me to upgrade diffutils there.
what /usr/bin/cc
LINT A.10.32.10 CXREF A.10.32.10
HP92453-01 A.10.32.12 HP C Compiler
/usr/lib/libc: $Revision: 76.3 $
The diffutils configure and compile fine for me.
./configure CC=cc CFLAGS='+O2 +DAportable'
The autotools with diff 2.8.1 know about hpux and -Ae and so no other
options are needed. The final link line is this.
cc -Ae +O2 +DAportable -o diff analyze.o context.o diff.o dir.o ed.o ifdef.o
io.o normal.o side.o util.o version.o ../lib/libdiffutils.a -lintl
And then the resulting diff works fine for me. I would be happy to
make the files available. Either a tar.gz of the resulting binaries
or an rpm of them.
Bob