aboutsummaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2017-01-31 01:01:32 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2017-01-31 01:01:32 +0000
commit9f92b93b7b94f128c6b600bc360ec643bcfa9067 (patch)
tree2146d46489d4367ebaf24cfb5882484cc073ac48 /libcc1
parent5d1b2443237a407785f84be09909f93abdcfec48 (diff)
downloadgcc-9f92b93b7b94f128c6b600bc360ec643bcfa9067.zip
gcc-9f92b93b7b94f128c6b600bc360ec643bcfa9067.tar.gz
gcc-9f92b93b7b94f128c6b600bc360ec643bcfa9067.tar.bz2
libcc1: return absolute filename from make search_dir
for libcc1/ChangeLog * findcomp.cc: Include system.h. (search_dir): Return absolute filename. From-SVN: r245050
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/ChangeLog3
-rw-r--r--libcc1/findcomp.cc3
2 files changed, 5 insertions, 1 deletions
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index ef1577b..9a94314 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -1,5 +1,8 @@
2017-01-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * findcomp.cc: Include system.h.
+ (search_dir): Return absolute filename.
+
* libcc1.cc (libcc1): Add class compiler with field compilerp,
class compiler_triplet_regexp and class
compiler_driver_filename.
diff --git a/libcc1/findcomp.cc b/libcc1/findcomp.cc
index bf9a14a..1fdec12 100644
--- a/libcc1/findcomp.cc
+++ b/libcc1/findcomp.cc
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "libiberty.h"
#include "xregex.h"
#include "findcomp.hh"
+#include "system.h"
class scanner
{
@@ -68,7 +69,7 @@ search_dir (const regex_t &regexp, const std::string &dir, std::string *result)
{
if (regexec (&regexp, filename, 0, NULL, 0) == 0)
{
- *result = filename;
+ *result = dir + DIR_SEPARATOR + filename;
return true;
}
}