In this paper, we study an optimal control problem of ordinary differential equations with linear dynamics, affine mixed control-state constraints, and terminal complementarity constraints on the state function. We derive its weak, Clarke, Mordukhovich, and strong stationarity conditions, and we present constraint qualifications which ensure that these conditions are satisfied at a locally optimal solution of the optimal control problem. Finally, we show that Scholtes's global relaxation technique is applicable to the problem and yields Clarke stationary points under appropriate assumptions.