commit:     edc0d44f70c27daebcc080ac5d08e8e191bccd95
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 31 09:49:10 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jan 31 09:50:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=edc0d44f

sys-devel/binutils-config: fix inversed logic

Obviously we should skip turning -L into -R if the path points inside
PORTAGE_BUILDDIR, not the other way around.

Thanks to this, bugs like #642040 surfaced.

Bug: https://bugs.gentoo.org/642040

 sys-devel/binutils-config/files/ldwrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/binutils-config/files/ldwrapper.c 
b/sys-devel/binutils-config/files/ldwrapper.c
index 1ed11ce42d..3ff52acc60 100644
--- a/sys-devel/binutils-config/files/ldwrapper.c
+++ b/sys-devel/binutils-config/files/ldwrapper.c
@@ -428,7 +428,7 @@ main(int argc, char *argv[])
                                continue;
 
                        /* does it refer to the build directory? skip */
-                       if (builddir != NULL && strncmp(builddir, path, len) != 
0)
+                       if (builddir != NULL && strncmp(builddir, path, len) == 
0)
                                continue;
 
                        if (is_darwin) {

Reply via email to