lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 31 Jul 2015 06:49:09 -0700
From:	tip-bot for Pawel Moll <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	jolsa@...nel.org, a.p.zijlstra@...llo.nl, pawel.moll@....com,
	adrian.hunter@...el.com, linux-kernel@...r.kernel.org,
	namhyung@...nel.org, mingo@...nel.org, tglx@...utronix.de,
	hpa@...or.com, acme@...hat.com
Subject: [tip:perf/core] perf tools:
  Fix test build error when bindir contains double slash

Commit-ID:  0927beeca5f9d1a7978f8da9c9d28647859816d3
Gitweb:     http://git.kernel.org/tip/0927beeca5f9d1a7978f8da9c9d28647859816d3
Author:     Pawel Moll <pawel.moll@....com>
AuthorDate: Tue, 28 Jul 2015 15:10:13 +0100
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 28 Jul 2015 13:03:49 -0300

perf tools: Fix test build error when bindir contains double slash

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.

Signed-off-by: Pawel Moll <pawel.moll@....com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1438092613-21014-1-git-send-email-pawel.moll@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 094ddae..d31fac1 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -638,7 +638,7 @@ ifndef DESTDIR
 prefix ?= $(HOME)
 endif
 bindir_relative = bin
-bindir = $(prefix)/$(bindir_relative)
+bindir = $(abspath $(prefix)/$(bindir_relative))
 mandir = share/man
 infodir = share/info
 perfexecdir = libexec/perf-core
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ