André (and any others interested in speeding up link times at the expense of a doubling in disk usage),
The attached script works for me. I have set its executable bit and placed it in my path, using it as $ make CXX=my_g++ Please check that make invokes g++ as g++ ... -MT file.lo -MD ... in the subdirs and as g++ ... -c -o file.o .. in the main src dir. If not, you'll need to change the sed expression accordingly. Strictly speaking, you need invoke my_g++ only when compiling, but it doesn't hurt when linking. Having compiled all code using my_g++ I get: $ rm -f lyx-qt lyx-xforms lyx $ time make CXX=my_g++ real 1m49.288s user 0m54.050s sys 0m4.190s Ie, at least a halving in link times. Hope this helps, but be warned, you pay in terms of disk-footprint 'size' stats are unchanged but 'ls' reports a doubling in the executable size. BEFORE $ size lyx-qt lyx-xforms text data bss dec hex filename 3502915 165400 25652 3693967 385d8f lyx-qt 3326990 85852 51188 3464030 34db5e lyx-xforms AFTER $ size lyx-qt lyx-xforms text data bss dec hex filename 3504279 164956 25652 3694887 386127 lyx-qt 3328366 85408 51188 3464962 34df02 lyx-xforms $ ls -l lyx-qt lyx-xforms -rwxrwxr-x 1 angus angus 168349888 Nov 4 23:43 lyx-qt -rwxrwxr-x 1 angus angus 123573147 Nov 4 23:42 lyx-xforms -- Angus
my_g++
Description: application/shellscript