[squid-users] using clang to compile squid 4-5

Alex Rousskov rousskov at measurement-factory.com
Tue Jan 22 16:17:06 UTC 2019


On 1/22/19 6:21 AM, graf huy wrote:

> The Makefile is modified so each line with gcc is replaced with clang
> and each line of g++ replaced with clang++. But gcc is still used.

I am not sure you are doing that, but, just in case, you should not be
modifying Makefiles (or any other files generated by ./configure)
manually. You should convince ./configure to select clang instead.

I suggest using update-alternatives(1) to switch between gcc and clang
compilers (or between gcc versions). It may be a bit difficult to get
working initially, but works well once you figure out the right
commands. Please note that you should be switching both C and C++
compilers at the same time (i.e., both should come from either GCC or
clang). Search the web for more detailed instructions -- your "how to
switch from gcc to clang on Debian 10" question/problem is not specific
to Squid.

If you are using update-alternatives already, you may want to share your
commands, their output, and the corresponding ./configure output.

Alex.


More information about the squid-users mailing list