Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755881AbbG1OqH (ORCPT ); Tue, 28 Jul 2015 10:46:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44043 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752867AbbG1OqE (ORCPT ); Tue, 28 Jul 2015 10:46:04 -0400 Date: Tue, 28 Jul 2015 16:46:00 +0200 From: Jiri Olsa To: Pawel Moll Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Adrian Hunter , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] tools: perf: Fix test build error when bindir contains double slash Message-ID: <20150728144600.GH28175@krava.brq.redhat.com> References: <1438092613-21014-1-git-send-email-pawel.moll@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1438092613-21014-1-git-send-email-pawel.moll@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1258 Lines: 39 On Tue, Jul 28, 2015 at 03:10:13PM +0100, Pawel Moll wrote: > When building with a prefix ending with a slash, for example: > > $ make prefix=/usr/local/ > > one of the perf tests fail to compile due to BUILD_STR macro mishandling > bindir_SQ string containing with two slashes: > > -DBINDIR="BUILD_STR(/usr/local//bin)" > > with the following error: > > CC tests/attr.o > tests/attr.c: In function ‘test__attr’: > tests/attr.c:168:50: error: expected ‘)’ before ‘;’ token > snprintf(path_perf, PATH_MAX, "%s/perf", BINDIR); > ^ > tests/attr.c:176:1: error: expected ‘;’ before ‘}’ token > } > ^ > tests/attr.c:176:1: error: control reaches end of non-void function [-Werror=return-type] > } > ^ > cc1: all warnings being treated as errors > > This patch works around the problem by "cleaning" the bindir string > using make's abspath function. nice ;-) Acked-by: Jiri Olsa thanks, jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/