You are not supposed to compile in do_install(), but some Makefile detect CFLAGS changes and then rebuild.