[Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions
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.
[Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
https://sourceware.org/bugzilla/show_bug.cgi?id=26708 Mark Wielaard changed: What|Removed |Added CC||mark at klomp dot org --- Comment #1 from Mark Wielaard --- (In reply to Alex Stefanov from comment #0) > LCC does not supports nested functions > May you have any solution how to fix it? Use GCC to build or provide patches to use a different construct both compilers understand. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
https://sourceware.org/bugzilla/show_bug.cgi?id=26708 --- Comment #2 from Mark Wielaard --- Note that there should be a configure test to check that your compiler has all capabilities to build elfutils: # We use -std=gnu99 but have explicit checks for some language constructs # and GNU extensions since some compilers claim GNU99 support, but don't # really support all language extensions. In particular we need # Mixed Declarations and Code # https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html # Nested Functions # https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html # Arrays of Variable Length # https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html Normally if your compiler doesn't support those language constructs the "Checking for for gcc with GNU99 support..." test should fail. If it doesn't in your case we might have to tighten up the configure check. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
https://sourceware.org/bugzilla/show_bug.cgi?id=26708 --- Comment #3 from Alex Stefanov --- yes, i hacked such check with export ac_cv_c99=yes -- You are receiving this mail because: You are on the CC list for the bug.
[Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
https://sourceware.org/bugzilla/show_bug.cgi?id=26708 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTABUG --- Comment #4 from Mark Wielaard --- (In reply to Alex Stefanov from comment #3) > yes, i hacked such check with > export ac_cv_c99=yes aha. ok, then I think the code works as intended and you should file a bug with icc to support the needed compiler features. -- You are receiving this mail because: You are on the CC list for the bug.