aboutsummaryrefslogtreecommitdiff
path: root/src/boot/translator.boot
diff options
context:
space:
mode:
authorGabriel Dos Reis <GabrielDosReis@users.noreply.github.com>2022-08-20 23:10:21 -0700
committerGitHub <noreply@github.com>2022-08-20 23:10:21 -0700
commit3dc479ae544db8bc9224f183f33cb3e16fe2daac (patch)
tree3133a5b3f3b33096860c585dc2b557107c22a982 /src/boot/translator.boot
parentf9a884706ac7e0f92db5e6cb16811d543a98ac28 (diff)
downloadopen-axiom-3dc479ae544db8bc9224f183f33cb3e16fe2daac.tar.gz
fix sbcl 1.5.9 build (#16)
* Fix build with SBCL-1.5.9 * Fix dynamic loading of open-axiom-core.so
Diffstat (limited to 'src/boot/translator.boot')
-rw-r--r--src/boot/translator.boot21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 03c493a1..55bf9321 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -39,8 +39,9 @@ import pile
import parser
import ast
namespace BOOTTRAN
-module translator (evalBootFile, loadNativeModule, loadSystemRuntimeCore,
- compileBootHandler, string2BootTree, genImportDeclaration, retainFile?)
+module translator (evalBootFile, directoryFromCommandLine,
+ loadNativeModule, loadSystemRuntimeCore,
+ compileBootHandler, string2BootTree, genImportDeclaration, retainFile?)
++ If non nil, holds the name of the current module being translated.
$currentModuleName := nil
@@ -607,9 +608,18 @@ associateRequestWithFileType(Option '"compile", '"boot",
--% Runtime support
+++ Returns the directory name as specified through option name `opt'.
+directoryFromCommandLine opt ==
+ dir := ASSOC(Option opt, %systemOptions()) =>
+ ensureTrailingSlash rest dir
+ nil
+
++ Load native dynamically linked module
-loadNativeModule m ==
+loadNativeModule(m,:dir) ==
m := strconc($NativeModulePrefix,m,$NativeModuleExt)
+ if dir ~= nil then
+ [dir] := dir
+ m := strconc(dir,m)
%hasFeature KEYWORD::SBCL =>
apply(bfColonColon("SB-ALIEN","LOAD-SHARED-OBJECT"),
[m,KEYWORD::DONT_-SAVE,true])
@@ -623,4 +633,7 @@ loadNativeModule m ==
loadSystemRuntimeCore() ==
%hasFeature KEYWORD::ECL or %hasFeature KEYWORD::GCL => nil
- loadNativeModule '"open-axiom-core"
+ dir :=
+ path := directoryFromCommandLine '"syslib" => path
+ strconc(systemRootDirectory(),'"lib/")
+ loadNativeModule('"open-axiom-core",dir)