Index: head/devel/ccache/Makefile =================================================================== --- head/devel/ccache/Makefile (revision 433263) +++ head/devel/ccache/Makefile (revision 433264) @@ -1,98 +1,98 @@ # Created by: Dominic Marks # $FreeBSD$ PORTNAME= ccache PORTVERSION= 3.2.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://www.samba.org/ftp/ccache/ \ LOCAL/bdrewery MAINTAINER= bdrewery@FreeBSD.org COMMENT= Tool to minimize the compile time of C/C++ programs LICENSE= GPLv3 GNU_CONFIGURE= yes HOWTO= ccache-howto-freebsd.txt CCLINKDIR= libexec/ccache SUB_FILES= ${HOWTO} world-ccache pkg-message ccache-update-links.sh PORTDOCS= ccache-howto-freebsd.txt MANUAL.html OPTIONS_DEFINE= CLANGLINK LLVMLINK STATIC DOCS TINDERBOX OPTIONS_DEFAULT=CLANGLINK LLVMLINK CLANGLINK_DESC= Create clang compiler links if clang is installed LLVMLINK_DESC= Create llvm compiler links if llvm is installed TINDERBOX_DESC= Create tarball for tinderbox usage USES= compiler # Don't allow autoreconf. We want no dependencies on this to keep # WITH_CCACHE_BUILD working. USES:= ${USES:Nautoreconf} OPTIONS_SUB= yes STATIC_LDFLAGS= -static .include . if ${COMPILER_TYPE} == clang CPPFLAGS+= -DCC_IS_CLANG . elif ${COMPILER_TYPE} == gcc CPPFLAGS+= -DCC_IS_GCC . endif PLIST_SUB+= CCLINKDIR="${CCLINKDIR}" .if ${ARCH}=="i386" CCACHE_COMPILERS+= icc icpc .endif GNU_COMPILERS+= 34 42 43 44 45 46 47 48 49 5 6 7 CCACHE_COMPILERS+= cc c++ CC gcc g++ ${GNU_COMPILERS:S|^|gcc|} ${GNU_COMPILERS:S|^|g++|} .if ${PORT_OPTIONS:MCLANGLINK} CLANG_COMPILERS+= 33 34 35 36 37 38 39 -devel CCACHE_COMPILERS+= clang clang++ ${CLANG_COMPILERS:S|^|clang|} ${CLANG_COMPILERS:S|^|clang++|} .endif .if ${PORT_OPTIONS:MLLVMLINK} CCACHE_COMPILERS+= llvm-gcc llvm-c++ llvm-g++ .endif CCACHE_COMPILERS+= ${EXTRA_COMPILERS} SUB_LIST+= CCACHE_COMPILERS="${CCACHE_COMPILERS}" \ CCLINKDIR="${CCLINKDIR}" \ ICCPREFIX="${LOCALBASE}/intel_cc_80/bin" \ HOWTO="${HOWTO}" post-build-TINDERBOX-on: @${MKDIR} ${WRKDIR}/tb/opt @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKDIR}/tb/opt .for l in ${CCACHE_COMPILERS} @${LN} -sf ${PORTNAME} ${WRKDIR}/tb/opt/${l} .endfor @${TAR} -C ${WRKDIR}/tb -cpf ${WRKSRC}/${PORTNAME}.tar opt do-install: ${INSTALL_PROGRAM} ${WRKSRC}/ccache ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/ccache.1 ${STAGEDIR}${PREFIX}/man/man1 ${MKDIR} ${STAGEDIR}${PREFIX}/${CCLINKDIR}/world ${INSTALL_SCRIPT} ${WRKDIR}/world-ccache \ ${STAGEDIR}${PREFIX}/${CCLINKDIR}/world/ccache ${INSTALL_SCRIPT} ${WRKDIR}/ccache-update-links.sh \ ${STAGEDIR}${PREFIX}/bin/ccache-update-links do-install-TINDERBOX-on: ${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.tar ${STAGEDIR}${DATADIR} do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/MANUAL.html ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/${HOWTO} ${STAGEDIR}${DOCSDIR} .include Index: head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT =================================================================== --- head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT (nonexistent) +++ head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT (revision 433264) @@ -0,0 +1,75 @@ +From 026ba6b9fdbeb3ab57d9eb424025a0a0850baae6 Mon Sep 17 00:00:00 2001 +From: Joel Rosdahl +Date: Wed, 7 Sep 2016 20:46:18 +0200 +Subject: [PATCH] Only pass -Wp,-MT and similar to the preprocessor + +This fixes an issue when compiler option -Wp,-MT,path is used instead of +-MT path (and similar for -MF, -MP and -MQ) and run_second_cpp +(CCACHE_CPP2) is enabled. + +Fixes #129. +--- + NEWS.txt | 4 ++++ + ccache.c | 9 +++++++++ + test/test_argument_processing.c | 9 +++++---- + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/ccache.c b/ccache.c +index 591c7d7..5635cc1 100644 +--- ccache.c ++++ ccache.c +@@ -2249,6 +2249,11 @@ cc_process_args(struct args *args, struct args **preprocessor_args, + output_dep = make_relative_path(x_strdup(argv[i] + 9)); + args_add(dep_args, argv[i]); + continue; ++ } else if (str_startswith(argv[i], "-Wp,-M")) { ++ /* -MF, -MP, -MQ, -MT, etc. TODO: Make argument to MF/MQ/MT ++ * relative. */ ++ args_add(dep_args, argv[i]); ++ continue; + } else if (conf->direct_mode) { + /* + * -Wp, can be used to pass too hard options to +@@ -2258,6 +2263,10 @@ cc_process_args(struct args *args, struct args **preprocessor_args, + cc_log("Unsupported compiler option for direct mode: %s", argv[i]); + conf->direct_mode = false; + } ++ ++ /* Any other -Wp,* arguments are only relevant for the preprocessor. */ ++ args_add(cpp_args, argv[i]); ++ continue; + } + if (str_eq(argv[i], "-MP")) { + args_add(dep_args, argv[i]); +diff --git a/test/test_argument_processing.c b/test/test_argument_processing.c +index 0ecefd1..a1b6ecb 100644 +--- test/test_argument_processing.c ++++ test/test_argument_processing.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (C) 2010-2015 Joel Rosdahl ++ * Copyright (C) 2010-2016 Joel Rosdahl + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free +@@ -57,7 +57,7 @@ TEST(dependency_flags_should_only_be_sent_to_the_preprocessor) + { + #define CMD \ + "cc -MD -MMD -MP -MF foo.d -MT mt1 -MT mt2 -MQ mq1 -MQ mq2" \ +- " -Wp,-MD,wpmd -Wp,-MMD,wpmmd" ++ " -Wp,-MD,wpmd -Wp,-MMD,wpmmd -Wp,-MP -Wp,-MT,wpmt -Wp,-MQ,wpmq -Wp,-MF,wpf" + struct args *orig = args_init_from_string(CMD " -c foo.c -o foo.o"); + struct args *exp_cpp = args_init_from_string(CMD); + #undef CMD +@@ -79,8 +79,9 @@ TEST(preprocessor_only_flags_should_only_be_sent_to_the_preprocessor) + " -include test.h -include-pch test.pch -iprefix . -iquote ." \ + " -isysroot . -isystem . -iwithprefix . -iwithprefixbefore ." \ + " -DTEST_MACRO -DTEST_MACRO2=1 -F. -trigraphs -fworking-directory" \ +- " -fno-working-directory -MD -MMD -MP -MF foo.d -MT mt1 -MT mt2 " \ +- " -MQ mq1 -MQ mq2 -Wp,-MD,wpmd -Wp,-MMD,wpmmd" ++ " -fno-working-directory -MD -MMD -MP -MF foo.d -MT mt1 -MT mt2" \ ++ " -MQ mq1 -MQ mq2 -Wp,-MD,wpmd -Wp,-MMD,wpmmd -Wp,-MP -Wp,-MT,wpmt" \ ++ " -Wp,-MQ,wpmq -Wp,-MF,wpf" + struct args *orig = args_init_from_string(CMD " -c foo.c -o foo.o"); + struct args *exp_cpp = args_init_from_string(CMD); + #undef CMD Property changes on: head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property