Re: [OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-18 Thread Alexander Kanavin
Don't bother, it looks abandoned:
https://salsa.debian.org/installer-team/mklibs

Alex

On Tue, 18 May 2021 at 11:19, Jacob Kroon  wrote:

> On 5/18/21 12:20 AM, Khem Raj wrote:
> >
> >
> > On 5/17/21 10:01 AM, Jacob Kroon wrote:
> >> In gcc 11 the default mode for C++ is now -std=gnu++17 instead of
> >> -std=gnu++14,
> >> in which support for dynamic exception specifications has been removed.
> >>
> >> See
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
> >>
> >> Signed-off-by: Jacob Kroon 
> >> ---
> >>   .../no-dynamic-exception-specifications.patch | 420 ++
> >>   .../mklibs/mklibs-native_0.1.44.bb|   1 +
> >>   2 files changed, 421 insertions(+)
> >>   create mode 100644
> >>
> meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>
> >>
> >>
> >> diff --git
> >>
> a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>
> >>
> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>
> >>
> >> new file mode 100644
> >> index 00..5989a67c4f
> >> --- /dev/null
> >> +++
> >>
> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>
> >>
> >> @@ -0,0 +1,420 @@
> >> +In gcc 11 the default mode for C++ is now -std=gnu++17 instead of
> >> -std=gnu++14,
> >> +in which support for dynamic exception specifications has been removed.
> >> +
> >> +See
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
> >> +
> >> +Upstream-Status: Pending
> >> +
> >
> > the patch could be submitted upstream. Please try to do so
> >
>
> I tried to find a mailing list or maintainer I could post the patch to,
> but I'm not able to. Does anyone know who I should contact ?
>
> Given that it sounds more likely that we'll remove mklibs, I'll try to
> forward the patch to the project, but not promising anything.
>
> /Jacob
>
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152024): 
https://lists.openembedded.org/g/openembedded-core/message/152024
Mute This Topic: https://lists.openembedded.org/mt/82891868/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-18 Thread Jacob Kroon

On 5/18/21 12:20 AM, Khem Raj wrote:



On 5/17/21 10:01 AM, Jacob Kroon wrote:
In gcc 11 the default mode for C++ is now -std=gnu++17 instead of 
-std=gnu++14,

in which support for dynamic exception specifications has been removed.

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html

Signed-off-by: Jacob Kroon 
---
  .../no-dynamic-exception-specifications.patch | 420 ++
  .../mklibs/mklibs-native_0.1.44.bb    |   1 +
  2 files changed, 421 insertions(+)
  create mode 100644 
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch 



diff --git 
a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch 
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch 


new file mode 100644
index 00..5989a67c4f
--- /dev/null
+++ 
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch 


@@ -0,0 +1,420 @@
+In gcc 11 the default mode for C++ is now -std=gnu++17 instead of 
-std=gnu++14,

+in which support for dynamic exception specifications has been removed.
+
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
+
+Upstream-Status: Pending
+


the patch could be submitted upstream. Please try to do so



I tried to find a mailing list or maintainer I could post the patch to, 
but I'm not able to. Does anyone know who I should contact ?


Given that it sounds more likely that we'll remove mklibs, I'll try to 
forward the patch to the project, but not promising anything.


/Jacob

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152022): 
https://lists.openembedded.org/g/openembedded-core/message/152022
Mute This Topic: https://lists.openembedded.org/mt/82891868/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-17 Thread Khem Raj



On 5/17/21 10:01 AM, Jacob Kroon wrote:

In gcc 11 the default mode for C++ is now -std=gnu++17 instead of -std=gnu++14,
in which support for dynamic exception specifications has been removed.

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html

Signed-off-by: Jacob Kroon 
---
  .../no-dynamic-exception-specifications.patch | 420 ++
  .../mklibs/mklibs-native_0.1.44.bb|   1 +
  2 files changed, 421 insertions(+)
  create mode 100644 
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch

diff --git 
a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch 
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
new file mode 100644
index 00..5989a67c4f
--- /dev/null
+++ 
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
@@ -0,0 +1,420 @@
+In gcc 11 the default mode for C++ is now -std=gnu++17 instead of -std=gnu++14,
+in which support for dynamic exception specifications has been removed.
+
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
+
+Upstream-Status: Pending
+


the patch could be submitted upstream. Please try to do so


+Signed-off-by: Jacob Kroon 
+
+Index: mklibs-0.1.44/src/mklibs-readelf/elf.cpp
+===
+--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.cpp
 mklibs-0.1.44/src/mklibs-readelf/elf.cpp
+@@ -36,7 +36,7 @@ file::~file () throw ()
+ delete *it;
+ }
+
+-file *file::open (const char *filename) throw (std::bad_alloc, 
std::runtime_error)
++file *file::open (const char *filename)
+ {
+   struct stat buf;
+   int fd;
+@@ -72,7 +72,7 @@ file *file::open (const char *filename)
+ }
+
+ template
+-file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, 
std::runtime_error)
++file *file::open_class(uint8_t *mem, size_t len)
+ {
+   switch (mem[EI_DATA])
+   {
+@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, siz
+ }
+
+ template 
+-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw 
(std::bad_alloc, std::runtime_error)
++file_data<_class, _data>::file_data(uint8_t *mem, size_t len)
+ : file(mem, len)
+ {
+   if (mem[EI_CLASS] != _class::id)
+@@ -190,7 +190,7 @@ section_data<_class, _data>::section_dat
+ }
+
+ template 
+-void section_data<_class, _data>::update(const file ) throw 
(std::bad_alloc)
++void section_data<_class, _data>::update(const file )
+ {
+   const section_type  =
+ dynamic_cast 
&>(file.get_section(file.get_shstrndx()));
+@@ -204,7 +204,7 @@ section_type::~sec
+ }
+
+ template 
+-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, 
uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, 
uint8_t *mem)
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_DYNAMIC)
+@@ -221,7 +221,7 @@ section_real<_class, _data, section_type
+ }
+
+ template 
+-void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
)
+ {
+   section_data<_class, _data>::update(file);
+
+@@ -243,7 +243,7 @@ section_type::~sect
+ }
+
+ template 
+-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, 
uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, 
uint8_t *mem)
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_DYNSYM)
+@@ -260,7 +260,7 @@ section_real<_class, _data, section_type
+ }
+
+ template 
+-void section_real<_class, _data, section_type_DYNSYM>::update(const file 
) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_DYNSYM>::update(const file 
)
+ {
+   section_data<_class, _data>::update (file);
+
+@@ -285,7 +285,7 @@ const version_definition *section_type
+-section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr 
*header, uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr 
*header, uint8_t *mem)
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_GNU_verdef)
+@@ -307,7 +307,7 @@ section_real<_class, _data, section_type
+ }
+
+ template 
+-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file 
) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file 
)
+ {
+   section_data<_class, _data>::update(file);
+
+@@ -333,7 +333,7 @@ const version_requirement_entry *section
+
+ template 
+ section_real<_class, _data, section_type_GNU_VERNEED>::
+-section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real(Shdr *header, uint8_t *mem)
+ : section_data<_class, _data> (header, mem)
+ {
+   if (this->type != SHT_GNU_verneed)
+@@ -355,7 +355,7 @@ section_real(Shdr *header, uint8_t *mem)

Re: [OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-17 Thread Alexander Kanavin
FWIW, I have had patches to drop mklibs for a long time:
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/package-version-updates-later

I'd be happy to send them again.

Alex

On Mon, 17 May 2021 at 21:50, Mark Hatle 
wrote:

>
>
> On 5/17/21 2:46 PM, Andre McCurdy wrote:
> > On Mon, May 17, 2021 at 10:05 AM Jacob Kroon 
> wrote:
> >>
> >> In gcc 11 the default mode for C++ is now -std=gnu++17 instead of
> -std=gnu++14,
> >> in which support for dynamic exception specifications has been removed.
> >
> > As much as I'd like to see mklibs fully supported in OE, at some point
> > maybe we should just admit that it doesn't work and there's not enough
> > collective motivation to fix it.
> >
> > For mklibs to work, the build process should generate a PIC .a archive
> > for every .so shared library (ie static libs need to be built and
> > somehow forced to contain PIC object code - which may mean patching
> > Makefiles etc) and then the PIC .a files need to be available
> > alongside the .so libs when mklibs runs. We don't have any support for
> > doing that, so why keep pretending to support mklibs?
>
> We used to have exactly that.  The fact nobody is complaining it doesn't
> work
> tells me nobody is using this and we should remove it.
>
> The need for this on modern (embedded) systems is significantly less with a
> function altnerative to glibc.  (musl)
>
> --Mark
>
> >> See
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
> >>
> >> Signed-off-by: Jacob Kroon 
> >> ---
> >>  .../no-dynamic-exception-specifications.patch | 420 ++
> >>  .../mklibs/mklibs-native_0.1.44.bb|   1 +
> >>  2 files changed, 421 insertions(+)
> >>  create mode 100644
> meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
> >>
> >> diff --git
> a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
> >> new file mode 100644
> >> index 00..5989a67c4f
> >> --- /dev/null
> >> +++
> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
> >> @@ -0,0 +1,420 @@
> >> +In gcc 11 the default mode for C++ is now -std=gnu++17 instead of
> -std=gnu++14,
> >> +in which support for dynamic exception specifications has been removed.
> >> +
> >> +See
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
> >> +
> >> +Upstream-Status: Pending
> >> +
> >> +Signed-off-by: Jacob Kroon 
> >> +
> >> +Index: mklibs-0.1.44/src/mklibs-readelf/elf.cpp
> >> +===
> >> +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.cpp
> >>  mklibs-0.1.44/src/mklibs-readelf/elf.cpp
> >> +@@ -36,7 +36,7 @@ file::~file () throw ()
> >> + delete *it;
> >> + }
> >> +
> >> +-file *file::open (const char *filename) throw (std::bad_alloc,
> std::runtime_error)
> >> ++file *file::open (const char *filename)
> >> + {
> >> +   struct stat buf;
> >> +   int fd;
> >> +@@ -72,7 +72,7 @@ file *file::open (const char *filename)
> >> + }
> >> +
> >> + template
> >> +-file *file::open_class(uint8_t *mem, size_t len) throw
> (std::bad_alloc, std::runtime_error)
> >> ++file *file::open_class(uint8_t *mem, size_t len)
> >> + {
> >> +   switch (mem[EI_DATA])
> >> +   {
> >> +@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, siz
> >> + }
> >> +
> >> + template 
> >> +-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw
> (std::bad_alloc, std::runtime_error)
> >> ++file_data<_class, _data>::file_data(uint8_t *mem, size_t len)
> >> + : file(mem, len)
> >> + {
> >> +   if (mem[EI_CLASS] != _class::id)
> >> +@@ -190,7 +190,7 @@ section_data<_class, _data>::section_dat
> >> + }
> >> +
> >> + template 
> >> +-void section_data<_class, _data>::update(const file ) throw
> (std::bad_alloc)
> >> ++void section_data<_class, _data>::update(const file )
> >> + {
> >> +   const section_type  =
> >> + dynamic_cast
> &>(file.get_section(file.get_shstrndx()));
> >> +@@ -204,7 +204,7 @@ section_type::~sec
> >> + }
> >> +
> >> + template 
> >> +-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr
> *header, uint8_t *mem) throw (std::bad_alloc)
> >> ++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr
> *header, uint8_t *mem)
> >> + : section_data<_class, _data>(header, mem)
> >> + {
> >> +   if (this->type != SHT_DYNAMIC)
> >> +@@ -221,7 +221,7 @@ section_real<_class, _data, section_type
> >> + }
> >> +
> >> + template 
> >> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const
> file ) throw (std::bad_alloc)
> >> ++void section_real<_class, _data, section_type_DYNAMIC>::update(const
> file )
> >> + {
> >> +   section_data<_class, _data>::update(file);
> >> +
> >> +@@ -243,7 +243,7 @@ section_type::~sect
> >> + }
> >> +
> >> + template 
> >> +-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr
> *header, uint8_t 

Re: [OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-17 Thread Mark Hatle


On 5/17/21 2:46 PM, Andre McCurdy wrote:
> On Mon, May 17, 2021 at 10:05 AM Jacob Kroon  wrote:
>>
>> In gcc 11 the default mode for C++ is now -std=gnu++17 instead of 
>> -std=gnu++14,
>> in which support for dynamic exception specifications has been removed.
> 
> As much as I'd like to see mklibs fully supported in OE, at some point
> maybe we should just admit that it doesn't work and there's not enough
> collective motivation to fix it.
> 
> For mklibs to work, the build process should generate a PIC .a archive
> for every .so shared library (ie static libs need to be built and
> somehow forced to contain PIC object code - which may mean patching
> Makefiles etc) and then the PIC .a files need to be available
> alongside the .so libs when mklibs runs. We don't have any support for
> doing that, so why keep pretending to support mklibs?

We used to have exactly that.  The fact nobody is complaining it doesn't work
tells me nobody is using this and we should remove it.

The need for this on modern (embedded) systems is significantly less with a
function altnerative to glibc.  (musl)

--Mark

>> See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
>>
>> Signed-off-by: Jacob Kroon 
>> ---
>>  .../no-dynamic-exception-specifications.patch | 420 ++
>>  .../mklibs/mklibs-native_0.1.44.bb|   1 +
>>  2 files changed, 421 insertions(+)
>>  create mode 100644 
>> meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>>
>> diff --git 
>> a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>>  
>> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>> new file mode 100644
>> index 00..5989a67c4f
>> --- /dev/null
>> +++ 
>> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>> @@ -0,0 +1,420 @@
>> +In gcc 11 the default mode for C++ is now -std=gnu++17 instead of 
>> -std=gnu++14,
>> +in which support for dynamic exception specifications has been removed.
>> +
>> +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Jacob Kroon 
>> +
>> +Index: mklibs-0.1.44/src/mklibs-readelf/elf.cpp
>> +===
>> +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.cpp
>>  mklibs-0.1.44/src/mklibs-readelf/elf.cpp
>> +@@ -36,7 +36,7 @@ file::~file () throw ()
>> + delete *it;
>> + }
>> +
>> +-file *file::open (const char *filename) throw (std::bad_alloc, 
>> std::runtime_error)
>> ++file *file::open (const char *filename)
>> + {
>> +   struct stat buf;
>> +   int fd;
>> +@@ -72,7 +72,7 @@ file *file::open (const char *filename)
>> + }
>> +
>> + template
>> +-file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, 
>> std::runtime_error)
>> ++file *file::open_class(uint8_t *mem, size_t len)
>> + {
>> +   switch (mem[EI_DATA])
>> +   {
>> +@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, siz
>> + }
>> +
>> + template 
>> +-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw 
>> (std::bad_alloc, std::runtime_error)
>> ++file_data<_class, _data>::file_data(uint8_t *mem, size_t len)
>> + : file(mem, len)
>> + {
>> +   if (mem[EI_CLASS] != _class::id)
>> +@@ -190,7 +190,7 @@ section_data<_class, _data>::section_dat
>> + }
>> +
>> + template 
>> +-void section_data<_class, _data>::update(const file ) throw 
>> (std::bad_alloc)
>> ++void section_data<_class, _data>::update(const file )
>> + {
>> +   const section_type  =
>> + dynamic_cast 
>> &>(file.get_section(file.get_shstrndx()));
>> +@@ -204,7 +204,7 @@ section_type::~sec
>> + }
>> +
>> + template 
>> +-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr 
>> *header, uint8_t *mem) throw (std::bad_alloc)
>> ++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr 
>> *header, uint8_t *mem)
>> + : section_data<_class, _data>(header, mem)
>> + {
>> +   if (this->type != SHT_DYNAMIC)
>> +@@ -221,7 +221,7 @@ section_real<_class, _data, section_type
>> + }
>> +
>> + template 
>> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
>> ) throw (std::bad_alloc)
>> ++void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
>> )
>> + {
>> +   section_data<_class, _data>::update(file);
>> +
>> +@@ -243,7 +243,7 @@ section_type::~sect
>> + }
>> +
>> + template 
>> +-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr 
>> *header, uint8_t *mem) throw (std::bad_alloc)
>> ++section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr 
>> *header, uint8_t *mem)
>> + : section_data<_class, _data>(header, mem)
>> + {
>> +   if (this->type != SHT_DYNSYM)
>> +@@ -260,7 +260,7 @@ section_real<_class, _data, section_type
>> + }
>> +
>> + template 
>> +-void section_real<_class, _data, section_type_DYNSYM>::update(const file 
>> ) throw (std::bad_alloc)
>> ++void 

Re: [OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-17 Thread Andre McCurdy
On Mon, May 17, 2021 at 10:05 AM Jacob Kroon  wrote:
>
> In gcc 11 the default mode for C++ is now -std=gnu++17 instead of 
> -std=gnu++14,
> in which support for dynamic exception specifications has been removed.

As much as I'd like to see mklibs fully supported in OE, at some point
maybe we should just admit that it doesn't work and there's not enough
collective motivation to fix it.

For mklibs to work, the build process should generate a PIC .a archive
for every .so shared library (ie static libs need to be built and
somehow forced to contain PIC object code - which may mean patching
Makefiles etc) and then the PIC .a files need to be available
alongside the .so libs when mklibs runs. We don't have any support for
doing that, so why keep pretending to support mklibs?

> See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
>
> Signed-off-by: Jacob Kroon 
> ---
>  .../no-dynamic-exception-specifications.patch | 420 ++
>  .../mklibs/mklibs-native_0.1.44.bb|   1 +
>  2 files changed, 421 insertions(+)
>  create mode 100644 
> meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>
> diff --git 
> a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
>  
> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
> new file mode 100644
> index 00..5989a67c4f
> --- /dev/null
> +++ 
> b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
> @@ -0,0 +1,420 @@
> +In gcc 11 the default mode for C++ is now -std=gnu++17 instead of 
> -std=gnu++14,
> +in which support for dynamic exception specifications has been removed.
> +
> +See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Jacob Kroon 
> +
> +Index: mklibs-0.1.44/src/mklibs-readelf/elf.cpp
> +===
> +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.cpp
>  mklibs-0.1.44/src/mklibs-readelf/elf.cpp
> +@@ -36,7 +36,7 @@ file::~file () throw ()
> + delete *it;
> + }
> +
> +-file *file::open (const char *filename) throw (std::bad_alloc, 
> std::runtime_error)
> ++file *file::open (const char *filename)
> + {
> +   struct stat buf;
> +   int fd;
> +@@ -72,7 +72,7 @@ file *file::open (const char *filename)
> + }
> +
> + template
> +-file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, 
> std::runtime_error)
> ++file *file::open_class(uint8_t *mem, size_t len)
> + {
> +   switch (mem[EI_DATA])
> +   {
> +@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, siz
> + }
> +
> + template 
> +-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw 
> (std::bad_alloc, std::runtime_error)
> ++file_data<_class, _data>::file_data(uint8_t *mem, size_t len)
> + : file(mem, len)
> + {
> +   if (mem[EI_CLASS] != _class::id)
> +@@ -190,7 +190,7 @@ section_data<_class, _data>::section_dat
> + }
> +
> + template 
> +-void section_data<_class, _data>::update(const file ) throw 
> (std::bad_alloc)
> ++void section_data<_class, _data>::update(const file )
> + {
> +   const section_type  =
> + dynamic_cast 
> &>(file.get_section(file.get_shstrndx()));
> +@@ -204,7 +204,7 @@ section_type::~sec
> + }
> +
> + template 
> +-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr 
> *header, uint8_t *mem) throw (std::bad_alloc)
> ++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr 
> *header, uint8_t *mem)
> + : section_data<_class, _data>(header, mem)
> + {
> +   if (this->type != SHT_DYNAMIC)
> +@@ -221,7 +221,7 @@ section_real<_class, _data, section_type
> + }
> +
> + template 
> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
> ) throw (std::bad_alloc)
> ++void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
> )
> + {
> +   section_data<_class, _data>::update(file);
> +
> +@@ -243,7 +243,7 @@ section_type::~sect
> + }
> +
> + template 
> +-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr 
> *header, uint8_t *mem) throw (std::bad_alloc)
> ++section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr 
> *header, uint8_t *mem)
> + : section_data<_class, _data>(header, mem)
> + {
> +   if (this->type != SHT_DYNSYM)
> +@@ -260,7 +260,7 @@ section_real<_class, _data, section_type
> + }
> +
> + template 
> +-void section_real<_class, _data, section_type_DYNSYM>::update(const file 
> ) throw (std::bad_alloc)
> ++void section_real<_class, _data, section_type_DYNSYM>::update(const file 
> )
> + {
> +   section_data<_class, _data>::update (file);
> +
> +@@ -285,7 +285,7 @@ const version_definition *section_type + }
> +
> + template 
> +-section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr 
> *header, uint8_t *mem) throw (std::bad_alloc)
> ++section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr 
> *header, uint8_t *mem)
> + : 

[OE-core] [PATCH] mklibs-native: Fix build with gcc 11

2021-05-17 Thread Jacob Kroon
In gcc 11 the default mode for C++ is now -std=gnu++17 instead of -std=gnu++14,
in which support for dynamic exception specifications has been removed.

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html

Signed-off-by: Jacob Kroon 
---
 .../no-dynamic-exception-specifications.patch | 420 ++
 .../mklibs/mklibs-native_0.1.44.bb|   1 +
 2 files changed, 421 insertions(+)
 create mode 100644 
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch

diff --git 
a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch 
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
new file mode 100644
index 00..5989a67c4f
--- /dev/null
+++ 
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
@@ -0,0 +1,420 @@
+In gcc 11 the default mode for C++ is now -std=gnu++17 instead of -std=gnu++14,
+in which support for dynamic exception specifications has been removed.
+
+See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Jacob Kroon 
+
+Index: mklibs-0.1.44/src/mklibs-readelf/elf.cpp
+===
+--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.cpp
 mklibs-0.1.44/src/mklibs-readelf/elf.cpp
+@@ -36,7 +36,7 @@ file::~file () throw ()
+ delete *it;
+ }
+ 
+-file *file::open (const char *filename) throw (std::bad_alloc, 
std::runtime_error)
++file *file::open (const char *filename)
+ {
+   struct stat buf;
+   int fd;
+@@ -72,7 +72,7 @@ file *file::open (const char *filename)
+ }
+ 
+ template
+-file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, 
std::runtime_error)
++file *file::open_class(uint8_t *mem, size_t len)
+ {
+   switch (mem[EI_DATA])
+   {
+@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, siz
+ }
+ 
+ template 
+-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw 
(std::bad_alloc, std::runtime_error)
++file_data<_class, _data>::file_data(uint8_t *mem, size_t len)
+ : file(mem, len)
+ {
+   if (mem[EI_CLASS] != _class::id)
+@@ -190,7 +190,7 @@ section_data<_class, _data>::section_dat
+ }
+ 
+ template 
+-void section_data<_class, _data>::update(const file ) throw 
(std::bad_alloc)
++void section_data<_class, _data>::update(const file )
+ {
+   const section_type  =
+ dynamic_cast 
&>(file.get_section(file.get_shstrndx()));
+@@ -204,7 +204,7 @@ section_type::~sec
+ }
+ 
+ template 
+-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, 
uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, 
uint8_t *mem)
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_DYNAMIC)
+@@ -221,7 +221,7 @@ section_real<_class, _data, section_type
+ }
+ 
+ template 
+-void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_DYNAMIC>::update(const file 
)
+ {
+   section_data<_class, _data>::update(file);
+ 
+@@ -243,7 +243,7 @@ section_type::~sect
+ }
+ 
+ template 
+-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, 
uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, 
uint8_t *mem)
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_DYNSYM)
+@@ -260,7 +260,7 @@ section_real<_class, _data, section_type
+ }
+ 
+ template 
+-void section_real<_class, _data, section_type_DYNSYM>::update(const file 
) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_DYNSYM>::update(const file 
)
+ {
+   section_data<_class, _data>::update (file);
+ 
+@@ -285,7 +285,7 @@ const version_definition *section_type
+-section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr 
*header, uint8_t *mem) throw (std::bad_alloc)
++section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr 
*header, uint8_t *mem)
+ : section_data<_class, _data>(header, mem)
+ {
+   if (this->type != SHT_GNU_verdef)
+@@ -307,7 +307,7 @@ section_real<_class, _data, section_type
+ }
+ 
+ template 
+-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file 
) throw (std::bad_alloc)
++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file 
)
+ {
+   section_data<_class, _data>::update(file);
+ 
+@@ -333,7 +333,7 @@ const version_requirement_entry *section
+ 
+ template 
+ section_real<_class, _data, section_type_GNU_VERNEED>::
+-section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
++section_real(Shdr *header, uint8_t *mem)
+ : section_data<_class, _data> (header, mem)
+ {
+   if (this->type != SHT_GNU_verneed)
+@@ -355,7 +355,7 @@ section_real(Shdr *header, uint8_t *mem)
+ }
+ 
+ template 
+-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const