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
| ||
|
Date: Wed, 27 Apr 2016 13:52:49 +0000 From: David Laight <David.Laight@...LAB.COM> To: 'Jesper Dangaard Brouer' <brouer@...hat.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org> CC: "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>, "bblanco@...mgrid.com" <bblanco@...mgrid.com>, "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>, "borkmann@...earbox.net" <borkmann@...earbox.net>, "alexei.starovoitov@...il.com" <alexei.starovoitov@...il.com> Subject: RE: [net-next PATCH V2 2/5] samples/bpf: Makefile verify LLVM compiler avail and bpf target is supported From: Jesper Dangaard Brouer > Sent: 26 April 2016 17:27 > Make compiling samples/bpf more user friendly, by detecting if LLVM > compiler tool 'llc' is available, and also detect if the 'bpf' target > is available in this version of LLVM. ... > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index 5bae9536f100..45859c99f573 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -85,6 +85,24 @@ HOSTLOADLIBES_test_overhead += -lelf -lrt > # make samples/bpf/ LLC=~/git/llvm/build/bin/llc > LLC ?= llc > > +# Verify LLVM compiler is available and bpf target is supported > +.PHONY: verify_cmd_llc verify_target_bpf > + > +verify_cmd_llc: > + @if ! (which "${LLC}" > /dev/null 2>&1); then \ You should use 'type' not 'which'. 'type' is a posix shell builtin, 'which' is a script/program that tries to emulate a 'csh' builtin. You want to know whether the shell that make runs can execute ${LLC} not whether a csh would be able to run it. You might also want to worry about: LLC="/path_to_llc/llc -extra_arg" make fubar David
Powered by blists - more mailing lists