2
0
Fork 0

Patch GDB for Genode target support

This commit is contained in:
Emery Hemingway 2020-04-19 21:07:51 +05:30
parent feb555991e
commit 6c8629d1be
4 changed files with 43 additions and 5 deletions

View File

@ -23,6 +23,11 @@ with prev; {
null;
});
gdb = prev.gdb.overrideAttrs (attrs: {
patches = attrs.patches
++ lib.optional targetPlatform.isGenode [ ./gdb/genode.patch ];
});
inherit (final.genodeSources) genodeBase;
genodeLibcCross = callPackage ./libc { };

33
overlay/gdb/genode.patch Normal file
View File

@ -0,0 +1,33 @@
diff -ur a/bfd/config.bfd b/bfd/config.bfd
--- a/bfd/config.bfd 2020-02-08 18:20:13.000000000 +0530
+++ b/bfd/config.bfd 2020-04-19 20:27:34.434061725 +0530
@@ -227,7 +227,7 @@
targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
want64=true
;;
- aarch64-*-elf | aarch64-*-rtems*)
+ aarch64-*-elf | aarch64-*-rtems* | aarch64-*-genode*)
targ_defvec=aarch64_elf64_le_vec
targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
want64=true
@@ -664,7 +664,7 @@
targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
want64=true
;;
- x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia)
+ x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia | x86_64-*-genode*)
targ_defvec=x86_64_elf64_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec l1om_elf64_vec k1om_elf64_vec"
case "${targ}" in
diff -ur a/config.sub b/config.sub
--- a/config.sub 2020-02-08 18:20:13.000000000 +0530
+++ b/config.sub 2020-04-19 20:12:01.154441238 +0530
@@ -1368,7 +1368,7 @@
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*)
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* | genode*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
qnx*)

View File

@ -1,12 +1,12 @@
# SPDX-License-Identifier: CC0-1.0
{ stdenv, fetchgit, tup, pkgconfig }:
{ stdenv, fetchgit, tup }:
stdenv.mkDerivation rec {
pname = "block_router";
version = "0.1.1";
nativeBuildInputs = [ tup pkgconfig ];
nativeBuildInputs = [ tup ];
src = fetchgit {
url = "https://git.sr.ht/~ehmry/block_router";

View File

@ -1,14 +1,14 @@
# SPDX-License-Identifier: CC0-1.0
{ stdenv, fetchgit, buildPackages }:
{ stdenv, fetchgit, tup }:
stdenv.mkDerivation rec {
pname = "sotest-producer";
version = "0.2.0";
nativeBuildInputs = with buildPackages; [ tup pkgconfig ];
nativeBuildInputs = [ tup ];
src = buildPackages.fetchgit {
src = fetchgit {
url = "https://git.sr.ht/~ehmry/genode-sotest-producer";
rev = "v" + version;
sha256 = "01qy86khkihj8jgvgc92w4bb3kpf640g1l2m5h5ym7s03viqinkr";