Commit graph

1136 commits

Author SHA1 Message Date
Kp 625bfde977 Tighten test for warning -Wuseless-cast
zicodxx reported a compiler error when using inheriting constructors
when using an unspecified environment.  Investigation shows that gcc-6.x
has a regression that causes spurious -Wuseless-cast warnings where the
compiler automatically synthesizes a cast, then warns the user that the
synthesized cast is useless.

Compensate for this by extending the -Wuseless-cast testcase to provoke
this bug, if present.  Affected users will lose -Wuseless-cast, but
their build will succeed.

Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/316>
2017-02-08 23:34:41 +00:00
Kp 51710ba9db Default to -fno-omit-frame-pointer for Windows
Popular Windows tools for stack unwinding lack support for the DWARF
debug format.  Unwinding the stack without DWARF is unreliable without
frame pointers.  Default frame pointers to enabled for Windows so that
these tools work despite their lack of DWARF support.
2017-01-11 03:03:19 +00:00
Kp d2dc321528 Fix sconf.log version output 2017-01-08 22:32:01 +00:00
Kp 55822d0b4d Add wrappers for more precise Valgrind physfs diagnostics 2017-01-01 23:19:21 +00:00
Kp 61fe5c2bbd Add undocumented CPP/CXX/LINK flags that bypass SConf testing
These flags are passed through to the underlying build, but not checked
by the SConf tests.  They are meant for options which will work in the
main build, but fail in the configure environment, such as `-Wl,--wrap`.
2017-01-01 23:19:21 +00:00
Kp 265af2b9e5 Extend SConf diagnostics for failed system headers 2016-12-22 05:21:17 +00:00
Kp 9a45534ccc Require support for reference qualified methods 2016-12-10 17:51:07 +00:00
Kp ea040f100d Cache SConstruct startup variables 2016-12-10 17:51:07 +00:00
Kp aaea5411e1 Only set -Wunused if __attribute__((unused)) works 2016-12-05 00:26:08 +00:00
Kp 16d2a3f866 Fix pch build
Move DXX_VERSION_SEQ from DXXProgram to DXXCommon to make it visible to
DXXArchive.configure_environment().  If pch is enabled, define
DXX_VERSION_SEQ in dxxsconf.h and remove it from the command line.  This
fixes a build failure where gcc ignored ownpch.cpp.gch because it was
built without DXX_VERSION_SEQ, but some files were built with
DXX_VERSION_SEQ.
2016-11-26 22:51:47 +00:00
Kp da50b79fb9 Fix syspch build 2016-11-26 22:51:47 +00:00
Kp 73d014c048 Tighten getaddrinfo test
To recognize getaddrinfo as supported, require that the AI_* flags
passed to it be usable:
- AI_NUMERICSERV must be defined as a number or be undefined
- If ipv6=1, then AI_V4MAPPED and AI_ALL must be defined as numbers

When getaddrinfo is used, raise _WIN32_WINNT from 0x501 to 0x600.
Otherwise, lower it to 0x500.
2016-11-12 20:58:16 +00:00
zico ad638539d6 Setting version number to 0.59.100 for upcoming public BETA. 2016-11-12 16:07:21 +01:00
Kp 1ba67c0d30 Test whether SDL_endian.h provokes -Wuseless-cast warning
derhass reports that SDL on Raspbian provokes a warning from
-Wuseless-cast.  Add a test that will report -Wuseless-cast as unusable
when SDL causes this warning.  Developers on Raspbian will not get the
benefit of -Wuseless-cast, but their build will succeed.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/257>
2016-10-30 18:37:28 +00:00
Kp 458070a080 Add test and fallback for extended identifiers
Extended identifiers are convenient when supported, but derhass reports
that the latest stable gcc on Raspbian stable fails the test for
mandatory extended identifier support.  Replace the Cxx11RequiredFeature
test for extended identifiers with an SConf test to selectively enable
-fextended-identifiers.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/254>
Fixes: a8a41aa2ff ("Move git version into Python class")
2016-10-29 23:16:19 +00:00
Kp c2626ea488 Default poison to 'overwrite' in debug builds 2016-10-29 23:16:16 +00:00
Kp a8a41aa2ff Move git version into Python class 2016-10-21 02:16:47 +00:00
Kp d6ccaf9dec Defer show_partial_environ until after adding -g,-O2 2016-10-15 17:51:48 +00:00
Kp 3dd988d1b6 Pass DXX_VERSION_SEQ only to files that use it 2016-10-15 00:53:19 +00:00
Kp 95cd7fd368 Pass SHAREPATH only to files that use it 2016-10-15 00:53:18 +00:00
Kp 8d98eb474e Move DXX_WORDS_NEED_ALIGNMENT to user settings
Previously, raspberrypi mode forced DXX_WORDS_NEED_ALIGNMENT on and any
other mode forced it off.  Add a specific user setting for
DXX_WORDS_NEED_ALIGNMENT.  Set its default as bool(raspberrypi) to
preserve the previous special case.
2016-10-09 17:35:03 +00:00
Kp 7cf9fc6dd9 Move endian handling into SConf
This allows per-target overrides, instead of a single global override as
the older method provided.
2016-10-09 17:35:03 +00:00
Kp b02375bfbd Rename WORDS_NEED_ALIGNMENT to DXX_WORDS_NEED_ALIGNMENT
Rename symbol WORDS_NEED_ALIGNMENT to DXX_WORDS_NEED_ALIGNMENT to show that it is a DXX
symbol, not one inherited from a library.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl WORDS_NEED_ALIGNMENT -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(WORDS_NEED_ALIGNMENT\)\>/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(WORDS_NEED_ALIGNMENT\))/#\1if \2DXX_\3/' -e 's/^\s*#ifndef \(WORDS_NEED_ALIGNMENT\)\>/#if !DXX_\1/'
2016-10-09 17:35:03 +00:00
Kp 9dc30c6499 Fix build when poison=None
Fixes: 03dbc96103 ("Switch DXX_HAVE_POISON to 0/1 instead of undef/defined")
2016-10-09 17:35:02 +00:00
Kp b195b3077b Switch DXX_HAVE_POISON_VALGRIND to 0/1 instead of undef/defined 2016-10-08 23:24:21 +00:00
Kp 0ad0a57fea Switch DXX_HAVE_POISON_OVERWRITE to 0/1 instead of undef/defined 2016-10-08 23:24:21 +00:00
Kp 03dbc96103 Switch DXX_HAVE_POISON to 0/1 instead of undef/defined 2016-10-08 23:24:21 +00:00
Kp da4f55f47e Show some environment values before/after sconf runs 2016-10-02 00:34:50 +00:00
Kp 08f6653fcd Split check_builtin_constant_p override 2016-10-02 00:34:39 +00:00
Kp cd4e5441ba Rename WORDS_BIGENDIAN to DXX_WORDS_BIGENDIAN
Rename symbol WORDS_BIGENDIAN to DXX_WORDS_BIGENDIAN to show that it is a DXX
symbol, not one inherited from a library.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl WORDS_BIGENDIAN -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(WORDS_BIGENDIAN\)\>/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(WORDS_BIGENDIAN\))/#\1if \2DXX_\3/' -e 's/^\s*#ifndef \(WORDS_BIGENDIAN\)\>/#if !DXX_\1/'
2016-09-30 01:49:57 +00:00
Kp 9da6507e82 Remove test DXX_HAVE_CONSTEXPR_UNION_CONSTRUCTOR
Test DXX_HAVE_CONSTEXPR_UNION_CONSTRUCTOR probes for a bug present in
<=gcc-4.7.x.  Rebirth now rejects <=gcc-4.8.x for other reasons, so all
supported gcc versions pass test DXX_HAVE_CONSTEXPR_UNION_CONSTRUCTOR.
Remove the test.
2016-09-25 04:52:49 +00:00
Kp 4894117d70 Rename MAX_HATS_PER_JOYSTICK to DXX_MAX_HATS_PER_JOYSTICK
Rename symbol MAX_HATS_PER_JOYSTICK to DXX_MAX_HATS_PER_JOYSTICK
to show that it is a DXX symbol, not one inherited from a library.

git grep -lzw MAX_HATS_PER_JOYSTICK -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_HATS_PER_JOYSTICK\>/DXX_&/g'
2016-09-25 04:52:49 +00:00
Kp 94937de128 Rename MAX_BUTTONS_PER_JOYSTICK to DXX_MAX_BUTTONS_PER_JOYSTICK
Rename symbol MAX_BUTTONS_PER_JOYSTICK to DXX_MAX_BUTTONS_PER_JOYSTICK
to show that it is a DXX symbol, not one inherited from a library.

git grep -lzw MAX_BUTTONS_PER_JOYSTICK -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_BUTTONS_PER_JOYSTICK\>/DXX_&/g'
2016-09-25 04:52:49 +00:00
Kp 7d38a9f0be Rename MAX_AXES_PER_JOYSTICK to DXX_MAX_AXES_PER_JOYSTICK
Rename symbol MAX_AXES_PER_JOYSTICK to DXX_MAX_AXES_PER_JOYSTICK to show
that it is a DXX symbol, not one inherited from a library.

git grep -lzw MAX_AXES_PER_JOYSTICK -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_AXES_PER_JOYSTICK\>/DXX_&/g'
2016-09-25 04:52:49 +00:00
Kp f24e9f836c Rename MAX_JOYSTICKS to DXX_MAX_JOYSTICKS
Rename symbol MAX_JOYSTICKS to DXX_MAX_JOYSTICKS to show that it is a DXX
symbol, not one inherited from a library.

git grep -lzw MAX_JOYSTICKS -- SConstruct '*.h' '*.cpp' | xargs -0 sed -i -e 's/\<MAX_JOYSTICKS\>/DXX_&/g'
2016-09-25 04:52:48 +00:00
Kp 335a87b994 Probe pkgconfig modversion 2016-09-25 04:52:48 +00:00
Kp 8585bd7d7c Change LazyObjectConstructor to nested comprehension 2016-09-24 18:06:11 +00:00
Kp 62b58e9890 Move OGL to dxxsconf.h; rename to DXX_USE_OGL
Rename symbol OGL to DXX_USE_OGL to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -lzw OGL -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGL/\1 DXX_USE_OGL/' -e 's/\(\s*#\s*if\)ndef OGL/\1 !DXX_USE_OGL/' -e 's/\(\s*#\s*if !\?\)defined(OGL)/\1DXX_USE_OGL/'
2016-09-24 18:06:11 +00:00
Kp 3544ea097d Move OGLES to dxxsconf.h; rename to DXX_USE_OGLES
Rename symbol OGLES to DXX_USE_OGLES to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -lzw OGLES -- '*.h' '*.cpp' | xargs -0 sed -i -e 's/\(\s*#\s*if\)def\s*OGLES/\1 DXX_USE_OGLES/' -e 's/\(\s*#\s*if\)ndef OGLES/\1 !DXX_USE_OGLES/'
2016-09-24 18:06:11 +00:00
Kp 9ef9bd2445 Fix SConstruct pcall cache bug
Caching pcall as a default argument interfered with hotpatching pcall to
become an appropriate implementation after testing for the presence of
git.
2016-09-24 18:06:10 +00:00
Chris Taylor e7bb902d35 Allow frameworks and libraries to be packaged into the DXX-Rebirth app bundle for Mac OS X (under Contents/Frameworks).
Previously this could be achieved by setting the install path to @executable_path/../Frameworks/<path to framework> for each framework or library, but for Mac OS X 10.5 onwards, these frameworks (namely SDL and SDL_mixer) are set by default to install to @rpath for greater flexibility. @rpath is then set by the binary, in this case DXX-Rebirth to @loader_path/../Frameworks via SCons.

On Mac OS X it is common practice to distribute applications with any frameworks or libraries specific to that application within the application bundle.
2016-09-20 15:18:50 +08:00
Kp 94cc8c4d78 Blacklist -Wold-style-cast on buggy clang versions
clang on OS X incorrectly diagnoses mistakes in Apple system headers
even when -Wsystem-headers is not specified.  Move -Wold-style-cast from
the forced CXXFLAGS section to an SConf test that includes one of the
deficient headers.  This should cause SConf to declare OS X clang as
unable to use -Wold-style-cast, which is necessary to avoid spurious
failures when including Apple headers that use old style casts.
2016-09-15 01:50:56 +00:00
Kp 2ccb4e7066 Fix SCons OS X get_platform_objects build error 2016-09-14 01:59:32 +00:00
Kp 9a8bd1aecb Add disabled tests for curl/jsoncpp
The legacy UDP tracker does not need either curl or jsoncpp.
The new HTTP tracker requires both.  Add tests for both, guarded by
`use_tracker`.  Force `use_tracker` to False for now.  When the HTTP
tracker is made active, remove the assignment so that use_tracker=1 will
enable the new tests.
2016-09-11 18:49:16 +00:00
Kp be691aba0b Move git extra version from DXXProgram to Git 2016-09-11 18:49:16 +00:00
Kp 6a3ded191f Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
Kp 0015b4282c Move IPv6 to dxxsconf.h; rename to DXX_USE_IPv6
Rename symbol IPv6 to DXX_USE_IPv6 to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl IPv6 -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(IPv6\)$/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(IPv6\))/#\1if \2DXX_USE_\3/'
2016-09-11 18:49:15 +00:00
Kp 435aa5a020 Move USE_UDP to dxxsconf.h; rename to DXX_USE_UDP
Rename symbol USE_UDP to DXX_USE_UDP to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_UDP -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(USE_UDP\)$/#if DXX_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(USE_UDP\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp 7c8c2b5aa4 Move USE_TRACKER to dxxsconf.h; rename to DXX_USE_TRACKER
Rename symbol USE_TRACKER to DXX_USE_TRACKER to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_TRACKER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_TRACKER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_TRACKER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp ddf888cd72 Move USE_SDLMIXER to dxxsconf.h; rename to DXX_USE_SDLMIXER
Rename symbol USE_SDLMIXER to DXX_USE_SDLMIXER to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct and
inferno.cpp were manual.

git grep -l USE_SDLMIXER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_SDLMIXER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_SDLMIXER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00