diff --git a/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL b/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL index 0ef230997778ed..3392cf5f3d153a 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL +++ b/src/test/java/com/google/devtools/build/lib/analysis/mock/MOCK_CROSSTOOL @@ -62,7 +62,6 @@ toolchain { tool_path { name: "gcc" path: "/usr/bin/gcc" } cxx_flag: "-std=c++0x" linker_flag: "-lstdc++" - linker_flag: "-B/usr/bin/" # TODO(bazel-team): In theory, the path here ought to exactly match the path # used by gcc. That works because bazel currently doesn't track files at diff --git a/src/test/shell/bazel/testdata/bazel_toolchain_test_data/tools/arm_compiler/CROSSTOOL b/src/test/shell/bazel/testdata/bazel_toolchain_test_data/tools/arm_compiler/CROSSTOOL index d9e45a4e01d109..55148f0daa1df5 100644 --- a/src/test/shell/bazel/testdata/bazel_toolchain_test_data/tools/arm_compiler/CROSSTOOL +++ b/src/test/shell/bazel/testdata/bazel_toolchain_test_data/tools/arm_compiler/CROSSTOOL @@ -155,8 +155,6 @@ toolchain { compiler_flag: "-fstack-protector" compiler_flag: "-Wall" compiler_flag: "-Wl,-z,-relro,-z,now" - compiler_flag: "-B/usr/bin" - compiler_flag: "-B/usr/bin" compiler_flag: "-Wunused-but-set-parameter" compiler_flag: "-Wno-free-nonheap-object" compiler_flag: "-fno-omit-frame-pointer" @@ -173,8 +171,6 @@ toolchain { linker_flag: "-lstdc++" linker_flag: "-lm" linker_flag: "-Wl,-no-as-needed" - linker_flag: "-B/usr/bin" - linker_flag: "-B/usr/bin" linker_flag: "-pass-exit-codes" needsPic: true objcopy_embed_flag: "-I" diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL index a41b8822a964a4..5b9cd3d5356167 100644 --- a/tools/cpp/CROSSTOOL +++ b/tools/cpp/CROSSTOOL @@ -59,7 +59,6 @@ toolchain { tool_path { name: "gcc" path: "/usr/bin/gcc" } cxx_flag: "-std=c++0x" linker_flag: "-lstdc++" - linker_flag: "-B/usr/bin/" # TODO(bazel-team): In theory, the path here ought to exactly match the path # used by gcc. That works because bazel currently doesn't track files at @@ -271,7 +270,6 @@ toolchain { tool_path { name: "gcc" path: "/usr/bin/clang" } cxx_flag: "-std=c++0x" linker_flag: "-lstdc++" - linker_flag: "-B/usr/bin/" # TODO(bazel-team): In theory, the path here ought to exactly match the path # used by gcc. That works because bazel currently doesn't track files at diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl index 361931b47b88b1..0279b1939f76b8 100644 --- a/tools/cpp/unix_cc_configure.bzl +++ b/tools/cpp/unix_cc_configure.bzl @@ -282,8 +282,6 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin): "dynamic_lookup", "-headerpad_max_install_names", ] if darwin else bin_search_flag + [ - # Always have -B/usr/bin, see https://github.com/bazelbuild/bazel/issues/760. - "-B/usr/bin", # Gold linker only? Can we enable this by default? # "-Wl,--warn-execstack", # "-Wl,--detect-odr-violations" @@ -318,10 +316,7 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin): ] + (( _add_compiler_option_if_supported(repository_ctx, cc, "-Wthread-safety") + _add_compiler_option_if_supported(repository_ctx, cc, "-Wself-assign") - ) if darwin else bin_search_flag + [ - # Always have -B/usr/bin, see https://github.com/bazelbuild/bazel/issues/760. - "-B/usr/bin", - ]) + ( + )) + ( # Disable problematic warnings. _add_compiler_option_if_supported(repository_ctx, cc, "-Wunused-but-set-parameter") + # has false positives