Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-ide
Commits
764daec6
Commit
764daec6
authored
Apr 15, 2016
by
Jurrien Stutterheim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't call the system as (committing for testing purposes)
parent
437bb1e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
MacOSX/PmCleanSystem.icl
MacOSX/PmCleanSystem.icl
+27
-27
No files found.
MacOSX/PmCleanSystem.icl
View file @
764daec6
...
...
@@ -297,33 +297,33 @@ CodeGen cgen used_compiler_process_ids wf genAsmOrCode abc_path obj_path timepro
(
wf
[
"Error: Code generator failed for '"
+++
abc_path
+++
"' with exit code: "
+++
toString
exit_code
,(
quoted_string
path_without_suffix
)]
ps
)
ps
)
|
exit_code
<>
0
=
(
obj_path
,
exit_code
==
0
,
compiler_process_ids
,
ps
)
#
assembly_path_name
=
path_without_suffix
+++
".s"
#
assembler_path_name
=
"/usr/bin/as"
#
(
argv
,
args_memory
)
=
make_argv
[
assembler_path_name
,
"-o"
,
obj_path
,
assembly_path_name
]
#
assembler_pid
=
fork
|
assembler_pid
<
0
=
abort
"fork failed"
|
assembler_pid
==
0
|
execv
(
assembler_path_name
+++
"
\0
"
)
argv
<
0
=
abort
"execv failed for assembler in function CodeGen"
=
abort
"execution continued after execv"
|
free
args_memory
<
0
=
abort
"free failed"
#
(
w_pid
,
status
)
=
wait_pid
assembler_pid
0
|
w_pid
<>
-1
&&
w_pid
<>
assembler_pid
=
abort
"waitpid failed"
#
result
=
(
status
bitand
0xff00
)
>>
8
#
wtermsig
=
status
bitand
0x7f
|
wtermsig
<>
0
=
abort
"assembler exited abnormally"
|
unlink
(
assembly_path_name
+++
"
\0
"
)<>
0
=
abort
"deleting the assembler file failed"
//
| exit_code<>0
//
= (obj_path,exit_code==0,compiler_process_ids,ps)
//
# assembly_path_name = path_without_suffix+++".s"
//
# assembler_path_name = "/usr/bin/as"
//
# (argv,args_memory) = make_argv [assembler_path_name,"-o",obj_path,assembly_path_name]
//
# assembler_pid = fork
//
| assembler_pid<0
//
= abort "fork failed"
//
| assembler_pid==0
//
| execv (assembler_path_name+++"\0") argv<0
//
= abort "execv failed for assembler in function CodeGen"
//
= abort "execution continued after execv"
//
| free args_memory<0
//
= abort "free failed"
//
# (w_pid,status) = wait_pid assembler_pid 0
//
| w_pid <> -1 && w_pid<>assembler_pid
//
= abort "waitpid failed"
//
# result = (status bitand 0xff00) >> 8
//
# wtermsig = status bitand 0x7f
//
| wtermsig<>0
//
= abort "assembler exited abnormally"
//
| unlink (assembly_path_name+++"\0")<>0
//
= abort "deleting the assembler file failed"
=
(
obj_path
,
exit_code
==
0
,
compiler_process_ids
,
ps
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment