commit: 80df42f4649c3695c0ab0258a98e3b5bf2db0e80
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri May 13 12:10:17 2016 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri May 13 12:10:17 2016 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=80df42f4
sys-devel/binutils-config/ldwrapper: fix cannonicalising of wrapper
When ld is invoked as CHOST-ld (no path) then we should also remove
CHOST, so don't do this only when we found a / earlier.
sys-devel/binutils-config/files/ldwrapper.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/sys-devel/binutils-config/files/ldwrapper.c
b/sys-devel/binutils-config/files/ldwrapper.c
index a08985f..8777ad6 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -157,12 +157,11 @@ main(int argc, char *argv[])
int k;
/* cannonicanise wrapper, stripping path and CHOST */
- if ((p = strrchr(wrapper, '/')) != NULL) {
+ if ((p = strrchr(wrapper, '/')) != NULL)
wrapper = p + 1;
- p = CHOST "-";
- if (strncmp(wrapper, p, strlen(p)) == 0)
- wrapper += strlen(p);
- }
+ p = CHOST "-";
+ if (strncmp(wrapper, p, strlen(p)) == 0)
+ wrapper += strlen(p);
/* walk over the arguments to see if there's anything interesting
* for us and calculate the final number of arguments */