mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
make linking against libstdc++ the default, overrideable via use-libstdcpp make parameter
This commit is contained in:
parent
8549ab856e
commit
f38a55cbb2
9
makefile
9
makefile
@ -62,7 +62,14 @@ build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
|
|||||||
|
|
||||||
cflags = $(build-cflags)
|
cflags = $(build-cflags)
|
||||||
|
|
||||||
common-lflags = -lm -lz -lstdc++
|
use-libstdcpp = true
|
||||||
|
|
||||||
|
common-lflags = -lm -lz
|
||||||
|
|
||||||
|
ifeq ($(use-libstdcpp),true)
|
||||||
|
common-lflags += -lstdc++
|
||||||
|
common-cflags += -DUSE_LIBSTDCPP
|
||||||
|
endif
|
||||||
|
|
||||||
build-lflags =
|
build-lflags =
|
||||||
|
|
||||||
|
@ -11,10 +11,12 @@
|
|||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
|
|
||||||
// since we don't link against libstdc++, we must implement some dummy
|
#ifndef USE_LIBSTDCPP
|
||||||
// functions:
|
// since we aren't linking against libstdc++, we must implement some
|
||||||
|
// dummy functions:
|
||||||
extern "C" void __cxa_pure_virtual(void) { abort(); }
|
extern "C" void __cxa_pure_virtual(void) { abort(); }
|
||||||
void operator delete(void*) { abort(); }
|
void operator delete(void*) { abort(); }
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
# define EXPORT __declspec(dllexport)
|
# define EXPORT __declspec(dllexport)
|
||||||
|
Loading…
Reference in New Issue
Block a user