On Ubuntu 19.04, I have to build a project that requires an older gcc version that one installed in my system. For certain reasons, I cannot modify makefiles; during the build, gcc command must invoke older gcc, not the default version. How do I achieve that without breaking the default gcc currently installed in the system?
Asked
Active
Viewed 254 times
1
1 Answers
0
As it turned out, they call gcc through their own internal variable where they also add some flags. After I overrode it from command line:
make CCCMD='gcc-6 ...'
it got fixed.
I just forgot about overriding feature of make.

olegst
- 121
gcc
directly, or does the makefile do something like settingCC := gcc
in which case you may be able to override it on the command line likemake CC=path/to/old/gcc
? – steeldriver Oct 23 '19 at 12:12