From 62a4d1de0e675ede83f86d4c83c6338eff49a5c8 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 18 Apr 2019 20:34:44 +0200 Subject: [PATCH] Remove Nim tests Nim is now built independently of the Genode repository using an SDK and Nimble. Fix #3300 --- repos/libports/lib/mk/nim-threads.mk | 2 - repos/libports/ports/nim.hash | 1 - repos/libports/ports/nim.port | 10 --- repos/libports/run/nim.run | 60 -------------- repos/libports/run/nim_netty.run | 82 ------------------- repos/libports/src/app/nim/nim.cfg.patch | 17 ---- .../src/app/nim/noCppExceptions.patch | 35 -------- 7 files changed, 207 deletions(-) delete mode 100644 repos/libports/lib/mk/nim-threads.mk delete mode 100644 repos/libports/ports/nim.hash delete mode 100644 repos/libports/ports/nim.port delete mode 100644 repos/libports/run/nim.run delete mode 100644 repos/libports/run/nim_netty.run delete mode 100644 repos/libports/src/app/nim/nim.cfg.patch delete mode 100644 repos/libports/src/app/nim/noCppExceptions.patch diff --git a/repos/libports/lib/mk/nim-threads.mk b/repos/libports/lib/mk/nim-threads.mk deleted file mode 100644 index 64f54e20a2..0000000000 --- a/repos/libports/lib/mk/nim-threads.mk +++ /dev/null @@ -1,2 +0,0 @@ - -CC_CXX_WARN_STRICT = diff --git a/repos/libports/ports/nim.hash b/repos/libports/ports/nim.hash deleted file mode 100644 index d1f811a051..0000000000 --- a/repos/libports/ports/nim.hash +++ /dev/null @@ -1 +0,0 @@ -c66ded577d94199d842f558d532789e4099c0481 diff --git a/repos/libports/ports/nim.port b/repos/libports/ports/nim.port deleted file mode 100644 index 4a376c0d10..0000000000 --- a/repos/libports/ports/nim.port +++ /dev/null @@ -1,10 +0,0 @@ -LICENSE := MIT -VERSION := 0.18.0 -DOWNLOADS := nim.archive - -URL(nim) := https://nim-lang.org/download/nim-$(VERSION).tar.xz -SHA(nim) := 45c74adb35f08dfa9add1112ae17330e5d902ebb4a36e7046caee8b79e6f3bd0 -DIR(nim) := . - -PATCHES := $(wildcard $(REP_DIR)/src/app/nim/*.patch) -PATCH_OPT := -p1 diff --git a/repos/libports/run/nim.run b/repos/libports/run/nim.run deleted file mode 100644 index 746f6d86e6..0000000000 --- a/repos/libports/run/nim.run +++ /dev/null @@ -1,60 +0,0 @@ -set build_components { - core init timer - drivers/rtc - test/nim -} - -build $build_components - -create_boot_directory - -set config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config - -set boot_modules { - core init ld.lib.so - libc.lib.so vfs.lib.so - rtc_drv - test-nim - timer -} - -build_boot_image $boot_modules - -append qemu_args "-nographic" - -run_genode_until {child "test-nim" exited with exit value 0} 30 diff --git a/repos/libports/run/nim_netty.run b/repos/libports/run/nim_netty.run deleted file mode 100644 index 35884c9eb1..0000000000 --- a/repos/libports/run/nim_netty.run +++ /dev/null @@ -1,82 +0,0 @@ -assert_spec linux - -set build_components { - core init timer - drivers/nic server/ram_fs server/vfs - test/nim_echo_server - lib/vfs/lxip -} - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -set config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -append_platform_drv_config - -append config { - -} - -install_config $config - -set boot_modules { - core init timer linux_nic_drv ram_fs vfs - ld.lib.so libc.lib.so vfs.lib.so libm.lib.so - stdcxx.lib.so - vfs_lxip.lib.so lxip.lib.so - test-nim_echo_server -} - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - -run_genode_until forever - -# vi: set ft=tcl : diff --git a/repos/libports/src/app/nim/nim.cfg.patch b/repos/libports/src/app/nim/nim.cfg.patch deleted file mode 100644 index 8c51d13f2f..0000000000 --- a/repos/libports/src/app/nim/nim.cfg.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/config/nim.cfg b/config/nim.cfg -index a2a774b23..a664e3e7b 100644 ---- a/config/nim.cfg -+++ b/config/nim.cfg -@@ -243,3 +243,12 @@ vcc.cpp.options.size = "/O1" - - # Configuration for the Tiny C Compiler: - tcc.options.always = "-w" -+ -+# Configuration for Genode toolchain -+amd64.genode.gcc.path = "/usr/local/genode-gcc/bin" -+amd64.genode.gcc.exe = "genode-x86-gcc" -+amd64.genode.gcc.cpp.exe = "genode-x86-g++" -+ -+arm.genode.gcc.path = "/usr/local/genode-gcc/bin" -+arm.genode.gcc.exe = "genode-arm-gcc" -+arm.genode.gcc.cpp.exe = "genode-arm-g++" diff --git a/repos/libports/src/app/nim/noCppExceptions.patch b/repos/libports/src/app/nim/noCppExceptions.patch deleted file mode 100644 index 05a17286f8..0000000000 --- a/repos/libports/src/app/nim/noCppExceptions.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 90f5e157c7f8edabcc625ee96e9db157da955d47 -Author: Emery Hemingway -Date: Wed May 2 21:29:53 2018 +0200 - - Disable setTerminate when noCppExceptions is defined - -diff --git a/compiler/cgen.nim b/compiler/cgen.nim -index ff3e6714d..d838f9b9c 100644 ---- a/compiler/cgen.nim -+++ b/compiler/cgen.nim -@@ -265,7 +265,7 @@ proc rdCharLoc(a: TLoc): Rope = - - proc genObjectInit(p: BProc, section: TCProcSection, t: PType, a: TLoc, - takeAddr: bool) = -- if p.module.compileToCpp and t.isException: -+ if p.module.compileToCpp and t.isException and not isDefined("noCppExceptions"): - # init vtable in Exception object for polymorphic exceptions - includeHeader(p.module, "") - linefmt(p, section, "new ($1) $2;$n", rdLoc(a), getTypeDesc(p.module, t)) -diff --git a/lib/system.nim b/lib/system.nim -index 5c0970f85..49f2a29bf 100644 ---- a/lib/system.nim -+++ b/lib/system.nim -@@ -4172,8 +4172,9 @@ template doAssertRaises*(exception, code: untyped): typed = - if wrong: - raiseAssert(astToStr(exception) & " wasn't raised by:\n" & astToStr(code)) - --when defined(cpp) and appType != "lib" and not defined(js) and -- not defined(nimscript) and hostOS != "standalone": -+when defined(cpp) and appType != "lib" and -+ not defined(js) and not defined(nimscript) and -+ hostOS != "standalone" and not defined(noCppExceptions): - proc setTerminate(handler: proc() {.noconv.}) - {.importc: "std::set_terminate", header: "".} - setTerminate proc() {.noconv.} =