diff options
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -26,6 +26,7 @@ #include <sstream> #include <cerrno> #include <cstdlib> +#include <limits.h> extern "C" { #include <glob.h> @@ -513,7 +514,6 @@ main (int argc, char * const argv []) } } - cerr << "Warning: using '-m' disables cache support." << endl; s.use_cache = false; break; @@ -677,6 +677,16 @@ main (int argc, char * const argv []) usage(s, 1); } + // translate path of runtime to absolute path + if (s.runtime_path[0] != '/') + { + char cwd[PATH_MAX]; + if (getcwd(cwd, sizeof(cwd))) + { + s.runtime_path = string(cwd) + "/" + s.runtime_path; + } + } + int rc = 0; // override PATH and LC_ALL @@ -976,7 +986,10 @@ main (int argc, char * const argv []) rc = compile_pass (s); if (rc == 0 && s.last_pass == 4) - cout << s.hash_path << endl; + { + cout << ((s.hash_path == "") ? (s.module_name + string(".ko")) : s.hash_path); + cout << endl; + } times (& tms_after); gettimeofday (&tv_after, NULL); |