[Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions

alexander at mezon dot ru sourceware-bugzilla@sourceware.org
Tue Oct 6 08:10:54 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=26708

            Bug ID: 26708
           Summary: lcc compiler can't build elfutils because of nested
                    functions
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libelf
          Assignee: unassigned at sourceware dot org
          Reporter: alexander at mezon dot ru
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

i'm trying to compile elfutils-0.181 for MCST Elbrus8c platform
and got such issue

gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/usr/share/locale"' -I. -I.. 
-I. -I. -I../lib -I.. -I. -I./../libelf -I./../libebl -I./../libdw
-I./../libdwelf -I./../debuginfod  -std=gnu99 -Wall -Wshadow -Wformat=2
-Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op
-Wduplicated-cond  -Wimplicit-fallthrough=5 -Werror -Wunused -Wextra
-Wstack-usage=262144   -D_FORTIFY_SOURCE=2 -Wno-error -O2 -g -march=elbrus-v4
-Os -fstack-protector-strong -Wno-error -c -o elf-from-memory.o
elf-from-memory.c
lcc: "elf-from-memory.c", line 234: error #65: expected a ";"
        {
        ^

lcc: "elf-from-memory.c", line 259: warning #12: parsing restarts here after
          previous syntax error
        goto libelf_error;
                         ^

lcc: "elf-from-memory.c", line 312: error #159: declaration is incompatible
          with previous "handle_segment" (declared at line 232)
        inline bool handle_segment (GElf_Addr vaddr, GElf_Off offset,
                    ^

lcc: "elf-from-memory.c", line 314: error #65: expected a ";"
        {
        ^

lcc: "elf-from-memory.c", line 330: warning #12: parsing restarts here after
          previous syntax error
            goto read_error;
                           ^

lcc: "elf-from-memory.c", line 58: warning #826: parameter "pagesize" was never
          referenced [-Wunused-parameter]
                        GElf_Xword pagesize,
                                   ^

lcc: "elf-from-memory.c", line 223: warning #3137: variable "found_base" was
          declared but never referenced [-Wunused-variable]
    bool found_base = false;
         ^

3 errors detected in the compilation of "elf-from-memory.c".


LCC does not supports nested functions
May you have any solution how to fix it?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Elfutils-devel mailing list