diff options
author | Camil Staps | 2017-10-20 16:19:53 +0200 |
---|---|---|
committer | Camil Staps | 2017-10-20 16:19:53 +0200 |
commit | 75573593c6fe5dd7d4f9bd8d58389db4c6d3e98d (patch) | |
tree | 7ebd9a74f9d1815ae0152ad2596d4d1c63caf074 | |
parent | Resolve #2: remove .icl when accidentally added (diff) |
Added support for -no-opt-link and -l -lpthread (for threaded RTS)
-rwxr-xr-x | iclm | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -1,5 +1,5 @@ #!/usr/bin/expect -# vim: syntax=expect: +# vim: syntax=expect ai: ### Settings @@ -48,6 +48,13 @@ proc tryImport { name } { } } +proc tryWithOption { option } { + global args + set args "$args $option" + feedback "info" "Using $option." + tryCompile +} + proc tryCompile { } { global args argv storeargs argfile @@ -74,14 +81,16 @@ proc tryCompile { } { tryImport $expect_out(1,string) return } -re "dynamic used but support for dynamics not enabled|TC class undefined" { - set args "$args -dynamics" - feedback "info" "Using -dynamics." - tryCompile + tryWithOption "-dynamics" return } "Nonrepresentable section on output" { - set args "$args -l -no-pie" - feedback "info" "Using -l -no-pie." - tryCompile + tryWithOption "-l -no-pie" + return + } "Run time error, rule '<case>\\\[line:182\\\];29;64' in module 'elf_relocations' does not match" { + tryWithOption "-no-opt-link" + return + } "undefined reference to `pthread_key_create'" { + tryWithOption "-l -lpthread" return } } |