Trevor Hickey
Trevor Hickey

Reputation: 37914

How can I make a simple CROSSTOOL for choosing a newer GCC?

Bazel is using my system's version of gcc (which points to gcc-5).
Instead, I want to use gcc-7.

I don't see any way to configure or pass in a different compiler,
which means I must specify it as a CROSSTOOL.

I've read all the CROSSTOOL tutorials, but I'm still confused on how to configure this newer version of gcc, because there are so many potential options.

Is there a way to get the default CROSSTOOL configuration used?
Because then maybe I could just tweak that to a different compiler.

Otherwise, could anyone point me to a typical standard configuration of using gcc-7.
I am able to change my system version of gcc to point to gcc-7, and that builds correctly, which is why I'm looking for the simplest CROSSTOOL configuration that essentially does the same thing.

Upvotes: 1

Views: 169

Answers (1)

hlopko
hlopko

Reputation: 3268

If you're talking about the autoconfigured crosstool that is shipped with bazel, you can just set CC environment variable to point to the gcc-7.

Upvotes: 3

Related Questions