A overlay/boehmgc/genode.patch => overlay/boehmgc/genode.patch +17 -0
@@ 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 */
M overlay/default.nix => overlay/default.nix +5 -0
@@ 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 ];
M overlay/libc/default.nix => overlay/libc/default.nix +4 -2
@@ 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"