]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Merge branch 'maint'
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Jan 2012 12:28:27 +0000 (13:28 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 8 Jan 2012 12:28:27 +0000 (13:28 +0100)
* maint:
  Update NEWS
  Also recognize -specs=file in addition to --specs=file
  Revert GCC bug compatibility for -MTarg and -MQarg
  Fix minor memory leaks
  Correct log message when unify mode is enabled
  Hash environment variables that affect the preprocessor output
  Hash mtime or content of GCC plugins specified with -fplugin=
  Use hash_compiler for explicit --specs= options as well
  Refactor code into a hash_compiler function
  Improve description on how to fix bad object files in the cache
  Make failure to create files in cache fatal
  Make failure to create cache directories fatal
  Remove unused print_executed_command function
  Handle non-writable CCACHE_DIR gracefully

Conflicts:
ccache.c
test.sh
test/test_argument_processing.c

1  2 
ccache.c
manifest.c
test/test_argument_processing.c
util.c

diff --cc ccache.c
Simple merge
diff --cc manifest.c
Simple merge
index 18dcaea452b2938ee48340a0454409ec84133ae1,94e46f4ffd7c72bd84d0a31deaf4185d469f8530..dcdbb1238c59249658115fb55da7c5b84365f719
@@@ -201,8 -202,9 +201,8 @@@ TEST(MQ_flag_with_immediate_argument_sh
        struct args *orig = args_init_from_string(
                "gcc -c -MD -MP -MFfoo.d -MQfoo.d foo.c");
        struct args *exp_cpp = args_init_from_string(
-               "gcc -MD -MP -MFfoo.d -MQfoo.d -MQ foo.o");
 -              "gcc -c -MD -MP -MFfoo.d -MQfoo.d");
 -      struct args *exp_cc = args_init_from_string(
 -              "gcc -c");
++              "gcc -MD -MP -MFfoo.d -MQfoo.d");
 +      struct args *exp_cc = args_init_from_string("gcc -c");
        struct args *act_cpp = NULL, *act_cc = NULL;
        create_file("foo.c", "");
  
@@@ -218,35 -220,11 +218,35 @@@ TEST(MT_flag_with_immediate_argument_sh
        struct args *orig = args_init_from_string(
                "gcc -c -MD -MP -MFfoo.d -MTfoo.d foo.c");
        struct args *exp_cpp = args_init_from_string(
-               "gcc -MD -MP -MFfoo.d -MTfoo.d -MQ foo.o");
 -              "gcc -c -MD -MP -MFfoo.d -MTfoo.d");
 -      struct args *exp_cc = args_init_from_string(
 -              "gcc -c");
++              "gcc -MD -MP -MFfoo.d -MTfoo.d");
 +      struct args *exp_cc = args_init_from_string("gcc -c");
 +      struct args *act_cpp = NULL, *act_cc = NULL;
 +      create_file("foo.c", "");
 +
 +      CHECK(cc_process_args(orig, &act_cpp, &act_cc));
 +      CHECK_ARGS_EQ_FREE12(exp_cpp, act_cpp);
 +      CHECK_ARGS_EQ_FREE12(exp_cc, act_cc);
 +
 +      args_free(orig);
 +}
 +
 +TEST(fprofile_flag_with_existing_dir_should_be_rewritten_to_real_path)
 +{
 +      struct args *orig = args_init_from_string(
 +              "gcc -c -fprofile-generate=some/dir foo.c");
 +      struct args *exp_cpp = args_init_from_string("gcc");
 +      struct args *exp_cc = args_init_from_string("gcc");
        struct args *act_cpp = NULL, *act_cc = NULL;
 +      char *s;
 +
        create_file("foo.c", "");
 +      mkdir("some", 0777);
 +      mkdir("some/dir", 0777);
 +      s = format("-fprofile-generate=%s", x_realpath("some/dir"));
 +      args_add(exp_cpp, s);
 +      args_add(exp_cc, s);
 +      args_add(exp_cc, "-c");
 +      free(s);
  
        CHECK(cc_process_args(orig, &act_cpp, &act_cc));
        CHECK_ARGS_EQ_FREE12(exp_cpp, act_cpp);
diff --cc util.c
Simple merge