Pacbuilder
Pacbuilder is a small but powerful script to automatically recompile the whole system, repos or just a single package (with or without its dependencies). This is quite useful once you have edited /etc/makepkg.conf with some customized CFLAGS.
See Makepkg - Architecture, compile flags for more about specifying CFLAGS. Install pacbuilder-svnAUR from the AUR.
Use
To see actual CFLAGS and CXXFLAGS run:
pacbuilder --gccinfo
Most used command:
pacbuilder --builddeps --keepdeps --verbose --noconfirm --install $packagename
or
pacbuilder -Sbkvn $packagename
Run pacbuilder -h
to show a list of all options along with a description.