Re: [ccache] ccache version 3.2.3 has been released

2015-08-17 Thread Tom Lane
Mike Frysinger vap...@gentoo.org writes:
 On 16 Aug 2015 13:39, Tom Lane wrote:
 and of course -lz isn't a valid dependency.

 that's not really true.  make will expand it internally into paths like 
 /usr/lib/libz.so.

Hmm ... there may be versions of make for which that's true, but
Apple's version (which is gnu make 3.81) does not like it.

regards, tom lane

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] Compiler warnings in ccache 3.2.3

2015-08-17 Thread Joel Rosdahl

 I got a few warnings about assignments of pointers to bool values. I
 think these are legitimate gripes, because on platforms where bool is only
 a byte wide, the net effect will be to assign the pointer's low-order byte
 to the bool.  There's at least a 1-in-256 chance of a non-null pointer
 erroneously converting to a false boolean value (maybe more than that, if
 the pointer is likely to be aligned ...).


Well, as I interpret the C99 standard, bool from stdbool.h (AKA _Bool) is
guaranteed to only contain 1 or 0:

6.3.1.2 Boolean type

When any scalar value is converted to _Bool, the result is 0 if the value
compares equal to 0; otherwise, the result is 1.


However, ccache's system.h has fallback code on systems that don't have
stdbool.h and then a bool can be typedef-ed to be a signed char, which is
something I didn't think of when writing the code in question. (I guess you
are on such an antique non-C99 system?)

I propose the attached patches to fix this.


Thanks, applied.

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-17 Thread Joel Rosdahl
Tom Lane t...@sss.pgh.pa.us wrote:

 [...] this fails to build for me on late-model OS X:


Bummer. Here's my proposed fix:
https://git.samba.org/?p=ccache.git;a=commitdiff;h=f74c76107933046309861680b741adc67ac2a34e.
Perhaps you could try it out?

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-17 Thread Jürgen Buchmüller
Am Montag, den 17.08.2015, 00:50 -0400 schrieb Mike Frysinger:
 On 16 Aug 2015 13:39, Tom Lane wrote:
  $ grep extra_libs Makefile
  extra_libs = -lz
  ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
  $(CC) $(all_cflags) -o $@ $(ccache_objs) $(all_ldflags) 
  $(extra_libs) $(LIBS)
  test/main$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs)
  $(CC) $(all_cflags) -o $@ $(base_objs) $(test_objs) 
  $(all_ldflags) $(extra_libs) $(LIBS)
  
  and of course -lz isn't a valid dependency.
 
 that's not really true.  make will expand it internally into paths 
 like 
 /usr/lib/libz.so.

FWIW We encountered the same problem when cross compiling from x86_64
for armv[67]l ccache with the Void Linux binary package build system.
Compiling for the native architecture worked as expected.

 that said, there's no value anymore in putting -l flags into the deps 
 list
 and should just omit it from builds.
 -mike

Yes, please. Simply stripping $(extra_libs) from the dependencies for
ccache$(EXEEXT) solved the issue for us as well.

Jürgen


___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache