From: Tae-Young Chung Date: Fri, 16 Jun 2023 01:32:31 +0000 (+0900) Subject: Fix build break on gcc13 X-Git-Tag: accepted/tizen/unified/dev/20230726.115425^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_dev;p=platform%2Fupstream%2Fglog.git Fix build break on gcc13 This commit is cherry-picked from upstream issue #332(https://github.com/google/glog/pull/332) ----------------- From: NeroBurner Date: Thu, 21 Jun 2018 14:02:46 +0200 Subject: tests: fix compilation with C++17 Remove throw() commands as they were deprecated with C++11 and are removed with C++17 ---------------- Change-Id: I11e58ebf28b03b48bd81ca26b685d8765560067b Signed-off-by: Tae-Young Chung --- diff --git a/packaging/0001-fix-build-break-on-tizen-gcc13.patch b/packaging/0001-fix-build-break-on-tizen-gcc13.patch new file mode 100644 index 0000000..d3cc4fd --- /dev/null +++ b/packaging/0001-fix-build-break-on-tizen-gcc13.patch @@ -0,0 +1,30 @@ +diff --git a/src/googletest.h b/src/googletest.h +index 12ea454..bc20305 100644 +--- a/src/googletest.h ++++ b/src/googletest.h +@@ -576,21 +576,21 @@ void (*g_new_hook)() = NULL; + + _END_GOOGLE_NAMESPACE_ + +-void* operator new(size_t size) throw(std::bad_alloc) { ++void* operator new(size_t size) { + if (GOOGLE_NAMESPACE::g_new_hook) { + GOOGLE_NAMESPACE::g_new_hook(); + } + return malloc(size); + } + +-void* operator new[](size_t size) throw(std::bad_alloc) { ++void* operator new[](size_t size) { + return ::operator new(size); + } + +-void operator delete(void* p) throw() { ++void operator delete(void* p) { + free(p); + } + +-void operator delete[](void* p) throw() { ++void operator delete[](void* p) { + ::operator delete(p); + } diff --git a/packaging/glog.spec b/packaging/glog.spec index b4996d5..d84938a 100644 --- a/packaging/glog.spec +++ b/packaging/glog.spec @@ -13,6 +13,7 @@ License: BSD Vendor: Google Packager: Google Inc. Source: %{name}-%{version}.tar.gz +Patch0: 0001-fix-build-break-on-tizen-gcc13.patch Distribution: Redhat 7 and above. Prefix: %prefix @@ -37,6 +38,8 @@ files for developing applications that use the %name package. %prep %setup +%patch0 -p1 + %build %autogen.sh ./configure