From: Joel Rosdahl Date: Mon, 4 Aug 2014 14:23:09 +0000 (+0200) Subject: Merge commit '7c6e3f549ad84e08b2661c0842af8de07b847ab8^' X-Git-Tag: v3.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e79d7d09946ac0d28e978976cd6b399466f87308;p=thirdparty%2Fccache.git Merge commit '7c6e3f549ad84e08b2661c0842af8de07b847ab8^' * commit '7c6e3f549ad84e08b2661c0842af8de07b847ab8^': Fix problem with logging of current working directory Reformat NEWS.txt entries to be easier to work with Conflicts: ccache.c --- e79d7d09946ac0d28e978976cd6b399466f87308 diff --cc ccache.c index e583329d2,8bdc8bdc3..c1ada4991 --- a/ccache.c +++ b/ccache.c @@@ -2477,39 -2045,45 +2481,39 @@@ ccache(int argc, char *argv[] /* Arguments to send to the real compiler. */ struct args *compiler_args; - setup_uncached_err(); - - if (!getenv("CCACHE_READONLY")) { - if (create_cachedirtag(cache_dir) != 0) { - cc_log("failed to create %s/CACHEDIR.TAG (%s)\n", - cache_dir, strerror(errno)); - failed(); - } - } + orig_args = args_init(argc, argv); - sloppiness = parse_sloppiness(getenv("CCACHE_SLOPPINESS")); + initialize(); + find_compiler(argv); - cc_log_argv("Command line: ", argv); - cc_log("Hostname: %s", get_hostname()); - cc_log("Working directory: %s", get_current_working_dir()); +#ifndef _WIN32 + signal(SIGHUP, signal_handler); +#endif + signal(SIGINT, signal_handler); + signal(SIGTERM, signal_handler); - if (base_dir) { - cc_log("Base directory: %s", base_dir); + if (str_eq(conf->temporary_dir, "")) { + clean_up_internal_tempdir(); } - if (getenv("CCACHE_UNIFY")) { - cc_log("Unify mode enabled"); - enable_unify = true; + if (!str_eq(conf->log_file, "")) { + conf_print_items(conf, configuration_logger, NULL); } - if (getenv("CCACHE_NODIRECT") || enable_unify) { - cc_log("Direct mode disabled"); - enable_direct = false; + if (conf->disable) { + cc_log("ccache is disabled"); + failed(); } - if (getenv("CCACHE_COMPRESS")) { - cc_log("Compression enabled"); - enable_compression = true; - } + setup_uncached_err(); + + cc_log_argv("Command line: ", argv); + cc_log("Hostname: %s", get_hostname()); - cc_log("Working directory: %s", current_working_dir); ++ cc_log("Working directory: %s", get_current_working_dir()); - if ((env = getenv("CCACHE_NLEVELS"))) { - nlevels = atoi(env); - if (nlevels < 1) nlevels = 1; - if (nlevels > 8) nlevels = 8; + if (conf->unify) { + cc_log("Direct mode disabled because unify mode is enabled"); + conf->direct_mode = false; } if (!cc_process_args(orig_args, &preprocessor_args, &compiler_args)) {