id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6887,Hardcoded path to g++ in gcc.mak and gcc-shared.mak for regex,Morten Rasmussen ,John Maddock,"The makefiles gcc.mak and gcc-shared.mak in boost/libs/regex/build both contain the lines CXX=g++ LINKER=g++ -shared which means that the compiler will pick the g++ defined by the PATH variable. This is unfortunate if you have multiple gcc version on the machine and intend to link boost regex with modules compiled with another g++ version than the one defined by PATH. To fix this, I suggest that these lines are changed to CXX?=g++ LINKER=$(CXX) -shared so that a CXX value passed to the makefile will prevail, and ""g++"" is still if no value is passed. In other words: this suggestion adds the option of passing an alternative CXX value to the makefile - the suggestion will be backward compatible by working as before if no value is passed. The changes in diff format: diff gcc.mak.orig gcc.mak 24,25c24,25 < CXX=g++ < LINKER=g++ -shared --- > CXX?=g++ > LINKER=$(CXX) -shared diff gcc-shared.mak.orig gcc-shared.mak 24,25c24,25 < CXX=g++ < LINKER=g++ -shared --- > CXX?=g++ > LINKER=$(CXX) -shared ",Bugs,closed,To Be Determined,regex,Boost 1.49.0,Problem,fixed,gcc makefile g++ path,