sdl: import an upstream fix for a bakward-cpp issue with clang that was previously haked around in the build script
This commit is contained in:
parent
031972adb7
commit
4a7aff2eac
|
@ -27,7 +27,7 @@ opts.AddVariables(
|
|||
BoolVariable('SYSTEM_LUA','Use system lua instead of static lua provided with fceux', 1),
|
||||
BoolVariable('SYSTEM_MINIZIP', 'Use system minizip instead of static minizip provided with fceux', 0),
|
||||
BoolVariable('LSB_FIRST', 'Least signficant byte first (non-PPC)', 1),
|
||||
BoolVariable('CLANG', 'Compile with llvm-clang instead of gcc', 0),
|
||||
BoolVariable('CLANG', 'Compile with llvm-clang instead of gcc', 1),
|
||||
BoolVariable('SDL2', 'Compile using SDL2 instead of SDL 1.2 (experimental/non-functional)', 0)
|
||||
)
|
||||
AddOption('--prefix', dest='prefix', type='string', nargs=1, action='store', metavar='DIR', help='installation prefix')
|
||||
|
@ -87,9 +87,6 @@ else:
|
|||
if conf.CheckLib('dw'):
|
||||
conf.env.Append(CCFLAGS = "-DBACKWARD_HAS_DW=1")
|
||||
conf.env.Append(LINKFLAGS = "-ldw")
|
||||
# workaround for upstream backward-cpp issue (https://github.com/bombela/backward-cpp/issues/2)
|
||||
if env['CLANG']:
|
||||
conf.env.Append(CCFLAGS = "-DBACKWARD_HAS_BACKTRACE=1")
|
||||
if conf.CheckFunc('asprintf'):
|
||||
conf.env.Append(CCFLAGS = "-DHAVE_ASPRINTF")
|
||||
if env['SYSTEM_MINIZIP']:
|
||||
|
|
|
@ -146,6 +146,23 @@
|
|||
|
||||
# if BACKWARD_HAS_UNWIND == 1
|
||||
# include <unwind.h>
|
||||
// while gcc's unwind.h defines something like that:
|
||||
// extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
|
||||
// extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
|
||||
//
|
||||
// clang's unwind.h defines something like this:
|
||||
// uintptr_t _Unwind_GetIP(struct _Unwind_Context* __context);
|
||||
//
|
||||
// Even if the _Unwind_GetIPInfo can be linked to, it is not declared, worse we
|
||||
// cannot just redeclare it because clang's unwind.h doesn't define _Unwind_Ptr
|
||||
// anyway.
|
||||
//
|
||||
// Luckily we can play on the fact that the guard macros have a different name:
|
||||
#ifdef __CLANG_UNWIND_H
|
||||
// In fact, this function still comes from libgcc (on my different linux boxes,
|
||||
// clang links against libgcc).
|
||||
extern "C" uintptr_t _Unwind_GetIPInfo(_Unwind_Context*, int*);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
# include <cxxabi.h>
|
||||
|
|
Loading…
Reference in New Issue