2
0
Fork 0
Browse Source

WiP! boehmgc

legacyPackages
Emery Hemingway 2 years ago
parent
commit
e1c6b5908e
  1. 17
      overlay/boehmgc/genode.patch
  2. 5
      overlay/default.nix
  3. 6
      overlay/libc/default.nix

17
overlay/boehmgc/genode.patch

@ -0,0 +1,17 @@
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 348255d..5e0b7cd 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -697,6 +697,12 @@ EXTERN_C_BEGIN
# define mach_type_known
# endif
+# if defined(__GENODE__) && (defined(__amd64__) || defined(__x86_64__))
+# define X86_64
+# define GENODE
+# define mach_type_known
+# endif
+
/* Feel free to add more clauses here */
/* Or manually define the machine type here. A machine type is */

5
overlay/default.nix

@ -20,6 +20,11 @@ in {
++ [ "--without-bash-malloc" ]; # no sbrk please
});
boehmgc = overrideHostAttrs boehmgc (attrs: {
patches = [ ./boehmgc/genode.patch ];
configureFlags = attrs.configureFlags ++ [ "--enable-threads=none" ];
});
binutils-unwrapped =
addPatches binutils-unwrapped [ ./binutils/support-genode.patch ];

6
overlay/libc/default.nix

@ -14,8 +14,10 @@ genodeSources.buildDepot {
# The libc needs a lot of work and we can't afford to
# rebuild the toolchain for every fix.
''
find depot -name libc.abi.so -exec install -D {} "''${!outputLib}/libc.so" \;
find depot -name libm.abi.so -exec install -D {} "''${!outputLib}/libm.so" \;
libOutput="''${!outputLib}"
find depot -name libc.abi.so -exec install -D {} "$libOutput/libc.so" \;
find depot -name libm.abi.so -exec install -D {} "$libOutput/libm.so" \;
ln -s "libc.so" "$libOutput/libpthread.so"
'';
postInstall = ''
local headerDir="''${!outputDev}/include"

Loading…
Cancel
Save