gbuild: serialize linking on "make check" too

Change-Id: Icdcca50627d2a7aed19287807f8f1bc17cb18efb