diff mbox series

[1/1] package/libloki: fix build with gcc 11

Message ID 20210801121336.3054884-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/libloki: fix build with gcc 11 | expand

Commit Message

Fabrice Fontaine Aug. 1, 2021, 12:13 p.m. UTC
Fix the following build failure with gcc 11:

In file included from ../include/loki/SmartPtr.h:33,
                 from SmartPtr.cpp:20:
../include/loki/SmallObj.h: At global scope:
../include/loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications
  462 |         static void * operator new ( std::size_t size ) throw ( std::bad_alloc )
      |

Fixes:
 - http://autobuild.buildroot.org/results/768727160beaca5df3ef18be29cfbaa3ced67ad5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libloki/libloki.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Yann E. MORIN Aug. 1, 2021, 6:47 p.m. UTC | #1
Fabrice, All,

On 2021-08-01 14:13 +0200, Fabrice Fontaine spake thusly:
> Fix the following build failure with gcc 11:
> 
> In file included from ../include/loki/SmartPtr.h:33,
>                  from SmartPtr.cpp:20:
> ../include/loki/SmallObj.h: At global scope:
> ../include/loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications
>   462 |         static void * operator new ( std::size_t size ) throw ( std::bad_alloc )
>       |
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/768727160beaca5df3ef18be29cfbaa3ced67ad5
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/libloki/libloki.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/libloki/libloki.mk b/package/libloki/libloki.mk
> index 7564239f6a..07a9372df9 100644
> --- a/package/libloki/libloki.mk
> +++ b/package/libloki/libloki.mk
> @@ -23,6 +23,7 @@ endif
>  
>  define LIBLOKI_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
> +		CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" \
>  		-C $(@D) $(LIBLOKI_BUILD_TARGETS)
>  endef
>  
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Peter Korsgaard Aug. 7, 2021, 7:18 p.m. UTC | #2
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with gcc 11:
 > In file included from ../include/loki/SmartPtr.h:33,
 >                  from SmartPtr.cpp:20:
 > ../include/loki/SmallObj.h: At global scope:
 > ../include/loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications
 >   462 |         static void * operator new ( std::size_t size ) throw ( std::bad_alloc )
 >       |

 > Fixes:
 >  - http://autobuild.buildroot.org/results/768727160beaca5df3ef18be29cfbaa3ced67ad5

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2021.02.x and 2021.05.x, thanks.
diff mbox series

Patch

diff --git a/package/libloki/libloki.mk b/package/libloki/libloki.mk
index 7564239f6a..07a9372df9 100644
--- a/package/libloki/libloki.mk
+++ b/package/libloki/libloki.mk
@@ -23,6 +23,7 @@  endif
 
 define LIBLOKI_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" \
 		-C $(@D) $(LIBLOKI_BUILD_TARGETS)
 endef