What does CC?= in a Makefile mean?

From http://www.gnu.org/software/make/manual/make.html: There is another assignment operator for variables, `?=’. This is called a conditional variable assignment operator, because it only has an effect if the variable is not yet defined. This statement: FOO ?= bar is exactly equivalent to this (see The origin Function): ifeq ($(origin FOO), undefined) FOO = bar endif Probably CC … Read more

How can I see parse tree, intermediate code, optimization code and assembly code during COMPILATION?

While you can use the -fdump-tree-all and -fdump-rtl-all options in gcc, I don’t think that their output is very useful to a compiler student. FWIW, I started working on gcc as part of my PhD studies, having already completed two undergraduate courses, and I found gcc and its debug files to be opaque and hard … Read more

How to compile MPI with gcc?

mpicc is just a wrapper around certain set of compilers. Most implementations have their mpicc wrappers understand a special option like -showme (Open MPI) or -show (Open MPI, MPICH and derivates) that gives the full list of options that the wrapper passes on to the backend compiler. For example, in Open MPI, wrappers are C++ … Read more

tech