Skip to contentSkip to conversation

gdb: force arm mode

PATCH In review Martin Jansa 2 participants 2 messages Jul 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb: force arm mode

* triggers some issue in gcc-4.9, this call:
arm-oe-linux-gnueabi-gcc -march=armv5te -mthumb -mthumb-interwork -mtune=xscale --sysroot=/OE/build/shr-core/tmp-eglibc/sysroots/spitz -O2 -pipe -g
-feliminate-unused-debug-types -I.
-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/common -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/config -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../include/opcode -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../opcodes/.. -I../bfd -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../bfd -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../include -I../libdecnumber -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../libdecnumber -I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/gnulib/import
-Ibuild-gnulib/import -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value
-Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -c
-o eval.o -MT eval.o -MMD -MP -MF .deps/eval.Tpo /OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/eval.c

just hangs (strace shows occasional call to mmap, brk, munmap) and eats all available memory (in my case 20GB), I've waited for 2,5 hours and it didn't finish,
after removing -mthumb it builds in second.

---
 meta/recipes-devtools/gdb/gdb_7.7.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/gdb/gdb_7.7.bb +3 -0
index 1abc9d8..bc042ec 100644
@@ -7,6 +7,9 @@ PACKAGECONFIG ??= ""
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python"
 PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
 
+# cc1 (4.9) call with -mthumb gets stuck and eats all available memory (over 20GB in my case)
+ARM_INSTRUCTION_SET = "arm"
+
 do_configure_prepend() {
 	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
 		cat > ${WORKDIR}/python << EOF
Signature · 1 line
2.0.0
#1 lore raw
Quoted 3 lines · Martin Jansa

* triggers some issue in gcc-4.9, this call:
arm-oe-linux-gnueabi-gcc -march=armv5te -mthumb -mthumb-interwork

-mtune=xscale

Quoted 3 lines

--sysroot=/OE/build/shr-core/tmp-eglibc/sysroots/spitz -O2 -pipe -g
-feliminate-unused-debug-types -I.

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb

Quoted 1 line

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/common

Quoted 1 line

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/config

Quoted 2 lines

-DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../include/opcode

Quoted 1 line

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../opcodes/..

Quoted 2 lines

-I../bfd

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../bfd

Quoted 1 line

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../include

Quoted 2 lines

-I../libdecnumber

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/../libdecnumber

Quoted 1 line

-I/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/gnulib/import

Review

Quoted 7 lines
(quoted diff) +0 -6
-Ibuild-gnulib/import    -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value
-Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition -Wformat-nonliteral  -c
-o eval.o -MT eval.o -MMD -MP -MF .deps/eval.Tpo

/OE/build/shr-core/tmp-eglibc/work/xscalete-oe-linux-gnueabi/gdb/7.7-r0/gdb-7.7/gdb/eval.c

Quoted 2 lines

just hangs (strace shows occasional call to mmap, brk, munmap) and eats

all available memory

Review

Quoted 9 lines

(in my case 20GB), I've waited for 2,5 hours and it didn't finish, after removing -mthumb it builds in second.

---
 meta/recipes-devtools/gdb/gdb_7.7.bb | 3 +++
 1 file changed, 3 insertions(+)
(quoted diff) +0 -0

b/meta/recipes-devtools/gdb/gdb_7.7.bb

meta/recipes-devtools/gdb/gdb_7.7.bb PACKAGECONFIG ??= "" · line 7

Quoted 5 lines

index 1abc9d8..bc042ec 100644

meta/recipes-devtools/gdb/gdb_7.7.bb +0 -0
@@ -7,6 +7,9 @@ PACKAGECONFIG ??= ""
 PACKAGECONFIG[python] =

"--with-python=${WORKDIR}/python,--without-python,python"

meta/recipes-devtools/gdb/gdb_7.7.bb PACKAGECONFIG ??= "" · line 8

Quoted 1 line
meta/recipes-devtools/gdb/gdb_7.7.bb +0 -0
 PACKAGECONFIG[babeltrace] =

"--with-babeltrace,--without-babeltrace,babeltrace"

meta/recipes-devtools/gdb/gdb_7.7.bb PACKAGECONFIG ??= "" · line 9

Quoted 2 lines
meta/recipes-devtools/gdb/gdb_7.7.bb +1 -0
+# cc1 (4.9) call with -mthumb gets stuck and eats all available memory

(over 20GB in my case)

meta/recipes-devtools/gdb/gdb_7.7.bb PACKAGECONFIG ??= "" · line 11

Quoted 1 line
meta/recipes-devtools/gdb/gdb_7.7.bb +1 -0
+ARM_INSTRUCTION_SET = "arm"

we dont want to turn thumb off unconditionally since thumb2 may be ok.

meta/recipes-devtools/gdb/gdb_7.7.bb PACKAGECONFIG ??= ""

Quoted 3 lines
meta/recipes-devtools/gdb/gdb_7.7.bb +1 -0
+
 do_configure_prepend() {
        if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python',

'python', '', d)}" ]; then

Quoted 9 lines
meta/recipes-devtools/gdb/gdb_7.7.bb +0 -1
                cat > ${WORKDIR}/python << EOF
--

2.0.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core