diff --git a/dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch b/dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch
index f051ea02b4c..f3433cabb31 100644
--- a/dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch
+++ b/dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch
@@ -32,4 +32,37 @@ PR: https://github.com/FirebirdSQL/firebird/pull/104
 +		static_cast<SCHAR>(blr_end),
  		blr_eoc
  	};
- 	static FB_API_HANDLE req_handle;
\ No newline at end of file
+ 	static FB_API_HANDLE req_handle;
+--- a/src/include/fb_blk.h	2017-12-04 15:52:55.975910661 +0100
++++ b/src/include/fb_blk.h	2017-12-04 15:24:59.977111454 +0100
+@@ -170,8 +170,8 @@
+ 
+ private:
+     // These operators are off-limits
+-	void* operator new(size_t s) { return 0; }
+-    void* operator new[](size_t s) { return 0; }
++	void* operator new(size_t s) throw() { return 0; }
++    void* operator new[](size_t s) throw() { return 0; }
+ };
+ 
+ template<typename RPT, BlockType BLOCK_TYPE = type_unknown>
+@@ -193,7 +193,7 @@
+ 
+ private:
+     // These operations are not supported on static repeat-base objects
+-    void* operator new[](size_t s, MemoryPool& p)
++    void* operator new[](size_t s, MemoryPool& p) throw()
+         { return 0; }
+     void operator delete[](void* mem, MemoryPool& p)
+         { }
+@@ -201,8 +201,8 @@
+ 		{ }
+ 
+     // These operators are off-limits
+-	void* operator new(size_t s) { return 0; }
+-    void* operator new[](size_t s) { return 0; }
++	void* operator new(size_t s) throw() { return 0; }
++    void* operator new[](size_t s) throw() { return 0; }
+ };
+ 
+ #endif	// INCLUDE_FB_BLK
diff --git a/dev-db/firebird/firebird-2.5.7.27050.0.ebuild b/dev-db/firebird/firebird-2.5.7.27050.0.ebuild
index b6e56990fd8..dc66837b4fc 100644
--- a/dev-db/firebird/firebird-2.5.7.27050.0.ebuild
+++ b/dev-db/firebird/firebird-2.5.7.27050.0.ebuild
@@ -88,6 +88,7 @@ src_prepare() {
 src_configure() {
 	filter-flags -fprefetch-loop-arrays
 	filter-mfpmath sse
+	append-cxxflags -flifetime-dse=1 -fno-sized-deallocation -fno-delete-null-pointer-checks
 
 	econf \
 		--prefix=/usr/$(get_libdir)/firebird \