Singular perturbation problems with a compact support semilinear term