Closed ghost closed 3 years ago
Could you provide more details on the errors? Which errors? What did you do to build the system? (And sorry for the late reply.)
I think this is the issue they're talking about, when building with the latest toolchain nightly-x86_64-unknown-linux-gnu, rustc 1.57.0-nightly (8f8092cc3 2021-09-28)
. You can build with the nightly-2021-02-01-x86_64-unknown-linux-gnu
toolchain which works for me.
See https://github.com/rust-lang/rust/issues/72016#issuecomment-745517721 for more info.
Error log:
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:17:13
|
17 | movabsq $0x8000000000, %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:18:9
|
18 | and $0xfff, %rdi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:19:8
|
19 | or %rax, %rdi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:20:9
|
20 | mov $0x23, %ecx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:21:9
|
21 | mov $0x2b,%edx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:23:9
|
23 | mov %rcx, %ds
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:24:9
|
24 | mov %rcx, %es
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:25:11
|
25 | pushq %rcx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:26:13
|
26 | movabsq $0x8000400000, %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:27:11
|
27 | pushq %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:29:11
|
29 | pushq %rdx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:30:11
|
30 | pushq %rdi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:52:7
|
52 | push %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:53:7
|
53 | push %rcx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:54:7
|
54 | push %rdx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:55:7
|
55 | push %rbx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:56:7
|
56 | sub $8, %rsp // ignore rsp
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:57:7
|
57 | push %rbp
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:58:7
|
58 | push %rsi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:59:7
|
59 | push %rdi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:60:7
|
60 | push %r8
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:61:7
|
61 | push %r9
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:62:7
|
62 | push %r10
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:63:7
|
63 | push %r11
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:64:7
|
64 | push %r12
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:65:7
|
65 | push %r13
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:66:7
|
66 | push %r14
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:67:7
|
67 | push %r15
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:69:12
|
69 | rdfsbaseq %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:70:7
|
70 | push %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:72:12
|
72 | rdgsbaseq %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:73:7
|
73 | push %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:76:6
|
76 | mov %rsp, (%rdi)
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:77:6
|
77 | mov %rsi, %rsp
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:79:6
|
79 | mov %cr0, %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:80:5
|
80 | or $8, %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:81:6
|
81 | mov %rax, %cr0
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:85:6
|
85 | pop %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:86:12
|
86 | wrgsbaseq %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:87:6
|
87 | pop %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:88:12
|
88 | wrfsbaseq %rax
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:89:6
|
89 | pop %r15
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:90:6
|
90 | pop %r14
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:91:6
|
91 | pop %r13
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:92:6
|
92 | pop %r12
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:93:6
|
93 | pop %r11
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:94:6
|
94 | pop %r10
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:95:6
|
95 | pop %r9
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:96:6
|
96 | pop %r8
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:97:6
|
97 | pop %rdi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:98:6
|
98 | pop %rsi
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:99:6
|
99 | pop %rbp
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:100:6
|
100 | add $8, %rsp
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:101:6
|
101 | pop %rbx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:102:6
|
102 | pop %rdx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:103:6
|
103 | pop %rcx
| ^
error: unknown token in expression
|
note: instantiated into assembly here
--> <inline asm>:104:6
|
104 | pop %rax
| ^
warning: `eduos-rs` (lib) generated 2 warnings (1 duplicate)
error: could not compile `eduos-rs` due to 57 previous errors; 2 warnings emitted
The correct fix is to use options(att_syntax)
in the global_asm!
here (and anywhere else the at&t syntax is used for assembly)
That's true, but that would be part of a larger rework. We'll yet have to decide on the future of this project (as there already exists a major rework of it) and on how much effort we'll put into it so for now this hotfix should be sufficient. But PRs are always welcome :slightly_smiling_face:
I can't build the system because LLVM TOOLS returns errors about unsupported assembler prompts. How to fix it?