From 66b7f4bb8e0028b0dde4a5acdd8e75be84f16036 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 19 Oct 2012 00:31:19 +0200 Subject: [PATCH 1/3] Enable RTTI by default (overriding npm default) --- binding.gyp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index e27bc44..2008070 100644 --- a/binding.gyp +++ b/binding.gyp @@ -8,6 +8,7 @@ ], 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], + 'cflags_cc!': [ '-fno-rtti' ], 'conditions': [ ['OS=="mac"', { 'include_dirs':['/usr/local/include/opencv'], @@ -90,4 +91,4 @@ ] ] }] -} \ No newline at end of file +} From 555879339f6a9599a1f06813a8f416fa31ae7529 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 19 Oct 2012 00:33:52 +0200 Subject: [PATCH 2/3] Enable RTTI by default for linux (another method, with conditionals) --- binding.gyp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 2008070..dab8cb5 100644 --- a/binding.gyp +++ b/binding.gyp @@ -8,8 +8,14 @@ ], 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], - 'cflags_cc!': [ '-fno-rtti' ], 'conditions': [ + [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', + { + 'cflags_cc!': ['-fno-rtti'], + 'cflags_cc+': ['-frtti'], + } + ], + ['OS=="mac"', { 'include_dirs':['/usr/local/include/opencv'], 'xcode_settings': { From 3a390449016b7e38fb4670b4e7319addd13fcd96 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 19 Oct 2012 09:10:25 +0200 Subject: [PATCH 3/3] Created all build/link flags for linux compilation. --- binding.gyp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/binding.gyp b/binding.gyp index dab8cb5..4321e8b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -9,13 +9,14 @@ 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'conditions': [ - [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', - { + [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"',{ + 'ldflags': [ '