libunwind lacks AArch64 support

Bug #1099810 reported by Marcin Juszkiewicz
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AArch64 cross-distro work
Medium
Unassigned
Linaro GCC
Fix Released
Medium
Yvan Roux
Linaro OpenEmbedded
Fix Released
Medium
Riku Voipio

Bug Description

| configure:16598: checking for build architecture
| configure:16600: result: x86_64
| configure:16602: checking for host architecture
| configure:16604: result: aarch64
| configure:16606: checking for target architecture
| configure:16608: result: aarch64
| configure:16610: checking for target operating system
| configure:16612: result: linux-gnu
| configure:16728: checking for ELF helper width
| configure:16737: error: Unknown ELF target: aarch64

Revision history for this message
Alexander Sack (asac) wrote :

Isn't this just a config.sub update?

Revision history for this message
Alexander Sack (asac) wrote :

config.sub in libunwind (apt-get source in quantal)

# Free Software Foundation, Inc.
timestamp='2009-06-11'

Revision history for this message
Marcin Juszkiewicz (hrw) wrote : Re: [Bug 1099810] Re: libunwind lacks AArch64 support

W dniu 18.01.2013 01:39, Alexander Sack pisze:
> config.sub in libunwind (apt-get source in quantal)
>
> # Free Software Foundation, Inc.
> timestamp='2009-06-11'

No, it is not. Under OE old gnu-config files are not issue cause
autoreconf is called.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
Download full text (4.6 KiB)

After adding aarch64 support into configure.ac:

| make[2]: Entering directory `/tmp/OE/tmp/work/aarch64-oe-linux/libunwind/1.1-r0/libunwind-1.1/src'
| ../aarch64-oe-linux-libtool --tag=CC --mode=compile aarch64-oe-linux-gcc --sysroot=/home/hrw/HDD/devel/canonical/aarch64/openembedded/build/tmp-eglibc/sy
sroots/genericarmv8 -DHAVE_CONFIG_H -I. -I../include -I../include -I../include/tdep-aarch64 -I. -D_GNU_SOURCE -DNDEBUG -O2 -pipe -g -feliminate-unused-debug
-types -fexceptions -Wall -Wsign-compare -c -o elf64.lo elf64.c
| make[2]: *** No rule to make target `libunwind-aarch64.la', needed by `libunwind-setjmp.la'. Stop.
| make[2]: *** Waiting for unfinished jobs....
| aarch64-oe-linux-libtool: compile: aarch64-oe-linux-gcc --sysroot=/home/hrw/HDD/devel/canonical/aarch64/openembedded/build/tmp-eglibc/sysroots/genericarmv8
 -DHAVE_CONFIG_H -I. -I../include -I../include -I../include/tdep-aarch64 -I. -D_GNU_SOURCE -DNDEBUG -O2 -pipe -g -feliminate-unused-debug-types -fexceptions -
Wall -Wsign-compare -c elf64.c -fPIC -DPIC -o .libs/elf64.o
| In file included from ../include/libunwind_i.h:52:0,
| from elfxx.h:44,
| from elf64.h:7,
| from elf64.c:2:
| ../include/libunwind.h:25:3: error: #error "Unsupported arch"
| In file included from elfxx.h:44:0,
| from elf64.h:7,
| from elf64.c:2:
| ../include/libunwind_i.h:154:19: error: unknown type name 'UNW_PASTE'
| ../include/libunwind_i.h:154:19: error: unknown type name 'full_mask'
| ../include/libunwind_i.h:203:12: error: expected ')' before '(' token
| ../include/libunwind_i.h:207:12: error: expected ')' before '(' token
| ../include/libunwind_i.h:213:13: error: expected ')' before '(' token
| ../include/libunwind_i.h:219:12: error: expected ')' before '(' token
| ../include/libunwind_i.h:224:13: error: expected ')' before '(' token
| ../include/libunwind_i.h:227:12: error: expected ')' before '(' token
| ../include/libunwind_i.h:229:1: error: unknown type name 'unw_dyn_info_list_t'
| ../include/libunwind_i.h:266:13: error: unknown type name 'UNW_PASTE'
| ../include/libunwind_i.h:266:13: error: unknown type name 'mi_init'
| ../include/libunwind_i.h:267:1: error: unknown type name 'unw_word_t'
| ../include/libunwind_i.h:280:5: error: unknown type name 'unw_dyn_info_t'
| ../include/libunwind_i.h:281:5: error: unknown type name 'unw_dyn_info_t'
| ../include/libunwind_i.h: In function 'invalidate_edi':
| ../include/libunwind_i.h:295:16: error: request for member 'format' in something not a structure or union
| ../include/libunwind_i.h:296:16: error: request for member 'format' in something not a structure or union
| In file included from ../include/libunwind_i.h:320:0,
| from elfxx.h:44,
| from elf64.h:7,
| from elf64.c:2:
| ../include/tdep/libunwind_i.h: At top level:
| ../include/tdep/libunwind_i.h:25:3: error: #error "Unsupported arch"
| In file included from elf64.h:7:0,
| from elf64.c:2:
| elfxx.h:46:35: error: unknown type name 'unw_addr_space_t'
| elfxx.h:47:18: error: unknown type name 'unw_word_t'
| elfxx.h:49:7: error: unknown type name '...

Read more...

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

configure.ac patch used

Revision history for this message
Riku Voipio (riku-voipio) wrote :

src/arm$ wc *
...
 2152 8635 64623 total

2K lines and 64KB of code needed to implement ARM support, Aarch64 probably similar. This is probably something the toolchain team can do better than we can.

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: New → Confirmed
Changed in linaro-aarch64:
status: New → Confirmed
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

12:10 < hrw> mgrettondann: can someone from TCWG take care of bug 1099810?
12:11 < mgrettondann> hrw, not immediately - but certainly in a week or two
12:12 < hrw> mgrettondann: sure. just wanted to grab attention

Revision history for this message
Owen Yamauchi (owen-yamauchi) wrote :

libunwind isn't a showstopper for getting HHVM to build. The JIT functionality depends on libunwind, but we should be able to get the interpreter to work without it.

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
importance: Undecided → Low
Changed in gcc-linaro:
milestone: none → 4.7-2013.02
importance: Undecided → Medium
Marcin Juszkiewicz (hrw)
Changed in gcc-linaro:
assignee: nobody → Yvan Roux (yvan-roux)
Anmar Oueja (anmar)
Changed in linaro-oe:
importance: Low → Critical
Yvan Roux (yvan-roux)
Changed in gcc-linaro:
status: New → In Progress
Changed in linaro-oe:
status: Confirmed → In Progress
Changed in linaro-aarch64:
status: Confirmed → In Progress
Changed in gcc-linaro:
milestone: 4.7-2013.02 → none
milestone: none → 4.7-2013.03
Changed in gcc-linaro:
milestone: 4.7-2013.03 → 4.7-2013.04
Fathi Boudra (fboudra)
Changed in linaro-oe:
assignee: nobody → Marcin Juszkiewicz (hrw)
milestone: none → 13.04
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Yvan: please add comment when you will have something for integration.

Revision history for this message
Yvan Roux (yvan-roux) wrote :

Marcin: Yes sure, I've a couple of things to fix before upstream submission, but will let you know the status.

Yvan Roux (yvan-roux)
Changed in gcc-linaro:
milestone: 4.7-2013.04 → 4.8-2013.05
Fathi Boudra (fboudra)
Changed in linaro-oe:
importance: Critical → Medium
milestone: 13.04 → 13.05
Revision history for this message
Anmar Oueja (anmar) wrote :

The push to May is caused by upstreaming or porting. I need to know to update some JIRA cards for the HHVM work.

Revision history for this message
Yvan Roux (yvan-roux) wrote :

Porting, I was preempted by multiple merge reviews and releases tasks, but I would be able to post the patch for review by tomorrow evening. Regarding JIRA, I update the TCWG related one, is it sufficient or should I update thsi bug entry and/or LEG cards too ?

Revision history for this message
Anmar Oueja (anmar) wrote :

On 11 April 2013 13:19, Yvan Roux <email address hidden> wrote:
> Porting, I was preempted by multiple merge reviews and releases tasks,
> but I would be able to post the patch for review by tomorrow evening.
> Regarding JIRA, I update the TCWG related one, is it sufficient or
> should I update thsi bug entry and/or LEG cards too ?

Don't worry about the JIRA LEG cards. I will do that.

Thanks,

anmar

Revision history for this message
Yvan Roux (yvan-roux) wrote :

Ok, thanks.

Revision history for this message
Yvan Roux (yvan-roux) wrote :

This is the patch I sent for review, thus it will probably evolved but you can use it for early testing.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Yvan: few notes (already given on irc):

15:03 < hrw> yroux: you need to update (C) info in some files
15:06 < yroux> hrw, indeed thanks
15:24 < hrw> yroux: do: s/unreachable()/_builtin_unreachable()/ in src/aarch64/Gresume.c and it will work
15:24 < hrw> yroux: that's for 1.1 version

Revision history for this message
Yvan Roux (yvan-roux) wrote :

backport from the trunk for the unreachable() call issue

Changed in linaro-aarch64:
importance: Undecided → Medium
Revision history for this message
Yvan Roux (yvan-roux) wrote :

Here is a second version of the patch after upstream comments, no new features are enabled, but unwinding is now made with eh_frame information instead of debug frame ones. Notice that it hasn't been approved yet.

Revision history for this message
Yvan Roux (yvan-roux) wrote :

Patch commited upstream

Changed in gcc-linaro:
status: In Progress → Fix Committed
Changed in linaro-aarch64:
status: In Progress → Fix Committed
Changed in linaro-oe:
status: In Progress → Fix Committed
Fathi Boudra (fboudra)
Changed in linaro-oe:
status: Fix Committed → In Progress
Yvan Roux (yvan-roux)
Changed in gcc-linaro:
status: Fix Committed → Fix Released
Fathi Boudra (fboudra)
Changed in linaro-oe:
status: In Progress → Fix Committed
assignee: Marcin Juszkiewicz (hrw) → Riku Voipio (riku-voipio)
Fathi Boudra (fboudra)
Changed in linaro-oe:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers