diff options
author | Stephane Eranian <eranian@google.com> | 2015-11-30 10:02:21 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-05 09:46:45 -0300 |
commit | 8ee4646038e47d065d35703e3e343136c4cd42aa (patch) | |
tree | 37dbbebedf237db8ecb8921722bbfa459fef2197 /tools/build/feature/test-libcrypto.c | |
parent | e9c4bcdd349eb00f6c704450a063b3dcbea25864 (diff) | |
download | op-kernel-dev-8ee4646038e47d065d35703e3e343136c4cd42aa.zip op-kernel-dev-8ee4646038e47d065d35703e3e343136c4cd42aa.tar.gz |
perf build: Add libcrypto feature detection
Will be used to generate build-ids in the jitdump code.
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Carl Love <cel@us.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John McCutchan <johnmccutchan@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sonny Rao <sonnyrao@chromium.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1448874143-7269-3-git-send-email-eranian@google.com
[ tools/perf/Makefile.perf comment about NO_LIBCRYPTO and added it to tests/make ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build/feature/test-libcrypto.c')
-rw-r--r-- | tools/build/feature/test-libcrypto.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c new file mode 100644 index 0000000..bd79dc7 --- /dev/null +++ b/tools/build/feature/test-libcrypto.c @@ -0,0 +1,17 @@ +#include <openssl/sha.h> +#include <openssl/md5.h> + +int main(void) +{ + MD5_CTX context; + unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH]; + unsigned char dat[] = "12345"; + + MD5_Init(&context); + MD5_Update(&context, &dat[0], sizeof(dat)); + MD5_Final(&md[0], &context); + + SHA1(&dat[0], sizeof(dat), &md[0]); + + return 0; +} |