* [Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions
@ 2020-10-06 8:10 alexander at mezon dot ru
2020-10-06 10:49 ` [Bug libelf/26708] " mark at klomp dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: alexander at mezon dot ru @ 2020-10-06 8:10 UTC (permalink / raw)
To: elfutils-devel
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
2020-10-06 8:10 [Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions alexander at mezon dot ru
@ 2020-10-06 10:49 ` mark at klomp dot org
2020-10-06 12:34 ` mark at klomp dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2020-10-06 10:49 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=26708
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
(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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
2020-10-06 8:10 [Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions alexander at mezon dot ru
2020-10-06 10:49 ` [Bug libelf/26708] " mark at klomp dot org
@ 2020-10-06 12:34 ` mark at klomp dot org
2020-10-06 12:39 ` alexander at mezon dot ru
2020-10-06 18:52 ` mark at klomp dot org
3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2020-10-06 12:34 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=26708
--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
2020-10-06 8:10 [Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions alexander at mezon dot ru
2020-10-06 10:49 ` [Bug libelf/26708] " mark at klomp dot org
2020-10-06 12:34 ` mark at klomp dot org
@ 2020-10-06 12:39 ` alexander at mezon dot ru
2020-10-06 18:52 ` mark at klomp dot org
3 siblings, 0 replies; 5+ messages in thread
From: alexander at mezon dot ru @ 2020-10-06 12:39 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=26708
--- Comment #3 from Alex Stefanov <alexander at mezon dot ru> ---
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libelf/26708] lcc compiler can't build elfutils because of nested functions
2020-10-06 8:10 [Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions alexander at mezon dot ru
` (2 preceding siblings ...)
2020-10-06 12:39 ` alexander at mezon dot ru
@ 2020-10-06 18:52 ` mark at klomp dot org
3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2020-10-06 18:52 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=26708
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |NOTABUG
--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
(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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-06 18:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 8:10 [Bug libelf/26708] New: lcc compiler can't build elfutils because of nested functions alexander at mezon dot ru
2020-10-06 10:49 ` [Bug libelf/26708] " mark at klomp dot org
2020-10-06 12:34 ` mark at klomp dot org
2020-10-06 12:39 ` alexander at mezon dot ru
2020-10-06 18:52 ` mark at klomp dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).