~ehmry/sigil

7ecb88cfdaa994a785102ab1884bac7bb313ebd3 — Emery Hemingway 3 years ago 15f122f bad-nixpkgs
Use Nixpkg master as flake input

Now that the LLVM packages selector is merged we are compatible
with the Nixpkgs master branch.
4 files changed, 52 insertions(+), 55 deletions(-)

M flake.lock
M flake.nix
M overlay/binutils/support-genode.patch
M overlay/default.nix
M flake.lock => flake.lock +6 -8
@@ 2,18 2,16 @@
  "nodes": {
    "nixpkgs": {
      "locked": {
        "lastModified": 1608384842,
        "narHash": "sha256-yxv4xAdHIKHgg9v/4zQwlnd20tmY/dMezJJ1cpYA7Vo=",
        "owner": "ehmry",
        "lastModified": 1610377899,
        "narHash": "sha256-g/+jntJR56K/yQoj8C30xIdFwWpm6Fc7W8mZhwNRcRQ=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "b820868db27a90f48dd109265efaab257ffc2dbd",
        "rev": "f18ba0425d8e8cdf9e1d3168e18f1000b2b8e6e6",
        "type": "github"
      },
      "original": {
        "owner": "ehmry",
        "ref": "genodepkgs",
        "repo": "nixpkgs",
        "type": "github"
        "id": "nixpkgs",
        "type": "indirect"
      }
    },
    "root": {

M flake.nix => flake.nix +0 -1
@@ 1,7 1,6 @@
{
  description = "Genode packages";

  inputs.nixpkgs.url = "github:ehmry/nixpkgs/genodepkgs";

  outputs = { self, nixpkgs }:
    let

M overlay/binutils/support-genode.patch => overlay/binutils/support-genode.patch +44 -45
@@ 1,14 1,19 @@
commit 848a25e8c97075ddead404beff15f122fd0fd624
Author: Emery Hemingway <ehmry@posteo.net>
Date:   Tue Jun 2 11:37:03 2020 +0530
From e0c1713b43032ac1b4601c89db152f319a772f61 Mon Sep 17 00:00:00 2001
From: Emery Hemingway <ehmry@posteo.net>
Date: Tue, 12 Jan 2021 15:24:52 +0100
Subject: [PATCH] Add Genode target support

    Genode support
---
 bfd/config.bfd    | 6 +++---
 gas/configure.tgt | 4 +++-
 ld/configure.tgt  | 8 ++++----
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 6391f35684..fba459d066 100644
index b96931f52e..14cf0f7dbe 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -229,7 +229,7 @@ case "${targ}" in
@@ -227,7 +227,7 @@ case "${targ}" in
     targ_archs="$targ_archs bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
     want64=true
     ;;


@@ 17,7 22,7 @@ index 6391f35684..fba459d066 100644
     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
@@ -554,7 +554,7 @@ case "${targ}" in
@@ -560,7 +560,7 @@ case "${targ}" in
     targ_selvecs=hppa_elf32_vec
     ;;
 


@@ 26,7 31,7 @@ index 6391f35684..fba459d066 100644
     targ_defvec=i386_elf32_vec
     targ_selvecs="iamcu_elf32_vec i386_coff_vec"
     ;;
@@ -662,7 +662,7 @@ case "${targ}" in
@@ -664,7 +664,7 @@ case "${targ}" in
     targ_selvecs="i386_elf32_vec iamcu_elf32_vec l1om_elf64_vec k1om_elf64_vec"
     want64=true
     ;;


@@ 35,21 40,8 @@ index 6391f35684..fba459d066 100644
     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 --git a/config.sub b/config.sub
index c95acc681d..388c305636 100755
--- a/config.sub
+++ b/config.sub
@@ -1376,7 +1376,7 @@ case $os in
 	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
 	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-	     | midnightbsd*)
+	     | midnightbsd* | genode*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	qnx*)
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 3d0415c1aa..177a82876f 100644
index 37224c5144..f033f65ea9 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -123,6 +123,7 @@ generic_target=${cpu_type}-$vendor-$os


@@ 60,56 52,63 @@ index 3d0415c1aa..177a82876f 100644
   aarch64*-*-linux*)			fmt=elf em=linux
     case ${cpu}-${os} in
       aarch64*-linux-gnu_ilp32)		arch=aarch64:32 ;;
@@ -139,7 +140,8 @@ case ${generic_target} in
@@ -139,7 +140,7 @@ case ${generic_target} in
 
   arm-*-phoenix*)			fmt=elf ;;
   arm-*-elf)				fmt=elf ;;
-  arm-*-eabi* | arm-*-rtems*)		fmt=elf em=armeabi ;;
+  arm-*-eabi* | arm-*-rtems* | arm-*-genode*)
+					fmt=elf em=armeabi ;;
+  arm-*-eabi* | arm-*-rtems* | arm-*-genode*)	fmt=elf em=armeabi ;;
   arm-*-symbianelf*)			fmt=elf em=symbian ;;
   arm-*-kaos*)				fmt=elf ;;
   arm-*-conix*)				fmt=elf ;;
@@ -213,6 +215,7 @@ case ${generic_target} in
   i386-*-elfiamcu)			fmt=elf arch=iamcu ;;
@@ -220,6 +221,7 @@ case ${generic_target} in
   i386-*-elf*)				fmt=elf ;;
   i386-*-fuchsia*)			fmt=elf ;;
+  i386-*-genode*)			fmt=elf ;;
   i386-*-kaos*)				fmt=elf ;;
   i386-*-bsd*)				fmt=aout em=386bsd ;;
+  i386-*-genode*)			fmt=elf ;;
   i386-*-nacl*)				fmt=elf em=nacl
     case ${cpu} in
       x86_64*)				arch=x86_64:32 ;;
diff --git a/ld/configure.tgt b/ld/configure.tgt
index fad8b2e5c8..7179dbff3a 100644
index 23194e357f..15d10b770e 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -47,7 +47,7 @@ targ64_extra_libpath=
 case "${targ}" in
@@ -46,7 +46,7 @@ case "${targ}" in
 aarch64_be-*-elf)	targ_emul=aarch64elfb
 			targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
 			targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf"
 			;;
-aarch64-*-elf | aarch64-*-rtems*)
+aarch64-*-elf | aarch64-*-rtems* | aarch64-*-genode*)
++aarch64-*-elf | aarch64-*-rtems* | aarch64-*-genode*)
 			targ_emul=aarch64elf
 			targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb" ;;
 aarch64-*-cloudabi*)	targ_emul=aarch64cloudabi
@@ -115,7 +115,7 @@ arm-*-nto*)		targ_emul=armnto ;;
 arm-*-phoenix*)		targ_emul=armelf ;;
 			targ_extra_emuls="aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
 			;;
@@ -148,7 +148,7 @@ arm-*-phoenix*)		targ_emul=armelf
 armeb-*-elf | armeb-*-eabi*)
 			targ_emul=armelfb ;;
 			targ_emul=armelfb
 			;;
-arm-*-elf | arm*-*-eabi* | arm-*-rtems*)
+arm-*-elf | arm*-*-eabi* | arm-*-rtems* | arm-*-genode*)
 			targ_emul=armelf ;;
 			targ_emul=armelf
 			;;
 arm*-*-symbianelf*)	targ_emul=armsymbian;;
 arm-*-kaos*)		targ_emul=armelf ;;
@@ -302,10 +302,10 @@ x86_64-*-netbsd*)	targ_emul=elf_x86_64
 			esac ;;
@@ -357,7 +357,7 @@ i[3-7]86-*-netbsdpe*)	targ_emul=i386pe
 i[3-7]86-*-elfiamcu)	targ_emul=elf_iamcu
 			targ_extra_emuls=elf_i386 ;;
 			targ_extra_emuls=elf_i386
 			;;
-i[3-7]86-*-elf* | i[3-7]86-*-rtems*)
+i[3-7]86-*-elf* | i[3-7]86-*-rtems* | i[3-7]86-*-genode*)
 			targ_emul=elf_i386
 			targ_extra_emuls=elf_iamcu ;;
 			targ_extra_emuls=elf_iamcu
 			;;
@@ -964,7 +964,7 @@ x86_64-*-netbsd*)	targ_emul=elf_x86_64
 					sed -e 's/netbsd/netbsdelf/'`;;
 			esac
 			;;
-x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia*)
+x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-fuchsia* | x86_64-*-genode*)
 			targ_emul=elf_x86_64
 			targ_extra_emuls="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
 			targ_extra_libpath="elf_i386 elf_iamcu elf32_x86_64 elf_l1om elf_k1om"
-- 
2.29.2


M overlay/default.nix => overlay/default.nix +2 -1
@@ 37,7 37,8 @@ in {

  binutils-unwrapped = overrideAttrsTarget (attrs: {
    patches = attrs.patches ++ [ ./binutils/support-genode.patch ];
    nativeBuildInputs = [ final.updateAutotoolsGnuConfigScriptsHook ];
    nativeBuildInputs = attrs.nativeBuildInputs
      ++ [ final.updateAutotoolsGnuConfigScriptsHook ];
  }) binutils-unwrapped;

  cmake = overrideAttrsTarget (attrs: {