diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java
index 67f9202fb54..74b319a0d4a 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GLDErrorParserTests.java
@@ -112,4 +112,29 @@ public class GLDErrorParserTests extends GenericErrorParserTests {
new String[] {GLD_ERROR_PARSER_ID}
);
}
+
+ public void testLinkerMessages_PrecedingPath_bug314253() throws IOException {
+ runParserTest(
+ new String[] {
+ "ld: warning: libstdc++.so.5, needed by testlib_1.so, may conflict with libstdc++.so.6",
+ "/usr/bin/ld: warning: libstdc++.so.5, needed by testlib_2.so, may conflict with libstdc++.so.6",
+ "C:\\bin\\ld.exe: warning: libstdc++.so.5, needed by testlib_3.so, may conflict with libstdc++.so.6",
+ "c:/bin/ld.exe: warning: libstdc++.so.5, needed by testlib_4.so, may conflict with libstdc++.so.6",
+ "D:\\mingw\\bin\\..\\lib\\gcc-lib\\mingw32\\3.2.3\\..\\..\\..\\..\\mingw32\\bin\\ld.exe: cannot find -ljpeg",
+ "notld: warning: ld error parser has no business parsing this message",
+ },
+ 1, // errors
+ 4, // warnings
+ 0, // Infos
+ null,
+ new String[] {
+ "libstdc++.so.5, needed by testlib_1.so, may conflict with libstdc++.so.6",
+ "libstdc++.so.5, needed by testlib_2.so, may conflict with libstdc++.so.6",
+ "libstdc++.so.5, needed by testlib_3.so, may conflict with libstdc++.so.6",
+ "libstdc++.so.5, needed by testlib_4.so, may conflict with libstdc++.so.6",
+ "cannot find -ljpeg",
+ },
+ new String[] {GLD_ERROR_PARSER_ID}
+ );
+ }
}
diff --git a/core/org.eclipse.cdt.core/plugin.properties b/core/org.eclipse.cdt.core/plugin.properties
index a535b1b6f1c..ef51894ae0b 100644
--- a/core/org.eclipse.cdt.core/plugin.properties
+++ b/core/org.eclipse.cdt.core/plugin.properties
@@ -64,8 +64,8 @@ CDTGNULinkerErrorParser.regex.InFunction=(.*?):?(\\(\\.\\w+\\+.*\\))?:\\s*(In fu
CDTGNULinkerErrorParser.regex.WarningDangerousFunction=(.*?):(\\d+):(\\d+:)? ([Ww]arning:)?\\s*(the use of [`'"](.*)['"] is dangerous, better use [`'"](.*)['"].*)
CDTGNULinkerErrorParser.regex.TextWarning=(.*?):?\\(\\.\\w+\\+.*\\): [Ww]arning:? (.*)
CDTGNULinkerErrorParser.regex.TextError=(.*?):?\\(\\.\\w+\\+.*\\): (.*)
-CDTGNULinkerErrorParser.regex.ldWarning=ld(\\.exe)?: [Ww]arning:? (.*)
-CDTGNULinkerErrorParser.regex.ldError=ld(\\.exe)?: (.*)
+CDTGNULinkerErrorParser.regex.ldWarning=(.*[/\\\\])?ld(\\.exe)?: [Ww]arning:? (.*)
+CDTGNULinkerErrorParser.regex.ldError=(.*[/\\\\])?ld(\\.exe)?: (.*)
CDTGNUAssemblerErrorParser.name=CDT GNU Assembler Error Parser
CDTWorkingDirLocator.name=CDT pushd/popd CWD Locator
diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml
index 74f31c55e13..a232c363328 100644
--- a/core/org.eclipse.cdt.core/plugin.xml
+++ b/core/org.eclipse.cdt.core/plugin.xml
@@ -220,14 +220,14 @@
regex="%CDTGNULinkerErrorParser.regex.TextError"
severity="Error"/>