Ubuntu builds firefox for trusty with g++-4.9 , I checked this on amd64 some time ago and the build logs tell me that the armhf toolchain is as well g++-4.9
0:08.79 checking for the target C++ compiler... /<<BUILDDIR>>/firefox-59.0.1+build1/debian/gcc-mozilla/g++
0:08.90 checking whether the target C++ compiler can be used... yes
0:08.90 checking the target C++ compiler version... 4.9.4
0:08.98 checking the target C++ compiler works... yes
0:08.98 checking for the host C compiler... /<<BUILDDIR>>/firefox-59.0.1+build1/debian/gcc-mozilla/gcc
0:09.04 checking whether the host C compiler can be used... yes
0:09.04 checking the host C compiler version... 4.9.4
0:09.11 checking the host C compiler works... yes
0:09.11 checking for the host C++ compiler... /<<BUILDDIR>>/firefox-59.0.1+build1/debian/gcc-mozilla/g++
0:09.18 checking whether the host C++ compiler can be used... yes
0:09.18 checking the host C++ compiler version... 4.9.4
0:09.25 checking the host C++ compiler works... yes
Ubuntu builds firefox for trusty with g++-4.9 , I checked this on amd64 some time ago and the build logs tell me that the armhf toolchain is as well g++-4.9
0:08.79 checking for the target C++ compiler... /<<BUILDDIR> >/firefox- 59.0.1+ build1/ debian/ gcc-mozilla/ g++ >/firefox- 59.0.1+ build1/ debian/ gcc-mozilla/ gcc >/firefox- 59.0.1+ build1/ debian/ gcc-mozilla/ g++
0:08.90 checking whether the target C++ compiler can be used... yes
0:08.90 checking the target C++ compiler version... 4.9.4
0:08.98 checking the target C++ compiler works... yes
0:08.98 checking for the host C compiler... /<<BUILDDIR>
0:09.04 checking whether the host C compiler can be used... yes
0:09.04 checking the host C compiler version... 4.9.4
0:09.11 checking the host C compiler works... yes
0:09.11 checking for the host C++ compiler... /<<BUILDDIR>
0:09.18 checking whether the host C++ compiler can be used... yes
0:09.18 checking the host C++ compiler version... 4.9.4
0:09.25 checking the host C++ compiler works... yes