mklibs-native: Fix build with gcc 11
PATCH 1/1 mklibs-native: Fix build with gcc 11
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
--- .../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
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +420 -0
@@ -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 <[email protected]> + +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<typename _class> +-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 <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc) ++void section_data<_class, _data>::update(const file &file) + { + const section_type<section_type_STRTAB> §ion = + dynamic_cast<const section_type<section_type_STRTAB> &>(file.get_section(file.get_shstrndx())); +@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~sec + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~sect + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) + { + section_data<_class, _data>::update (file); + +@@ -285,7 +285,7 @@ const version_definition *section_type<s + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -333,7 +333,7 @@ const version_requirement_entry *section + + template <typename _class, typename _data> + 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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -372,7 +372,7 @@ void section_real<_class, _data, section + + template <typename _class, typename _data> + section_real<_class, _data, section_type_GNU_VERSYM>:: +-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_versym) +@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_dat + } + + template <typename _class, typename _data> +-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc) ++segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) + : segment_data<_class, _data> (header, mem) + { + if (this->type != PT_INTERP) +@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_dat + } + + template <typename _class, typename _data> +-void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + if (is_string) + val_string = section.get_string(val); + } + +-std::string symbol::get_version () const throw (std::bad_alloc) ++std::string symbol::get_version () const + { + if (verneed) + return verneed->get_name(); +@@ -445,7 +445,7 @@ std::string symbol::get_version () const + return "Base"; + } + +-std::string symbol::get_version_file () const throw (std::bad_alloc) ++std::string symbol::get_version_file () const + { + if (verneed) + return verneed->get_file(); +@@ -453,7 +453,7 @@ std::string symbol::get_version_file () + return "None"; + } + +-std::string symbol::get_name_version () const throw (std::bad_alloc) ++std::string symbol::get_name_version () const + { + std::string ver; + +@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) + { + if (!file.get_section_GNU_VERSYM()) + return; +@@ -531,13 +531,13 @@ version_definition_data<_class, _data>:: + } + + template <typename _class, typename _data> +-void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + for (std::vector<uint32_t>::iterator it = names.begin(); it != names.end(); ++it) + names_string.push_back(section.get_string(*it)); + } + +-version_requirement::version_requirement() throw (std::bad_alloc) ++version_requirement::version_requirement() + : file_string("None") + { } + +@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>: + + template <typename _class, typename _data> + void version_requirement_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + file_string = section.get_string(file); + +@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux * + + template <typename _class, typename _data> + void version_requirement_entry_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } +Index: mklibs-0.1.44/src/mklibs-readelf/elf.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf.hpp +@@ -49,7 +49,7 @@ namespace Elf + const uint16_t get_shstrndx() const throw () { return shstrndx; } + + const std::vector<section *> get_sections() const throw () { return sections; }; +- const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); }; ++ const section &get_section(unsigned int i) const { return *sections.at(i); }; + const section_type<section_type_DYNAMIC> *get_section_DYNAMIC() const throw () { return section_DYNAMIC; }; + const section_type<section_type_DYNSYM> *get_section_DYNSYM() const throw () { return section_DYNSYM; }; + const section_type<section_type_GNU_VERDEF> *get_section_GNU_VERDEF() const throw () { return section_GNU_VERDEF; }; +@@ -59,13 +59,13 @@ namespace Elf + const std::vector<segment *> get_segments() const throw () { return segments; }; + const segment_type<segment_type_INTERP> *get_segment_INTERP() const throw () { return segment_INTERP; }; + +- static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error); ++ static file *open(const char *filename); + + protected: +- file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { } ++ file(uint8_t *mem, size_t len) : mem(mem), len(len) { } + + template<typename _class> +- static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error); ++ static file *open_class(uint8_t *, size_t); + + uint16_t type; + uint16_t machine; +@@ -128,7 +128,7 @@ namespace Elf + class section_type<section_type_STRTAB> : public virtual section + { + public: +- std::string get_string(uint32_t offset) const throw (std::bad_alloc) ++ std::string get_string(uint32_t offset) const + { + return std::string(reinterpret_cast<const char *> (mem + offset)); + } +@@ -263,10 +263,10 @@ namespace Elf + uint8_t get_bind () const throw () { return bind; } + uint8_t get_type () const throw () { return type; } + const std::string &get_name_string() const throw () { return name_string; } +- std::string get_version() const throw (std::bad_alloc); +- std::string get_version_file() const throw (std::bad_alloc); ++ std::string get_version() const; ++ std::string get_version_file() const; + uint16_t get_version_data() const throw () { return versym; } +- std::string get_name_version() const throw (std::bad_alloc); ++ std::string get_name_version() const; + + protected: + uint32_t name; +@@ -305,7 +305,7 @@ namespace Elf + class version_requirement + { + public: +- version_requirement() throw (std::bad_alloc); ++ version_requirement(); + virtual ~version_requirement () throw () { } + + const std::string &get_file() const throw () { return file_string; } +Index: mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf_data.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +@@ -94,7 +94,7 @@ namespace Elf + class file_data : public file + { + public: +- file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error); ++ file_data(uint8_t *, size_t len); + + const uint8_t get_class() const throw () { return _class::id; } + const uint8_t get_data() const throw () { return _data::id; } +@@ -109,7 +109,7 @@ namespace Elf + public: + section_data(Shdr *, uint8_t *) throw (); + +- virtual void update(const file &) throw (std::bad_alloc); ++ virtual void update(const file &); + }; + + template <typename _class, typename _data, typename _type> +@@ -133,9 +133,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -147,9 +147,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -161,9 +161,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -175,9 +175,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -189,7 +189,7 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -220,7 +220,7 @@ namespace Elf + typedef typename _elfdef<_class>::Phdr Phdr; + + public: +- segment_real (Phdr *, uint8_t *) throw (std::bad_alloc); ++ segment_real (Phdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -232,7 +232,7 @@ namespace Elf + public: + dynamic_data (Dyn *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -244,8 +244,8 @@ namespace Elf + public: + symbol_data (Sym *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); +- virtual void update_version (const file &, uint16_t) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); ++ virtual void update_version (const file &, uint16_t); + }; + + template <typename _class, typename _data> +@@ -257,7 +257,7 @@ namespace Elf + + version_definition_data (Verdef *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -269,7 +269,7 @@ namespace Elf + + version_requirement_data (Verneed *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -280,7 +280,7 @@ namespace Elf + + version_requirement_entry_data (Vernaux *, const version_requirement &) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + } +
meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/ file://avoid-failure-on-symbol-provided-by-application.patch \ file://show-GNU-unique-symbols-as-provided-symbols.patch \ file://fix_cross_compile.patch \ + file://no-dynamic-exception-specifications.patch \ " SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
Quoted 3 lines · 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.
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?
Quoted 450 lines
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
Signed-off-by Jacob Kroon <[email protected]>--- .../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.patchmeta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +420
-0@@ -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 <[email protected]> + +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<typename _class> +-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 <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc) ++void section_data<_class, _data>::update(const file &file) + { + const section_type<section_type_STRTAB> §ion = + dynamic_cast<const section_type<section_type_STRTAB> &>(file.get_section(file.get_shstrndx())); +@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~sec + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~sect + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) + { + section_data<_class, _data>::update (file); + +@@ -285,7 +285,7 @@ const version_definition *section_type<s + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -333,7 +333,7 @@ const version_requirement_entry *section + + template <typename _class, typename _data> + 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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -372,7 +372,7 @@ void section_real<_class, _data, section + + template <typename _class, typename _data> + section_real<_class, _data, section_type_GNU_VERSYM>:: +-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_versym) +@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_dat + } + + template <typename _class, typename _data> +-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc) ++segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) + : segment_data<_class, _data> (header, mem) + { + if (this->type != PT_INTERP) +@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_dat + } + + template <typename _class, typename _data> +-void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + if (is_string) + val_string = section.get_string(val); + } + +-std::string symbol::get_version () const throw (std::bad_alloc) ++std::string symbol::get_version () const + { + if (verneed) + return verneed->get_name(); +@@ -445,7 +445,7 @@ std::string symbol::get_version () const + return "Base"; + } + +-std::string symbol::get_version_file () const throw (std::bad_alloc) ++std::string symbol::get_version_file () const + { + if (verneed) + return verneed->get_file(); +@@ -453,7 +453,7 @@ std::string symbol::get_version_file () + return "None"; + } + +-std::string symbol::get_name_version () const throw (std::bad_alloc) ++std::string symbol::get_name_version () const + { + std::string ver; + +@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) + { + if (!file.get_section_GNU_VERSYM()) + return; +@@ -531,13 +531,13 @@ version_definition_data<_class, _data>:: + } + + template <typename _class, typename _data> +-void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + for (std::vector<uint32_t>::iterator it = names.begin(); it != names.end(); ++it) + names_string.push_back(section.get_string(*it)); + } + +-version_requirement::version_requirement() throw (std::bad_alloc) ++version_requirement::version_requirement() + : file_string("None") + { } + +@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>: + + template <typename _class, typename _data> + void version_requirement_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + file_string = section.get_string(file); + +@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux * + + template <typename _class, typename _data> + void version_requirement_entry_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } +Index: mklibs-0.1.44/src/mklibs-readelf/elf.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf.hpp +@@ -49,7 +49,7 @@ namespace Elf + const uint16_t get_shstrndx() const throw () { return shstrndx; } + + const std::vector<section *> get_sections() const throw () { return sections; }; +- const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); }; ++ const section &get_section(unsigned int i) const { return *sections.at(i); }; + const section_type<section_type_DYNAMIC> *get_section_DYNAMIC() const throw () { return section_DYNAMIC; }; + const section_type<section_type_DYNSYM> *get_section_DYNSYM() const throw () { return section_DYNSYM; }; + const section_type<section_type_GNU_VERDEF> *get_section_GNU_VERDEF() const throw () { return section_GNU_VERDEF; }; +@@ -59,13 +59,13 @@ namespace Elf + const std::vector<segment *> get_segments() const throw () { return segments; }; + const segment_type<segment_type_INTERP> *get_segment_INTERP() const throw () { return segment_INTERP; }; + +- static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error); ++ static file *open(const char *filename); + + protected: +- file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { } ++ file(uint8_t *mem, size_t len) : mem(mem), len(len) { } + + template<typename _class> +- static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error); ++ static file *open_class(uint8_t *, size_t); + + uint16_t type; + uint16_t machine; +@@ -128,7 +128,7 @@ namespace Elf + class section_type<section_type_STRTAB> : public virtual section + { + public: +- std::string get_string(uint32_t offset) const throw (std::bad_alloc) ++ std::string get_string(uint32_t offset) const + { + return std::string(reinterpret_cast<const char *> (mem + offset)); + } +@@ -263,10 +263,10 @@ namespace Elf + uint8_t get_bind () const throw () { return bind; } + uint8_t get_type () const throw () { return type; } + const std::string &get_name_string() const throw () { return name_string; } +- std::string get_version() const throw (std::bad_alloc); +- std::string get_version_file() const throw (std::bad_alloc); ++ std::string get_version() const; ++ std::string get_version_file() const; + uint16_t get_version_data() const throw () { return versym; } +- std::string get_name_version() const throw (std::bad_alloc); ++ std::string get_name_version() const; + + protected: + uint32_t name; +@@ -305,7 +305,7 @@ namespace Elf + class version_requirement + { + public: +- version_requirement() throw (std::bad_alloc); ++ version_requirement(); + virtual ~version_requirement () throw () { } + + const std::string &get_file() const throw () { return file_string; } +Index: mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf_data.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +@@ -94,7 +94,7 @@ namespace Elf + class file_data : public file + { + public: +- file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error); ++ file_data(uint8_t *, size_t len); + + const uint8_t get_class() const throw () { return _class::id; } + const uint8_t get_data() const throw () { return _data::id; } +@@ -109,7 +109,7 @@ namespace Elf + public: + section_data(Shdr *, uint8_t *) throw (); + +- virtual void update(const file &) throw (std::bad_alloc); ++ virtual void update(const file &); + }; + + template <typename _class, typename _data, typename _type> +@@ -133,9 +133,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -147,9 +147,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -161,9 +161,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -175,9 +175,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -189,7 +189,7 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -220,7 +220,7 @@ namespace Elf + typedef typename _elfdef<_class>::Phdr Phdr; + + public: +- segment_real (Phdr *, uint8_t *) throw (std::bad_alloc); ++ segment_real (Phdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -232,7 +232,7 @@ namespace Elf + public: + dynamic_data (Dyn *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -244,8 +244,8 @@ namespace Elf + public: + symbol_data (Sym *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); +- virtual void update_version (const file &, uint16_t) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); ++ virtual void update_version (const file &, uint16_t); + }; + + template <typename _class, typename _data> +@@ -257,7 +257,7 @@ namespace Elf + + version_definition_data (Verdef *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -269,7 +269,7 @@ namespace Elf + + version_requirement_data (Verneed *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -280,7 +280,7 @@ namespace Elf + + version_requirement_entry_data (Vernaux *, const version_requirement &) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + } +meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +1
-0@@ -12,6 +12,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/ file://avoid-failure-on-symbol-provided-by-application.patch \ file://show-GNU-unique-symbols-as-provided-symbols.patch \ file://fix_cross_compile.patch \ + file://no-dynamic-exception-specifications.patch \ " SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
Quoted 9 lines · Andre McCurdy
Quoted 3 lines · 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.
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.
Quoted 6 lines
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
Quoted 454 lines
Quoted 454 lines
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
Signed-off-by Jacob Kroon <[email protected]>--- .../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.patchmeta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +420
-0@@ -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 <[email protected]> + +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<typename _class> +-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 <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc) ++void section_data<_class, _data>::update(const file &file) + { + const section_type<section_type_STRTAB> §ion = + dynamic_cast<const section_type<section_type_STRTAB> &>(file.get_section(file.get_shstrndx())); +@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~sec + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~sect + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) + { + section_data<_class, _data>::update (file); + +@@ -285,7 +285,7 @@ const version_definition *section_type<s + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -333,7 +333,7 @@ const version_requirement_entry *section + + template <typename _class, typename _data> + 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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -372,7 +372,7 @@ void section_real<_class, _data, section + + template <typename _class, typename _data> + section_real<_class, _data, section_type_GNU_VERSYM>:: +-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_versym) +@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_dat + } + + template <typename _class, typename _data> +-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc) ++segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) + : segment_data<_class, _data> (header, mem) + { + if (this->type != PT_INTERP) +@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_dat + } + + template <typename _class, typename _data> +-void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + if (is_string) + val_string = section.get_string(val); + } + +-std::string symbol::get_version () const throw (std::bad_alloc) ++std::string symbol::get_version () const + { + if (verneed) + return verneed->get_name(); +@@ -445,7 +445,7 @@ std::string symbol::get_version () const + return "Base"; + } + +-std::string symbol::get_version_file () const throw (std::bad_alloc) ++std::string symbol::get_version_file () const + { + if (verneed) + return verneed->get_file(); +@@ -453,7 +453,7 @@ std::string symbol::get_version_file () + return "None"; + } + +-std::string symbol::get_name_version () const throw (std::bad_alloc) ++std::string symbol::get_name_version () const + { + std::string ver; + +@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) + { + if (!file.get_section_GNU_VERSYM()) + return; +@@ -531,13 +531,13 @@ version_definition_data<_class, _data>:: + } + + template <typename _class, typename _data> +-void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + for (std::vector<uint32_t>::iterator it = names.begin(); it != names.end(); ++it) + names_string.push_back(section.get_string(*it)); + } + +-version_requirement::version_requirement() throw (std::bad_alloc) ++version_requirement::version_requirement() + : file_string("None") + { } + +@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>: + + template <typename _class, typename _data> + void version_requirement_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + file_string = section.get_string(file); + +@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux * + + template <typename _class, typename _data> + void version_requirement_entry_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } +Index: mklibs-0.1.44/src/mklibs-readelf/elf.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf.hpp +@@ -49,7 +49,7 @@ namespace Elf + const uint16_t get_shstrndx() const throw () { return shstrndx; } + + const std::vector<section *> get_sections() const throw () { return sections; }; +- const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); }; ++ const section &get_section(unsigned int i) const { return *sections.at(i); }; + const section_type<section_type_DYNAMIC> *get_section_DYNAMIC() const throw () { return section_DYNAMIC; }; + const section_type<section_type_DYNSYM> *get_section_DYNSYM() const throw () { return section_DYNSYM; }; + const section_type<section_type_GNU_VERDEF> *get_section_GNU_VERDEF() const throw () { return section_GNU_VERDEF; }; +@@ -59,13 +59,13 @@ namespace Elf + const std::vector<segment *> get_segments() const throw () { return segments; }; + const segment_type<segment_type_INTERP> *get_segment_INTERP() const throw () { return segment_INTERP; }; + +- static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error); ++ static file *open(const char *filename); + + protected: +- file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { } ++ file(uint8_t *mem, size_t len) : mem(mem), len(len) { } + + template<typename _class> +- static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error); ++ static file *open_class(uint8_t *, size_t); + + uint16_t type; + uint16_t machine; +@@ -128,7 +128,7 @@ namespace Elf + class section_type<section_type_STRTAB> : public virtual section + { + public: +- std::string get_string(uint32_t offset) const throw (std::bad_alloc) ++ std::string get_string(uint32_t offset) const + { + return std::string(reinterpret_cast<const char *> (mem + offset)); + } +@@ -263,10 +263,10 @@ namespace Elf + uint8_t get_bind () const throw () { return bind; } + uint8_t get_type () const throw () { return type; } + const std::string &get_name_string() const throw () { return name_string; } +- std::string get_version() const throw (std::bad_alloc); +- std::string get_version_file() const throw (std::bad_alloc); ++ std::string get_version() const; ++ std::string get_version_file() const; + uint16_t get_version_data() const throw () { return versym; } +- std::string get_name_version() const throw (std::bad_alloc); ++ std::string get_name_version() const; + + protected: + uint32_t name; +@@ -305,7 +305,7 @@ namespace Elf + class version_requirement + { + public: +- version_requirement() throw (std::bad_alloc); ++ version_requirement(); + virtual ~version_requirement () throw () { } + + const std::string &get_file() const throw () { return file_string; } +Index: mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf_data.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +@@ -94,7 +94,7 @@ namespace Elf + class file_data : public file + { + public: +- file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error); ++ file_data(uint8_t *, size_t len); + + const uint8_t get_class() const throw () { return _class::id; } + const uint8_t get_data() const throw () { return _data::id; } +@@ -109,7 +109,7 @@ namespace Elf + public: + section_data(Shdr *, uint8_t *) throw (); + +- virtual void update(const file &) throw (std::bad_alloc); ++ virtual void update(const file &); + }; + + template <typename _class, typename _data, typename _type> +@@ -133,9 +133,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -147,9 +147,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -161,9 +161,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -175,9 +175,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -189,7 +189,7 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -220,7 +220,7 @@ namespace Elf + typedef typename _elfdef<_class>::Phdr Phdr; + + public: +- segment_real (Phdr *, uint8_t *) throw (std::bad_alloc); ++ segment_real (Phdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -232,7 +232,7 @@ namespace Elf + public: + dynamic_data (Dyn *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -244,8 +244,8 @@ namespace Elf + public: + symbol_data (Sym *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); +- virtual void update_version (const file &, uint16_t) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); ++ virtual void update_version (const file &, uint16_t); + }; + + template <typename _class, typename _data> +@@ -257,7 +257,7 @@ namespace Elf + + version_definition_data (Verdef *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -269,7 +269,7 @@ namespace Elf + + version_requirement_data (Verneed *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -280,7 +280,7 @@ namespace Elf + + version_requirement_entry_data (Vernaux *, const version_requirement &) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + } +meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +1
-0@@ -12,6 +12,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/ file://avoid-failure-on-symbol-provided-by-application.patch \ file://show-GNU-unique-symbols-as-provided-symbols.patch \ file://fix_cross_compile.patch \ + file://no-dynamic-exception-specifications.patch \ " SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
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
Quoted 555 lines · Mark Hatle
Quoted 1 line · Andre McCurdy
On Mon, May 17, 2021 at 10:05 AM Jacob Kroon <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
In gcc 11 the default mode for C++ is now -std=gnu++17 instead of
-std=gnu++14,
Quoted 6 lines
Quoted 1 line
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.
Quoted 6 lines
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
Quoted 1 line
Quoted 1 line
See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
Quoted 7 lines
Quoted 7 lines
Signed-off-by Jacob Kroon <[email protected]>--- .../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.patchQuoted 2 lines
Quoted 2 lines
diff --git
a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patchb/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patchQuoted 4 lines
Quoted 4 lines
new file mode 100644
index 0000000000..5989a67c4f
---/dev/null
+++
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patchQuoted 2 lines
Review line 1
Quoted 2 lines
(quoted diff) +1
-0@@ -0,0 +1,420 @@ +In gcc 11 the default mode for C++ is now -std=gnu++17 instead of-std=gnu++14,
Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +3
-0+in which support for dynamic exception specifications has been removed. + +Seehttp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
Quoted 6 lines
Quoted 6 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +6
-0+ +Upstream-Status: Pending + +Signed-off-by: Jacob Kroon <[email protected]> + +Index: mklibs-0.1.44/src/mklibs-readelf/elf.cppQuoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+=================================================================== +--- 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)Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++file *file::open (const char *filename) + { + struct stat buf; + int fd; +@@ -72,7 +72,7 @@ file *file::open (const char *filename) + } + + template<typename _class> +-file *file::open_class(uint8_t *mem, size_t len) throw(
std::bad_alloc,std::runtime_error)Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++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 <typename _class, typename _data> +-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw(
std::bad_alloc,std::runtime_error)Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++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 <typename _class, typename _data> +-void section_data<_class, _data>::update(const file &file) throw(
std::bad_alloc)Quoted 4 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 4 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +4
-0++void section_data<_class, _data>::update(const file &file) + { + const section_type<section_type_STRTAB> §ion = + dynamic_cast<const section_type<section_type_STRTAB>&>(file.get_section(file.get_shstrndx()));
Quoted 5 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 5 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +5
-0+@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~sec + } + + template <typename _class, typename _data> +-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr*header,
uint8_t*mem) throw (std::bad_alloc)Quoted 1 line
Review line 55
Quoted 1 line
(quoted diff) +1
-0++section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr*header,
uint8_t*mem)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : section_data<_class, _data>(header, mem) + { + if (this->type != SHT_DYNAMIC) +@@ -221,7 +221,7 @@ section_real<_class, _data, section_type + } + + template <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNAMIC>::update(constfile &file) throw (
std::bad_alloc)Quoted 1 line
Review line 64
Quoted 1 line
(quoted diff) +1
-0++void section_real<_class, _data, section_type_DYNAMIC>::update(constfile &file)
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ { + section_data<_class, _data>::update(file); + +@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~sect + } + + template <typename _class, typename _data> +-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr*header,
uint8_t*mem) throw (std::bad_alloc)Quoted 1 line
Review line 73
Quoted 1 line
(quoted diff) +1
-0++section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr*header,
uint8_t*mem)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : section_data<_class, _data>(header, mem) + { + if (this->type != SHT_DYNSYM) +@@ -260,7 +260,7 @@ section_real<_class, _data, section_type + } + + template <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNSYM>::update(constfile &file) throw (
std::bad_alloc)Quoted 1 line
Review line 82
Quoted 1 line
(quoted diff) +1
-0++void section_real<_class, _data, section_type_DYNSYM>::update(constfile &file)
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ { + section_data<_class, _data>::update (file); + +@@ -285,7 +285,7 @@ const version_definition *section_type<s + } + + template <typename _class, typename _data> +-section_real<_class, _data,section_type_GNU_VERDEF>::section_real(Shdr *header,
uint8_t*mem) throw (std::bad_alloc)Quoted 1 line
Review line 91
Quoted 1 line
(quoted diff) +1
-0++section_real<_class, _data,section_type_GNU_VERDEF>::section_real(Shdr *header,
uint8_t*mem)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : section_data<_class, _data>(header, mem) + { + if (this->type != SHT_GNU_verdef) +@@ -307,7 +307,7 @@ section_real<_class, _data, section_type + } + + template <typename _class, typename _data> +-void section_real<_class, _data,section_type_GNU_VERDEF>::update(const file &file) throw (
std::bad_alloc)Quoted 1 line
Review line 100
Quoted 1 line
(quoted diff) +1
-0++void section_real<_class, _data,section_type_GNU_VERDEF>::update(const file &file)
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0+ { + section_data<_class, _data>::update(file); + +@@ -333,7 +333,7 @@ const version_requirement_entry *section + + template <typename _class, typename _data> + 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)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : section_data<_class, _data> (header, mem) + { + if (this->type != SHT_GNU_verneed) +@@ -355,7 +355,7 @@ section_real(Shdr *header, uint8_t *mem) + } + + template <typename _class, typename _data> +-void section_real<_class, _data,section_type_GNU_VERNEED>::update(const file &file) throw (
std::bad_alloc)Quoted 1 line
Review line 118
Quoted 1 line
(quoted diff) +1
-0++void section_real<_class, _data,section_type_GNU_VERNEED>::update(const file &file)
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0+ { + section_data<_class, _data>::update(file); + +@@ -372,7 +372,7 @@ void section_real<_class, _data, section + + template <typename _class, typename _data> + section_real<_class, _data, section_type_GNU_VERSYM>:: +-section_real (Shdr *header, uint8_t *mem) throw (std::bad_alloc) ++section_real (Shdr *header, uint8_t *mem)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : section_data<_class, _data> (header, mem) + { + if (this->type != SHT_GNU_versym) +@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_dat + } + + template <typename _class, typename _data> +-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr*header,
uint8_t*mem) throw (std::bad_alloc)Quoted 1 line
Review line 136
Quoted 1 line
(quoted diff) +1
-0++segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr*header,
uint8_t*mem)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : segment_data<_class, _data> (header, mem) + { + if (this->type != PT_INTERP) +@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_dat + } + + template <typename _class, typename _data> +-void dynamic_data<_class, _data>::update_string(constsection_type<section_type_STRTAB> §ion) throw (
std::bad_alloc)Quoted 1 line
Review line 145
Quoted 1 line
(quoted diff) +1
-0++void dynamic_data<_class, _data>::update_string(constsection_type<section_type_STRTAB> §ion)
Quoted 25 lines
Quoted 25 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +25
-0+ { + if (is_string) + val_string = section.get_string(val); + } + +-std::string symbol::get_version () const throw (std::bad_alloc) ++std::string symbol::get_version () const + { + if (verneed) + return verneed->get_name(); +@@ -445,7 +445,7 @@ std::string symbol::get_version () const + return "Base"; + } + +-std::string symbol::get_version_file () const throw (std::bad_alloc) ++std::string symbol::get_version_file () const + { + if (verneed) + return verneed->get_file(); +@@ -453,7 +453,7 @@ std::string symbol::get_version_file () + return "None"; + } + +-std::string symbol::get_name_version () const throw (std::bad_alloc) ++std::string symbol::get_name_version () constQuoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ { + std::string ver; + +@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_string(constsection_type<section_type_STRTAB> §ion) throw (
std::bad_alloc)Quoted 1 line
Review line 179
Quoted 1 line
(quoted diff) +1
-0++void symbol_data<_class, _data>::update_string(constsection_type<section_type_STRTAB> §ion)
Quoted 6 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 6 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +6
-0+ { + name_string = section.get_string(name); + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_version(const file &file,
uint16_tindex) throw (std::bad_alloc)Quoted 1 line
Review line 186
Quoted 1 line
(quoted diff) +1
-0++void symbol_data<_class, _data>::update_version(const file &file,
uint16_tindex)Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ { + if (!file.get_section_GNU_VERSYM()) + return; +@@ -531,13 +531,13 @@ version_definition_data<_class, _data>:: + } + + template <typename _class, typename _data> +-void version_definition_data<_class, _data>::update_string(constsection_type<section_type_STRTAB> §ion) throw (
std::bad_alloc)Quoted 1 line
Review line 195
Quoted 1 line
(quoted diff) +1
-0++void version_definition_data<_class, _data>::update_string(constsection_type<section_type_STRTAB> §ion)
Quoted 2 lines
Review line 197
Quoted 2 lines
(quoted diff) +2
-0+ { + for (std::vector<uint32_t>::iterator it = names.begin(); it !=
names.end(); ++it)Quoted 5 lines
Quoted 5 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +5
-0+ names_string.push_back(section.get_string(*it)); + } + +-version_requirement::version_requirement() throw (std::bad_alloc) ++version_requirement::version_requirement()Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ : file_string("None") + { } + +@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>: + + template <typename _class, typename _data> + void version_requirement_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw(
std::bad_alloc)Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++update_string(const section_type<section_type_STRTAB> §ion) + { + file_string = section.get_string(file); + +@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux * + + template <typename _class, typename _data> + void version_requirement_entry_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw(
std::bad_alloc)Quoted 10 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 10 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +10
-0++update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } +Index: mklibs-0.1.44/src/mklibs-readelf/elf.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf.hpp +@@ -49,7 +49,7 @@ namespace Elf + const uint16_t get_shstrndx() const throw () { return shstrndx;}
Quoted 2 lines
Review line 231
Quoted 2 lines
(quoted diff) +2
-0+ + const std::vector<section *> get_sections() const throw () {return sections; };
Quoted 1 line
Review line 232
Quoted 1 line
(quoted diff) +1
-0+- const section &get_section(unsigned int i) const throw(
std::out_of_range) { return*sections.at(i); };Quoted 1 line
Review line 233
Quoted 1 line
(quoted diff) +1
-0++ const section &get_section(unsigned int i) const { return *
sections.at(i); };Quoted 1 line
Review line 234
Quoted 1 line
(quoted diff) +1
-0+ const section_type<section_type_DYNAMIC> *get_section_DYNAMIC()const throw () { return
section_DYNAMIC; };Quoted 1 line
Review line 235
Quoted 1 line
(quoted diff) +1
-0+ const section_type<section_type_DYNSYM> *get_section_DYNSYM()const throw () { return
section_DYNSYM; };Quoted 1 line
Review line 236
Quoted 1 line
(quoted diff) +1
-0+ const section_type<section_type_GNU_VERDEF>
*get_section_GNU_VERDEF()const throw () { returnsection_GNU_VERDEF; };Quoted 2 lines
Review line 238
Quoted 2 lines
(quoted diff) +2
-0+@@ -59,13 +59,13 @@ namespace Elf + const std::vector<segment *> get_segments() const throw () {return segments; };
Quoted 1 line
Review line 239
Quoted 1 line
(quoted diff) +1
-0+ const segment_type<segment_type_INTERP> *get_segment_INTERP()const throw () { return
segment_INTERP; };Quoted 2 lines
Review line 241
Quoted 2 lines
(quoted diff) +2
-0+ +- static file *open(const char *filename) throw (std::bad_alloc,
std::runtime_error);Quoted 4 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 4 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +4
-0++ static file *open(const char *filename); + + protected: +- file(uint8_t *mem, size_t len) throw (std::bad_alloc) :mem(mem), len(len) { }
Quoted 4 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 4 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +4
-0++ file(uint8_t *mem, size_t len) : mem(mem), len(len) { } + + template<typename _class> +- static file *open_class(uint8_t *, size_t) throw(
std::bad_alloc,std::runtime_error);Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++ static file *open_class(uint8_t *, size_t); + + uint16_t type; + uint16_t machine; +@@ -128,7 +128,7 @@ namespace Elf + class section_type<section_type_STRTAB> : public virtual section + { + public: +- std::string get_string(uint32_t offset) const throw(
std::bad_alloc)Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +3
-0++ std::string get_string(uint32_t offset) const + { + return std::string(reinterpret_cast<const char *> (mem +offset));
Quoted 5 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 5 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +5
-0+ } +@@ -263,10 +263,10 @@ namespace Elf + uint8_t get_bind () const throw () { return bind; } + uint8_t get_type () const throw () { return type; } + const std::string &get_name_string() const throw () { return
name_string; }Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +11
-0+- std::string get_version() const throw (std::bad_alloc); +- std::string get_version_file() const throw (std::bad_alloc); ++ std::string get_version() const; ++ std::string get_version_file() const; + uint16_t get_version_data() const throw () { return versym; } +- std::string get_name_version() const throw (std::bad_alloc); ++ std::string get_name_version() const; + + protected: + uint32_t name; +@@ -305,7 +305,7 @@ namespace ElfQuoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ class version_requirement + { + public: +- version_requirement() throw (std::bad_alloc); ++ version_requirement(); + virtual ~version_requirement () throw () { } + + const std::string &get_file() const throw () { return
file_string; }Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0+Index: mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf_data.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +@@ -94,7 +94,7 @@ namespace Elf + class file_data : public file + { + public: +- file_data(uint8_t *, size_t len) throw (std::bad_alloc,
std::runtime_error);Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +3
-0++ file_data(uint8_t *, size_t len); + + const uint8_t get_class() const throw () { return _class::id;}
Quoted 73 lines
Quoted 73 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +73
-0+ const uint8_t get_data() const throw () { return _data::id; } +@@ -109,7 +109,7 @@ namespace Elf + public: + section_data(Shdr *, uint8_t *) throw (); + +- virtual void update(const file &) throw (std::bad_alloc); ++ virtual void update(const file &); + }; + + template <typename _class, typename _data, typename _type> +@@ -133,9 +133,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -147,9 +147,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -161,9 +161,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -175,9 +175,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -189,7 +189,7 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -220,7 +220,7 @@ namespace Elf + typedef typename _elfdef<_class>::Phdr Phdr; + + public: +- segment_real (Phdr *, uint8_t *) throw (std::bad_alloc); ++ segment_real (Phdr *, uint8_t *);Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 8 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +8
-0+ }; + + template <typename _class, typename _data> +@@ -232,7 +232,7 @@ namespace Elf + public: + dynamic_data (Dyn *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &)throw (
std::bad_alloc);Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -244,8 +244,8 @@ namespace Elf + public: + symbol_data (Sym *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &)throw (
std::bad_alloc);Quoted 1 line
Review line 388
Quoted 1 line
(quoted diff) +1
-0+- virtual void update_version (const file &, uint16_t) throw(
std::bad_alloc);Quoted 10 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 10 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +10
-0++ void update_string(const section_type<section_type_STRTAB> &); ++ virtual void update_version (const file &, uint16_t); + }; + + template <typename _class, typename _data> +@@ -257,7 +257,7 @@ namespace Elf + + version_definition_data (Verdef *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &)throw (
std::bad_alloc);Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +9
-0++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -269,7 +269,7 @@ namespace Elf + + version_requirement_data (Verneed *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &)throw (
std::bad_alloc);Quoted 7 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 7 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +7
-0++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -280,7 +280,7 @@ namespace Elf + + version_requirement_entry_data (Vernaux *, const
version_requirement&) throw ();Quoted 2 lines
Review line 416
Quoted 2 lines
(quoted diff) +2
-0+ +- void update_string(const section_type<section_type_STRTAB> &)throw (
std::bad_alloc);Quoted 5 lines
Review
Quoted 5 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +4
-0++ void update_string(const section_type<section_type_STRTAB> &); + }; + } +(quoted diff) +0
-0b/meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb
Quoted 4 lines
meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb SRC_URI = "
Quoted 4 lines
index
1784af1f4c..8ecdb17be3100644meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +0
-0@@ -12,6 +12,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/
Quoted 14 lines
Quoted 14 lines
meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +1
-0file://avoid-failure-on-symbol-provided-by-application.patch \ file://show-GNU-unique-symbols-as-provided-symbols.patch \ file://fix_cross_compile.patch \ + file://no-dynamic-exception-specifications.patch \ " SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
Quoted 18 lines · 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 <[email protected]>--- .../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.patchmeta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +0
-0
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch line 7
Quoted 7 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +7
-0@@ -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
Quoted 430 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +413
-0+Signed-off-by: Jacob Kroon <[email protected]> + +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<typename _class> +-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 <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc) ++void section_data<_class, _data>::update(const file &file) + { + const section_type<section_type_STRTAB> §ion = + dynamic_cast<const section_type<section_type_STRTAB> &>(file.get_section(file.get_shstrndx())); +@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~sec + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~sect + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) + { + section_data<_class, _data>::update (file); + +@@ -285,7 +285,7 @@ const version_definition *section_type<s + } + + template <typename _class, typename _data> +-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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -333,7 +333,7 @@ const version_requirement_entry *section + + template <typename _class, typename _data> + 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 <typename _class, typename _data> +-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc) ++void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) + { + section_data<_class, _data>::update(file); + +@@ -372,7 +372,7 @@ void section_real<_class, _data, section + + template <typename _class, typename _data> + section_real<_class, _data, section_type_GNU_VERSYM>:: +-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_versym) +@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_dat + } + + template <typename _class, typename _data> +-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc) ++segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) + : segment_data<_class, _data> (header, mem) + { + if (this->type != PT_INTERP) +@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_dat + } + + template <typename _class, typename _data> +-void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + if (is_string) + val_string = section.get_string(val); + } + +-std::string symbol::get_version () const throw (std::bad_alloc) ++std::string symbol::get_version () const + { + if (verneed) + return verneed->get_name(); +@@ -445,7 +445,7 @@ std::string symbol::get_version () const + return "Base"; + } + +-std::string symbol::get_version_file () const throw (std::bad_alloc) ++std::string symbol::get_version_file () const + { + if (verneed) + return verneed->get_file(); +@@ -453,7 +453,7 @@ std::string symbol::get_version_file () + return "None"; + } + +-std::string symbol::get_name_version () const throw (std::bad_alloc) ++std::string symbol::get_name_version () const + { + std::string ver; + +@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } + + template <typename _class, typename _data> +-void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc) ++void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) + { + if (!file.get_section_GNU_VERSYM()) + return; +@@ -531,13 +531,13 @@ version_definition_data<_class, _data>:: + } + + template <typename _class, typename _data> +-void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> §ion) + { + for (std::vector<uint32_t>::iterator it = names.begin(); it != names.end(); ++it) + names_string.push_back(section.get_string(*it)); + } + +-version_requirement::version_requirement() throw (std::bad_alloc) ++version_requirement::version_requirement() + : file_string("None") + { } + +@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>: + + template <typename _class, typename _data> + void version_requirement_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + file_string = section.get_string(file); + +@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux * + + template <typename _class, typename _data> + void version_requirement_entry_data<_class, _data>:: +-update_string(const section_type<section_type_STRTAB> §ion) throw (std::bad_alloc) ++update_string(const section_type<section_type_STRTAB> §ion) + { + name_string = section.get_string(name); + } +Index: mklibs-0.1.44/src/mklibs-readelf/elf.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf.hpp +@@ -49,7 +49,7 @@ namespace Elf + const uint16_t get_shstrndx() const throw () { return shstrndx; } + + const std::vector<section *> get_sections() const throw () { return sections; }; +- const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); }; ++ const section &get_section(unsigned int i) const { return *sections.at(i); }; + const section_type<section_type_DYNAMIC> *get_section_DYNAMIC() const throw () { return section_DYNAMIC; }; + const section_type<section_type_DYNSYM> *get_section_DYNSYM() const throw () { return section_DYNSYM; }; + const section_type<section_type_GNU_VERDEF> *get_section_GNU_VERDEF() const throw () { return section_GNU_VERDEF; }; +@@ -59,13 +59,13 @@ namespace Elf + const std::vector<segment *> get_segments() const throw () { return segments; }; + const segment_type<segment_type_INTERP> *get_segment_INTERP() const throw () { return segment_INTERP; }; + +- static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error); ++ static file *open(const char *filename); + + protected: +- file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { } ++ file(uint8_t *mem, size_t len) : mem(mem), len(len) { } + + template<typename _class> +- static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error); ++ static file *open_class(uint8_t *, size_t); + + uint16_t type; + uint16_t machine; +@@ -128,7 +128,7 @@ namespace Elf + class section_type<section_type_STRTAB> : public virtual section + { + public: +- std::string get_string(uint32_t offset) const throw (std::bad_alloc) ++ std::string get_string(uint32_t offset) const + { + return std::string(reinterpret_cast<const char *> (mem + offset)); + } +@@ -263,10 +263,10 @@ namespace Elf + uint8_t get_bind () const throw () { return bind; } + uint8_t get_type () const throw () { return type; } + const std::string &get_name_string() const throw () { return name_string; } +- std::string get_version() const throw (std::bad_alloc); +- std::string get_version_file() const throw (std::bad_alloc); ++ std::string get_version() const; ++ std::string get_version_file() const; + uint16_t get_version_data() const throw () { return versym; } +- std::string get_name_version() const throw (std::bad_alloc); ++ std::string get_name_version() const; + + protected: + uint32_t name; +@@ -305,7 +305,7 @@ namespace Elf + class version_requirement + { + public: +- version_requirement() throw (std::bad_alloc); ++ version_requirement(); + virtual ~version_requirement () throw () { } + + const std::string &get_file() const throw () { return file_string; } +Index: mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +=================================================================== +--- mklibs-0.1.44.orig/src/mklibs-readelf/elf_data.hpp ++++ mklibs-0.1.44/src/mklibs-readelf/elf_data.hpp +@@ -94,7 +94,7 @@ namespace Elf + class file_data : public file + { + public: +- file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error); ++ file_data(uint8_t *, size_t len); + + const uint8_t get_class() const throw () { return _class::id; } + const uint8_t get_data() const throw () { return _data::id; } +@@ -109,7 +109,7 @@ namespace Elf + public: + section_data(Shdr *, uint8_t *) throw (); + +- virtual void update(const file &) throw (std::bad_alloc); ++ virtual void update(const file &); + }; + + template <typename _class, typename _data, typename _type> +@@ -133,9 +133,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -147,9 +147,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -161,9 +161,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -175,9 +175,9 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + +- void update(const file &) throw (std::bad_alloc); ++ void update(const file &); + }; + + template <typename _class, typename _data> +@@ -189,7 +189,7 @@ namespace Elf + typedef typename _elfdef<_class>::Shdr Shdr; + + public: +- section_real(Shdr *, uint8_t *) throw (std::bad_alloc); ++ section_real(Shdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -220,7 +220,7 @@ namespace Elf + typedef typename _elfdef<_class>::Phdr Phdr; + + public: +- segment_real (Phdr *, uint8_t *) throw (std::bad_alloc); ++ segment_real (Phdr *, uint8_t *); + }; + + template <typename _class, typename _data> +@@ -232,7 +232,7 @@ namespace Elf + public: + dynamic_data (Dyn *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -244,8 +244,8 @@ namespace Elf + public: + symbol_data (Sym *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); +- virtual void update_version (const file &, uint16_t) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); ++ virtual void update_version (const file &, uint16_t); + }; + + template <typename _class, typename _data> +@@ -257,7 +257,7 @@ namespace Elf + + version_definition_data (Verdef *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -269,7 +269,7 @@ namespace Elf + + version_requirement_data (Verneed *) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + + template <typename _class, typename _data> +@@ -280,7 +280,7 @@ namespace Elf + + version_requirement_entry_data (Vernaux *, const version_requirement &) throw (); + +- void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc); ++ void update_string(const section_type<section_type_STRTAB> &); + }; + } +meta/recipes-devtools/mklibs/mklibs-native_0.1.44.bb +1
-0@@ -12,6 +12,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20180828T214102Z/pool/main/ file://avoid-failure-on-symbol-provided-by-application.patch \ file://show-GNU-unique-symbols-as-provided-symbols.patch \ file://fix_cross_compile.patch \ + file://no-dynamic-exception-specifications.patch \ " SRC_URI[md5sum] = "6b6eeb9b4016c6a7317acc28c89e32cc"
Quoted 25 lines · Khem Raj
Quoted 22 lines · 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 <[email protected]>---
.../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.patchmeta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch +0
-0new file mode 100644
index 0000000000..5989a67c4f
---/dev/null
+++b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch
Quoted 12 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch line 7
Quoted 9 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch +7
-1@@ -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
Don't bother, it looks abandoned:
https://salsa.debian.org/installer-team/mklibs
Alex
Quoted 63 lines · Jacob Kroon
Quoted 8 lines · Khem Raj
Quoted 5 lines · 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
Quoted 8 lines
Quoted 8 lines
Signed-off-by Jacob Kroon <[email protected]>--- .../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.patchQuoted 4 lines
Quoted 4 lines
diff --git
a/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patchQuoted 1 line
Quoted 1 line
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patchQuoted 6 lines
Quoted 6 lines
new file mode 100644
index 0000000000..5989a67c4f
---/dev/null
+++
b/meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patchQuoted 7 lines
Review
Quoted 7 lines
(quoted diff) +4
-1@@ -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. + +Seehttp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
Quoted 6 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch line 7
Quoted 3 lines
meta/recipes-devtools/mklibs/files/no-dynamic-exception-specifications.patch new file +3
-0+ +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