From a20352eb1dce3fd8df2527ad7227abf5f1bb7891 Mon Sep 17 00:00:00 2001 From: Damien Martin-Guillerez Date: Tue, 19 Apr 2016 11:47:52 +0000 Subject: [PATCH] cc_configure: always add -B/usr/bin to the list of gcc option Fixes #760. -- MOS_MIGRATED_REVID=120217217 --- tools/cpp/cc_configure.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index bc4a2e27217ea1..2f09ff640dbcd2 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -173,6 +173,8 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin): ] + _add_option_if_supported(repository_ctx, cc, "-no-canonical-prefixes") + ( ["-undefined", "dynamic_lookup"] if darwin else [ "-B" + str(repository_ctx.path(cc).dirname), + # Always have -B/usr/bin, see https://github.com/bazelbuild/bazel/issues/760. + "-B/usr/bin", # Have gcc return the exit code from ld. "-pass-exit-codes", # Stamp the binary with a unique identifier.