about summary refs log tree commit diff
path: root/gcc_plugin
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-03-21 18:51:43 +0100
committerhexcoder- <heiko@hexco.de>2020-03-21 18:51:43 +0100
commit6cbd0f1faf576a3ba9021720b0ca63a3cdd260ab (patch)
treefbfadeeea0fcaa55d5b0b43cfbe41cfce5fb74a1 /gcc_plugin
parentdcd9cd638b186909d86ec3c3c27fdb0ceadd0a04 (diff)
downloadafl++-6cbd0f1faf576a3ba9021720b0ca63a3cdd260ab.tar.gz
avoid calling awk for 'which' replacement, use POSIX 'command -v' instead
Diffstat (limited to 'gcc_plugin')
-rw-r--r--gcc_plugin/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc_plugin/Makefile b/gcc_plugin/Makefile
index f1e86d38..506d690d 100644
--- a/gcc_plugin/Makefile
+++ b/gcc_plugin/Makefile
@@ -44,7 +44,7 @@ PLUGIN_FLAGS = -fPIC -fno-rtti -I"$(shell $(CC) -print-file-name=plugin)/include
 HASH=\#
 
 GCCVER    = $(shell $(CC) --version 2>/dev/null | awk 'NR == 1 {print $$NF}')
-GCCBINDIR = $(shell dirname `type $(CC) | awk '{print $$NF}'` 2>/dev/null )
+GCCBINDIR = $(shell dirname `command -v $(CC)` 2>/dev/null )
 
 ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1"
 	SHMAT_OK=1