[hatari-devel] Issues with CMake/CMakeLists.txt
Eero Tamminen
eerot at users.berlios.de
Tue Mar 23 00:30:50 CET 2010
Hi,
On Tuesday 23 March 2010, Thomas Huth wrote:
> Well, it works for me because my zlib.h (version 1.2.3.3, October 2nd,
> 2006) looks like this here:
>
> #if defined(_LARGEFILE64_SOURCE) || _FILE_OFFSET_BITS == 64
> ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
> ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
> ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
> ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
> ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
> #endif
>
> Which IMHO makes also more sense. Why shouldn't the prototypes be
> declared when the #defines remap the functions to the 64-bit versions?
My zlib.h version seems the same:
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.3.3, October 2nd, 2006
It's in zlib1g-dev package version is 1:1.2.3.3.dfsg.
And if you look at the original source package here:
http://packages.debian.org/lenny/zlib1g-dev
This thing comes from upstream version, not Debian patch.
But the _GNU_SOURCE missing causes also warnings about isblank().
(isblank() conforms to POSIX.1-2001 and C99 7.4.1.3)
>> As to using a CMake debug build to get asserts, that doesn't optimize
>> code and therefore doesn't get build time warnings so it's about
>> useless.
>
> Well, -O3 often breaks debug builds, because on some systems you then
> can't use the debugger anymore.
>
> > Then there's RELWITHDEBINFO which uses -g && -O2, but that doesn't
> > enable asserts either.
>
> Hm, I think we could also easily tweak this setup, so that asserts get
> enabled there. Or we simply introduce our own build style, that has -O3
> and asserts enabled... does that sound ok for you?
I usually use -O2 -g without turning asserts off which I think is
a normal devel setup (making a release is once-a-year event, but
development I do nearly daily and on many days compile Hatari many
times :-).
I haven't see any real run-time speed benefit from -O3 and it makes the
binary larger & compilation slower in addition to generating those bogus
gcc compiler warnings[1].
- Eero
[1] To be fair, it's not specific to O3, they just happen to happen with O3
with Hatari code.
More information about the hatari-devel
mailing list