ref: 384f8efd91ca6d18314a71166099c34c5633f764
parent: 9a2a6b23de790bdb10797a424d3720c9505aabc1
author: Quentin Rameau <quinq@fifth.space>
date: Fri Jun 3 11:40:41 EDT 2016
[cc1] adjust basename in tool name invocation check
--- a/cc1/main.c
+++ b/cc1/main.c
@@ -68,7 +68,9 @@
usage();
/* if run as cpp, only run the preprocessor */
- if (!(base = strrchr(argv0, '/')))
+ if ((base = strrchr(argv0, '/')))
+ ++base;
+ else
base = argv0;
if (!strcmp(base, "cpp"))
onlycpp = 1;