From owner-svn-ports-branches@freebsd.org Fri Feb 3 21:54:19 2017 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E761CCF679; Fri, 3 Feb 2017 21:54:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E3E716CA; Fri, 3 Feb 2017 21:54:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13LsI7H005250; Fri, 3 Feb 2017 21:54:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13LsIQb005248; Fri, 3 Feb 2017 21:54:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201702032154.v13LsIQb005248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 3 Feb 2017 21:54:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r433265 - in branches/2017Q1/devel/ccache: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 21:54:19 -0000 Author: bdrewery Date: Fri Feb 3 21:54:17 2017 New Revision: 433265 URL: https://svnweb.freebsd.org/changeset/ports/433265 Log: MFH: r433264 - Fix building with -Wp,-MT,path. Namely this fixes building the emulators/virtualbox-ose port. PR: 212818 Obtained from: https://github.com/ccache/ccache/commit/026ba6b9fdbeb3ab57d9eb424025a0a0850baae6 Approved by: portmgr (implicit) Added: branches/2017Q1/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT - copied unchanged from r433264, head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT Modified: branches/2017Q1/devel/ccache/Makefile Directory Properties: branches/2017Q1/ (props changed) Modified: branches/2017Q1/devel/ccache/Makefile ============================================================================== --- branches/2017Q1/devel/ccache/Makefile Fri Feb 3 21:53:07 2017 (r433264) +++ branches/2017Q1/devel/ccache/Makefile Fri Feb 3 21:54:17 2017 (r433265) @@ -3,7 +3,7 @@ PORTNAME= ccache PORTVERSION= 3.2.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://www.samba.org/ftp/ccache/ \ LOCAL/bdrewery Copied: branches/2017Q1/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT (from r433264, head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2017Q1/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT Fri Feb 3 21:54:17 2017 (r433265, copy of r433264, head/devel/ccache/files/patch-CCACHE_CPP2_Wp_MT) @@ -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