diff options
-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 } } |