Skip to content

gcc8 compile and run fixes#9

Open
aarchetype wants to merge 9 commits into
yandex-load:masterfrom
aarchetype:gcc8_compile_fix
Open

gcc8 compile and run fixes#9
aarchetype wants to merge 9 commits into
yandex-load:masterfrom
aarchetype:gcc8_compile_fix

Conversation

@aarchetype

Copy link
Copy Markdown

No description provided.

@aarchetype aarchetype changed the title gcc8 compile and run fixes (#6) gcc8 compile and run fixes Feb 12, 2019
@k0ste

k0ste commented Feb 12, 2019

Copy link
Copy Markdown

@direvius

@k0ste

k0ste commented Feb 12, 2019

Copy link
Copy Markdown

Resolve #6.

@k0ste k0ste mentioned this pull request May 8, 2019
@webchi

webchi commented May 8, 2019

Copy link
Copy Markdown

Когда зальют?))

@VadikPtr

VadikPtr commented Jan 9, 2020

Copy link
Copy Markdown

@aarchetype есть проблемы компиляции на gcc 9 версии:

pd/base/in.C: In member function ‘virtual bool pd::in_segment_list_t::page_t::optimize(pd::in_segment_t&) const’:
pd/base/in.C:107:37: error: implicitly-declared ‘pd::in_segment_t& pd::in_segment_t::operator=(const pd::in_segment_t&)’ is deprecated [-Werror=deprecated-copy]
  107 |   _segment = in_segment_t(ptr, _size);


phantom/jemalloc/jemalloc_.C:5154:22: error: ‘void* __libc_calloc(size_t, size_t)’ specifies less restrictive attributes than its target ‘void* calloc(size_t, size_t)’: ‘leaf’, ‘malloc’, ‘nothrow’ [-Werror=missing-attributes]
 5154 | strong_alias(calloc, __libc_calloc);
      |                      ^~~~~~~~~~~~~
phantom/jemalloc/jemalloc_.C:5152:26: note: in definition of macro ‘strong_alias’
 5152 |   extern __typeof (name) aliasname __attribute__ ((alias (#name)))
      |                          ^~~~~~~~~
phantom/jemalloc/jemalloc_.C:4912:1: note: ‘void* __libc_calloc(size_t, size_t)’ target declared here
 4912 | calloc(size_t num, size_t size)
      | ^~~~~~

Можно вылечить костылём, если собирать вот так: make all -R -j16 CPPDEFS="-Wno-error=deprecated-copy -Wno-error=missing-attributes", но кажется так быть не должно :)

@SSE4

SSE4 commented Aug 15, 2022

Copy link
Copy Markdown

for debian 11 (gcc 10) also needed:

diff --git a/pd/debug/addrinfo_bfd.C b/pd/debug/addrinfo_bfd.C
index c729dac..64f9391 100644
--- a/pd/debug/addrinfo_bfd.C
+++ b/pd/debug/addrinfo_bfd.C
@@ -149,7 +149,11 @@ void bfd_t::file_t::setup() {
        unsigned int _section_count = 0;
 
        for(asection *sect = _abfd->sections; sect != NULL; sect = sect->next) {
+#ifdef bfd_get_section_flags
                if(!(bfd_get_section_flags(_abfd, sect) & SEC_CODE))
+#else
+               if(!(bfd_section_flags(sect) & SEC_CODE))
+#endif
                        continue;
 
                ++_section_count;
@@ -159,7 +163,11 @@ void bfd_t::file_t::setup() {
        asection **sectp = _sections;
 
        for(asection *sect = _abfd->sections; sect != NULL; sect = sect->next) {
+#ifdef bfd_get_section_flags
                if(!(bfd_get_section_flags(_abfd, sect) & SEC_CODE))
+#else
+               if(!(bfd_section_flags(sect) & SEC_CODE))
+#endif
                        continue;
 
                *(sectp++) = sect;
@@ -184,13 +192,19 @@ void bfd_t::file_t::print(
 
        for(unsigned int i = 0; i < section_count; ++i) {
                asection *sect = sections[i];
-
+#ifdef bfd_get_section_vma
                bfd_vma vma = bfd_get_section_vma(abfd, sect);
+#else
+               bfd_vma vma = bfd_section_vma(sect);
+#endif
 
                if(pc < vma)
                        continue;
-
+#ifdef bfd_get_section_size
                bfd_size_type size = bfd_get_section_size(sect);
+#else
+               bfd_size_type size = bfd_section_size(sect);
+#endif
                if(pc >= vma + size)
                        continue;
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants