Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc_configure: Remove hardcoded link option "-B/usr/bin" #6360

Closed

Conversation

mzeren-vmw
Copy link
Contributor

Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes #5634

Archeaology: It looks like this logic was originally added here:

810d60a Apr 22 2016 dmarting@google.com
"cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. #1152.

This may have also "fixed" the hombrew builds for
#1177.

Testing Done:

  • Building envoy on older Centos host using non-host
    crosscompiler. Build fails without the fix and succeeds with the fix.

  • bazel test //src/test/java/com/google/devtools/build/lib:all
    1 flaky test failed before and after:
    bazel test //src/test/java/com/google/devtools/build/lib:vfs_test

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@googlebot
Copy link

CLAs look good, thanks!

Putting -B/usr/bin on the link line breaks use of custom C/C++ toolchain
since support binaries such as ld, as, etc., will incorrectly "leak" to
the build machine.

Fixes bazelbuild#5634

Archeaology: It looks like this logic was originally added here:

  810d60a Apr 22 2016 dmarting@google.com
  "cc_configure: Add -B to compiler flag too"

.. and that that was done to get Tensor Flow building on some (but failing
on other?) versions of RedHat. bazelbuild#1152.

This may have also "fixed" the hombrew builds for
bazelbuild#1177.

Testing Done:

* Building envoy on older Centos host using non-host
  crosscompiler. Build fails without the fix and succeeds with the fix.

* bazel test //src/test/java/com/google/devtools/build/lib:all
  1 flaky test failed before and after:
  bazel test //src/test/java/com/google/devtools/build/lib:vfs_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop unconditionally adding -B/usr/bin flag to C/C++ toolchains
3 participants