libcc1: return absolute filename from make search_dir

for  libcc1/ChangeLog

	* findcomp.cc: Include system.h.
	(search_dir): Return absolute filename.

From-SVN: r245050
This commit is contained in:
Jan Kratochvil 2017-01-31 01:01:32 +00:00 committed by Alexandre Oliva
parent 5d1b244323
commit 9f92b93b7b
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}
}