make linking against libstdc++ the default, overrideable via use-libstdcpp make parameter

This commit is contained in:
Joel Dice 2008-10-13 16:31:59 -06:00
parent 8549ab856e
commit f38a55cbb2
2 changed files with 12 additions and 3 deletions

View File

@ -62,7 +62,14 @@ build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \
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 =

View File

@ -11,10 +11,12 @@
#include "stdint.h"
#include "stdlib.h"
// since we don't link against libstdc++, we must implement some dummy
// functions:
#ifndef USE_LIBSTDCPP
// since we aren't linking against libstdc++, we must implement some
// dummy functions:
extern "C" void __cxa_pure_virtual(void) { abort(); }
void operator delete(void*) { abort(); }
#endif
#ifdef __MINGW32__
# define EXPORT __declspec(dllexport)