We investigate optimal control problems governed by a semilinear obstacle problem. We relax the feasible domain of the problem and using both mathematical programming methods and penalization methods we get optimality conditions with smooth lagrange multipliers.