Commit Graph

11 Commits

Author SHA1 Message Date
Martin Liska 39ac3ee8a4 Backport r253886
2017-11-21  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-10-19  Martin Liska  <mliska@suse.cz>

	PR driver/81829
	* file-find.c (remove_prefix): Remove.
	* file-find.h (remove_prefix): Likewise.
	* gcc-ar.c: Remove smartness of lookup.

From-SVN: r255009
2017-11-21 16:00:55 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Martin Liska f965d3dad7 Prevent LTO wrappers to process a recursive execution
* file-find.c (remove_prefix): New function.
	* file-find.h (remove_prefix): Declare the function.
	* gcc-ar.c (main): Skip a folder of the wrapper if
	a wrapped binary would point to the same file.

From-SVN: r238089
2016-07-07 12:03:39 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Andi Kleen b5617e5f69 Add -B support to gcc-ar/ranlib/nm
To use gcc-{ar,ranlib} for boot strap we need to add a -B option
to the tool. Since ar has weird and unusual argument conventions
implement the code by hand instead of using any libraries.

gcc/:

2014-09-01  Andi Kleen  <ak@linux.intel.com>

	* file-find.c (add_prefix_begin): Add.
	(do_add_prefix): Rename from add_prefix with first argument.
	(add_prefix): Add new wrapper.
	* file-find.h (add_prefix_begin): Add.
	* gcc-ar.c (main): Support -B option.

From-SVN: r214800
2014-09-01 16:41:17 +00:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Matthias Klose a09f1a766b re PR driver/57651 (gcc-ar and gcc-nm don't find the lto plugin)
2013-06-19  Matthias Klose  <doko@ubuntu.com>

        PR driver/57651
        * file-find.h (find_a_file): Add a mode parameter.
        * file-find.c (find_a_file): Likewise.
        * gcc-ar.c (main): Call find_a_file with R_OK for the plugin,
        with X_OK for the executables.
        * collect2.c (main): Call find_a_file with X_OK.

From-SVN: r200219
2013-06-19 21:01:06 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Richard Sandiford 1ab05c31a0 file-find.c, [...]: Add FSF as copyright holder.
gcc/
	* file-find.c, file-find.h, realmpfr.c: Add FSF as copyright holder.

From-SVN: r194952
2013-01-06 21:27:37 +00:00
Meador Inge c2a73de27f collect2.c (main): Call find_file_set_debug.
2012-11-27  Meador Inge  <meadori@codesourcery.com>

	* collect2.c (main): Call find_file_set_debug.
	(find_a_find, add_prefix, prefix_from_env, prefix_from_string):
	Factor out into ...
	* file-find.c (New file): ... here and ...
	* file-find.h (New file): ... here.
	* gcc-ar.c (standard_exec_prefix): New variable.
	(standard_libexec_prefix): Ditto.
	(tooldir_base_prefix) Ditto.
	(self_exec_prefix): Ditto.
	(self_libexec_prefix): Ditto.
	(self_tooldir_prefix): Ditto.
	(target_version): Ditto.
	(path): Ditto.
	(target_path): Ditto.
	(setup_prefixes): New function.
	(main): Rework how wrapped programs are found.
	* Makefile.in (OBJS-libcommon-target): Add file-find.o.
	(AR_OBJS): New variable.
	(gcc-ar$(exeext)): Add dependency on $(AR_OBJS).
	(gcc-nm$(exeext)): Ditto.
	(gcc-ranlib(exeext)): Ditto.
	(COLLECT2_OBJS): Add file-find.o.
	(collect2.o): Add file-find.h prerequisite.
	(file-find.o): New rule.

From-SVN: r193859
2012-11-27 16:55:47 +00:00