2
0
Fork 0

WiP! boehmgc

This commit is contained in:
Emery Hemingway 2020-05-09 13:00:19 +05:30
parent 370ea4db70
commit 426c738b43
3 changed files with 26 additions and 2 deletions

View File

@ -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 */

View File

@ -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 ];

View File

@ -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"