Skip to contentSkip to conversation

gdb-cross: add dependency on gmp-native

PATCH In review Martin Jansa 2 participants 2 messages Nov 9, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb-cross: add dependency on gmp-native

* it was already added for target and cross-canadian gdb in:
commit 4643d1eb222151384f77d13a936537aae5ca3fe6
Author: Khem Raj <[email protected]>
Date: Fri Nov 5 17:37:33 2021 -0700

gdb: Add dependency on libgmp

gdb 11 has added this library as must have

* but gdb-cross.inc overwrites DEPENDS from gdb-common.inc and needs the dependency as well as shown in log.do_compile:

checking for libgmp... no
configure: error: GMP is missing or unusable make[1]: *** [Makefile:9418: configure-gdb] Error 1

and in gdb-cross-i686/11.1-r0/build-i686-oe-linux/gdb/config.log:

configure:10402: checking for libgmp
configure:10422: gcc -o conftest -isystem/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/include -O2 -pipe -isystem/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/include -I/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/include -L/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/lib -L/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/lib -Wl,--enable-new-dtags -Wl,-rpath-link,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/lib -Wl,-rpath,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/OE/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 conftest.c -lncursesw -lm -ldl -lgmp >&5
conftest.c:52:10: fatal error: gmp.h: No such file or directory

     52 | #include <gmp.h>
        |          ^~~~~~~

* this fails only when the host OS doesn't have GMP installed
otherwise it will use libgmp from host and ignore --with-libgmp-prefix=/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr

---
 meta/recipes-devtools/gdb/gdb-cross.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/gdb/gdb-cross.inc +1 -1
index 4e50cd5ab0..9f9675c1b3 100644
@@ -1,6 +1,6 @@
 require gdb-common.inc
 
-DEPENDS = "expat-native ncurses-native flex-native bison-native"
+DEPENDS = "expat-native gmp-native ncurses-native flex-native bison-native"
 
 inherit python3native pkgconfig
 
Signature · 1 line
2.32.0
#1 lore raw
Quoted 9 lines · Martin Jansa

* it was already added for target and cross-canadian gdb in:
commit 4643d1eb222151384f77d13a936537aae5ca3fe6
Author: Khem Raj <[email protected]>
Date: Fri Nov 5 17:37:33 2021 -0700

gdb: Add dependency on libgmp

gdb 11 has added this library as must have

Quoted 9 lines

* but gdb-cross.inc overwrites DEPENDS from gdb-common.inc and needs the dependency as well as shown in log.do_compile:

checking for libgmp... no
configure: error: GMP is missing or unusable make[1]: *** [Makefile:9418: configure-gdb] Error 1

   and in gdb-cross-i686/11.1-r0/build-i686-oe-linux/gdb/config.log:

thanks for doing it

Quoted 38 lines
   configure:10402: checking for libgmp
   configure:10422: gcc  -o conftest -isystem/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/include -O2 -pipe     -isystem/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/include -I/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/include  -L/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/lib                         -L/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/OE/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 conftest.c -lncursesw -lm -ldl  -lgmp >&5
   conftest.c:52:10: fatal error: gmp.h: No such file or directory
      52 | #include <gmp.h>
         |          ^~~~~~~

* this fails only when the host OS doesn't have GMP installed
otherwise it will use libgmp from host and ignore --with-libgmp-prefix=/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/OE/tmp-glibc/work/x86_64-linux/gdb-cross-i686/11.1-r0/recipe-sysroot-native/usr

---
  meta/recipes-devtools/gdb/gdb-cross.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/gdb/gdb-cross.inc +1 -2
index 4e50cd5ab0..9f9675c1b3 100644
@@ -1,6 +1,6 @@
  require gdb-common.inc
 
-DEPENDS = "expat-native ncurses-native flex-native bison-native"
+DEPENDS = "expat-native gmp-native ncurses-native flex-native bison-native"
 
  inherit python3native pkgconfig
 
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#158010): https://lists.openembedded.org/g/openembedded-core/message/158010
Mute This Topic: https://lists.openembedded.org/mt/86928271/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-