Skip to contentSkip to conversation

gdb: MIPS plus musl build fix + minor cleanup

PATCH In review Andre McCurdy 2 participants 7 messages Feb 8, 2016

lore
Share & tools
lore
#0 lore raw

cover gdb: MIPS plus musl build fix + minor cleanup

Andre McCurdy (2):
gdb: build fix for MIPS + musl libc
gdb: drop unnecessary CC_FOR_BUILD etc exports

 meta/recipes-devtools/gdb/gdb-common.inc           |  7 +----
 meta/recipes-devtools/gdb/gdb.inc                  |  1 +
 .../gdb/gdb/0001-use-asm-sgidefs.h.patch           | 35 ++++++++++++++++++++++
 3 files changed, 37 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 gdb: build fix for MIPS + musl libc

The MIPS specific header <sgidefs.h> is provided by glibc and uclibc but not by musl. Regardless of the libc, the kernel headers provide <asm/sgidefs.h> which provides the same definitions, so use that instead.

---
 meta/recipes-devtools/gdb/gdb.inc                  |  1 +
 .../gdb/gdb/0001-use-asm-sgidefs.h.patch           | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch
meta/recipes-devtools/gdb/gdb.inc +1 -0
index 4ea14c1..1dd6551 100644
@@ -6,6 +6,7 @@ SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \
             file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \
             file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
             file://0001-include-sys-types.h-for-mode_t.patch \
+            file://0001-use-asm-sgidefs.h.patch \
            "
 #LDFLAGS_append = " -s"
 #export CFLAGS_append=" -L${STAGING_LIBDIR}"
meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch new file +35 -0
new file mode 100644
index 0000000..eaec390
@@ -0,0 +1,35 @@
+From 677b5b56135141c0d259e370aacd0e11c810aa15 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <[email protected]>
+Date: Fri, 5 Feb 2016 14:00:00 -0800
+Subject: [PATCH] use <asm/sgidefs.h>
+
+Build fix for MIPS with musl libc
+
+The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
+but not by musl. Regardless of the libc, the kernel headers provide
+<asm/sgidefs.h> which provides the same definitions, so use that
+instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <[email protected]>
+---
+ gdb/mips-linux-nat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index a36bb63..fd5c705 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+ 
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+ 
+-- 
+1.9.1
+
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 gdb: drop unnecessary CC_FOR_BUILD etc exports

In reply to Andre McCurdy

These exports are all provided by autotool.bbclass

http://git.openembedded.org/openembedded-core/commit/?id=edf30561184ec42e5692a55fdf93304fac0fdb1b

---
 meta/recipes-devtools/gdb/gdb-common.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-devtools/gdb/gdb-common.inc +1 -6
index 6baeb0b..06272a9 100644
@@ -22,16 +22,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
 		file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
 		file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
 		file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
 inherit autotools texinfo
 
 SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
           "
-export CC_FOR_BUILD = "${BUILD_CC}"
-export CXX_FOR_BUILD = "${BUILD_CXX}"
-export CPP_FOR_BUILD = "${BUILD_CPP}"
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
-export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
-export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
 
 B = "${WORKDIR}/build-${TARGET_SYS}"
 
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 2/2] gdb: drop unnecessary CC_FOR_BUILD etc exports

Quoted 19 lines · Andre McCurdy

These exports are all provided by autotool.bbclass

http://git.openembedded.org/openembedded-core/commit/?id=edf30561184ec42e5692a55fdf93304fac0fdb1b

---
 meta/recipes-devtools/gdb/gdb-common.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-devtools/gdb/gdb-common.inc +1 -0
index 6baeb0b..06272a9 100644
@@ -22,16 +22,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
                file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
                file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
 inherit autotools texinfo

meta/recipes-devtools/gdb/gdb-common.inc LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ · line 30

Quoted 10 lines
meta/recipes-devtools/gdb/gdb-common.inc +0 -6
 
 SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
           "
-export CC_FOR_BUILD = "${BUILD_CC}"
-export CXX_FOR_BUILD = "${BUILD_CXX}"
-export CPP_FOR_BUILD = "${BUILD_CPP}"
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
-export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
-export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
 

you should build all flavours of gdb recipes for one architectures including mutlilib combination to test this out.

Quoted 10 lines
meta/recipes-devtools/gdb/gdb-common.inc +0 -1
 B = "${WORKDIR}/build-${TARGET_SYS}"
 
--

1.9.1

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

#4 lore raw

Re: [PATCH 2/2] gdb: drop unnecessary CC_FOR_BUILD etc exports

Quoted 21 lines · Khem Raj
Quoted 20 lines · Andre McCurdy

These exports are all provided by autotool.bbclass

http://git.openembedded.org/openembedded-core/commit/?id=edf30561184ec42e5692a55fdf93304fac0fdb1b

---
 meta/recipes-devtools/gdb/gdb-common.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-devtools/gdb/gdb-common.inc +1 -0
index 6baeb0b..06272a9 100644
@@ -22,16 +22,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
                file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
                file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
 inherit autotools texinfo
 
Quoted 12 lines

meta/recipes-devtools/gdb/gdb-common.inc LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ · line 30

Quoted 9 lines
meta/recipes-devtools/gdb/gdb-common.inc +0 -6
 SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
           "
-export CC_FOR_BUILD = "${BUILD_CC}"
-export CXX_FOR_BUILD = "${BUILD_CXX}"
-export CPP_FOR_BUILD = "${BUILD_CPP}"
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
-export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
-export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
 

you should build all flavours of gdb recipes for one architectures including mutlilib combination to test this out.

I checked that these exports all exactly match the ones in autotools.bbclass so it's not clear what could go wrong.

Is there a combination which you suspect will have trouble with this patch?

Quoted 10 lines
Quoted 10 lines
meta/recipes-devtools/gdb/gdb-common.inc +0 -1
 B = "${WORKDIR}/build-${TARGET_SYS}"
 
--

1.9.1

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

#5 lore raw

Re: [PATCH 2/2] gdb: drop unnecessary CC_FOR_BUILD etc exports

Quoted 35 lines · Andre McCurdy
Quoted 21 lines · Khem Raj
Quoted 20 lines · Andre McCurdy

These exports are all provided by autotool.bbclass

http://git.openembedded.org/openembedded-core/commit/?id=edf30561184ec42e5692a55fdf93304fac0fdb1b

---
 meta/recipes-devtools/gdb/gdb-common.inc | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-devtools/gdb/gdb-common.inc +1 -0
index 6baeb0b..06272a9 100644
@@ -22,16 +22,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
                file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
                file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
 inherit autotools texinfo
 
Quoted 12 lines

meta/recipes-devtools/gdb/gdb-common.inc LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ · line 30

Quoted 9 lines
meta/recipes-devtools/gdb/gdb-common.inc +0 -6
 SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
           "
-export CC_FOR_BUILD = "${BUILD_CC}"
-export CXX_FOR_BUILD = "${BUILD_CXX}"
-export CPP_FOR_BUILD = "${BUILD_CPP}"
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
-export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
-export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
 

you should build all flavours of gdb recipes for one architectures including mutlilib combination to test this out.

Quoted 2 lines

I checked that these exports all exactly match the ones in autotools.bbclass so it's not clear what could go wrong.

These flags get overridden when morphing into native/cross/crosssdk and ilk.

Quoted 3 lines

Is there a combination which you suspect will have trouble with this patch?

build crosssdk or cross-canadian recipes e.g.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
meta/recipes-devtools/gdb/gdb-common.inc +0 -1
 B = "${WORKDIR}/build-${TARGET_SYS}"
 
--

1.9.1

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

#6 lore raw
In reply to Andre McCurdy
Quoted 4 lines · Andre McCurdy

Andre McCurdy (2):
gdb: build fix for MIPS + musl libc
gdb: drop unnecessary CC_FOR_BUILD etc exports

looks ok conditionally I have pulled it into my tree.
https://github.com/kraj/openembedded-core/tree/kraj/master

Quoted 14 lines
 meta/recipes-devtools/gdb/gdb-common.inc           |  7 +----
 meta/recipes-devtools/gdb/gdb.inc                  |  1 +
 .../gdb/gdb/0001-use-asm-sgidefs.h.patch           | 35 ++++++++++++++++++++++
 3 files changed, 37 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch

--
1.9.1

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