Starbucks CEO Howard Schultz dug in his heels about gay marriage after an investor complained that the company's support was eroding its bottom line.

"If you feel respectfully that you can get a higher return [than] the 38% you got last year, it's a free country," said Schultz, during the annual shareholders meeting on March 21. "You could sell your shares at Starbucks and buy shares in other companies."

In January 2012, Starbucks joined Microsoft (MSFT) and Nike (NKE) in announcing support of a Washington state bill to legalize same-sex marriage, which ultimately passed.

In March 2012, the National Organization for Marriage instituted a "Dump Starbucks" boycott because of the company's support of gay marriage. Investor-analyst Tom Stauber attributed his disappointment in Starbucks (SBUX) stock to this boycott, according to the shareholders' meeting transcript.

"It's my understanding, something like tens of thousands of people signed on this particular boycott," said Stauber. "And then the [first quarter] after this boycott was announced, our sales and our earnings ... were [a] bit disappointing."

Starbucks stock and dividends rose 7.6% from March 2012 to March 2013. (The 38% to which Schultz referred was for fiscal year 2012: From October 2011 to September 2012.)

Stauber complained that Starbucks' stock price had underperformed the S&P 500 over the last year.

"Until January a year ago, we existed without making gay marriage a core value of our company," said Stauber. "Hence we did quite well."

Related: Marriage ruling could save thousands for same-sex couples

The National Organization for Marriage did not return a call from CNNMoney, but its website says more than 56,000 people have joined its boycott.

Starbucks has long been a supporter of same-sex marriage. In 2011, the company was among a group of 70 businesses and organizations that filed a brief in federal court opposing the Defense of Marriage Act, which restricts the definition of marriage to that between a man and a woman. The Supreme Court will hear arguments as to the legality of DOMA on Wednesday.

During the shareholders' meeting, Schultz emphasized that Starbucks employs more than 200,000 people and "we want to embrace diversity of all kinds."

Related: Gay community optimistic about financial future

Many major companies have publicly taken a stance on gay marriage. Dan Cathy, CEO of Chick-Fil-A, announced his opposition to gay marriage last year. Business surged as customers lined up at the fast food chain to show their support, while gay couples staged a "kiss day" in protest.

Correction: An earlier version of this article included an incorrect location for Nike headquarters. It is based in Oregon.