There is a bug in make-3.79 which was not present in 3.77. I have
confirmed the problem under IRIX 6.5 and SunOS 5.5.1, but I believe it
affects all OSes supporting archives.
When using implicit rules for library archiving, the timestamp is computed
incorrectly for the (not yet existing) target archive member. This
results in an error as follows for the second target member (the case
where the .a file doesn't exist is handled correctly):
make: *** Warning: File `libmytest.a(testobj2.o)' has modification time in
the future (2010-02-22 16:41:28.709551616 > 2000-05-09 11:28:07.595702)
It appears the problem is caused by a conversion from s to ns of the error
condition "-1" returned by ar_member_date. When the .a file exists but
not the target archive member, the "-1" (which means the target member
doesn't exist yet) is incorrectly converted to -1000000000. A simple
patch is included below which seems to fix the problem for me.
Apologies in advance if this already known. Repeated deja and google
searches turned up nothing. Feel free to 'reprimand' me by pointing me
to where I should have looked.
Thanks,
Chris Orth
[EMAIL PROTECTED]
=============================
#diff remake.c.orig remake.c
1100c1100,1107
< mtime = FILE_TIMESTAMP_FROM_S_AND_NS (ar_member_date
(file->hname), 0);
---
> mtime = ar_member_date (file->hname);
>
> if (mtime == (FILE_TIMESTAMP) -1)
> /* The member doesn't exist yet. */
> return (FILE_TIMESTAMP) -1;
>
> mtime = (FILE_TIMESTAMP_FROM_S_AND_NS (mtime, 0));