You do not report the sale of the stock. This is a great tax benefit to you. You get to deduct the Fair Market Value of the gift of the stock at the time the gift was made.
If its value has increased over time, it’s better to donate the stock. If you’ve owned the stock for more than a year, you get to take the current value as a charitable deduction if you itemize and you don’t have to pay tax on the appreciation (you’d owe capital-gains tax on the profit if you sold the stock first and then wrote a check).
Take a look at this link for a detailed explanation and look at the section titled Benefits: