Commit 68d23306 by Jakub Jelinek Committed by Jakub Jelinek

re PR plugins/53126 (gcc-4.7.0 error "gcc-ar: Cannot find plugin")

	PR plugins/53126
	* gcc-ar.c (main): If GCC_EXEC_PREFIX is set in env,
	append program name to it and pass that as first argument
	to make_relative_prefix.  Always pass standard_libexec_prefix
	as last argument to make_relative_prefix.  If
	make_relative_prefix returns NULL, fall back to
	standard_libexec_prefix.

From-SVN: r187090
parent f95052cc
2012-05-03 Jakub Jelinek <jakub@redhat.com> 2012-05-03 Jakub Jelinek <jakub@redhat.com>
PR plugins/53126
* gcc-ar.c (main): If GCC_EXEC_PREFIX is set in env,
append program name to it and pass that as first argument
to make_relative_prefix. Always pass standard_libexec_prefix
as last argument to make_relative_prefix. If
make_relative_prefix returns NULL, fall back to
standard_libexec_prefix.
PR debug/53174 PR debug/53174
* tree-predcom.c (remove_stmt): Call reset_debug_uses on stmts being * tree-predcom.c (remove_stmt): Call reset_debug_uses on stmts being
removed. removed.
......
/* Wrapper for ar/ranlib/nm to pass the LTO plugin. /* Wrapper for ar/ranlib/nm to pass the LTO plugin.
Copyright (C) 2011 Free Software Foundation, Inc. Copyright (C) 2011, 2012 Free Software Foundation, Inc.
Contributed by Andi Kleen. Contributed by Andi Kleen.
This file is part of GCC. This file is part of GCC.
...@@ -52,11 +52,16 @@ main(int ac, char **av) ...@@ -52,11 +52,16 @@ main(int ac, char **av)
/* XXX implement more magic from gcc.c? */ /* XXX implement more magic from gcc.c? */
nprefix = getenv ("GCC_EXEC_PREFIX"); nprefix = getenv ("GCC_EXEC_PREFIX");
if (!nprefix) if (!nprefix)
nprefix = av[0];
else
nprefix = concat (nprefix, "gcc-" PERSONALITY, NULL);
nprefix = make_relative_prefix (nprefix,
standard_bin_prefix,
standard_libexec_prefix);
if (nprefix == NULL)
nprefix = standard_libexec_prefix; nprefix = standard_libexec_prefix;
nprefix = make_relative_prefix (av[0],
standard_bin_prefix,
nprefix);
plugin = concat (nprefix, plugin = concat (nprefix,
dir_separator, dir_separator,
DEFAULT_TARGET_MACHINE, DEFAULT_TARGET_MACHINE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment