Uganda has been seen as a bastion of anti-gay sentiment since 2013, when it sought to toughen penalties, with some lawmakers pushing for the death penalty or life in prison for some actions involving gay sex.
The law was overturned on procedural grounds, but not before U.S. Secretary of State John Kerry compared it to anti-Semitic legislation in Nazi Germany. Other Western donors were outraged.
Gay rights activists in Uganda said before the visit that they hoped the pope would make a gesture of tolerance to homosexuals.
Failing to address the issue would be "a missed opportunity to protect LGBT persons," said activist Frank Mugisha.
In the prepared text of his homily for the Mass, the pope praised the martyrs for telling the king "what the gospel does not allow," an apparent reference to homosexual acts.
The pope, however, did not read that part of the homily. It was not clear if he decided to remove it.
The Church teaches that while homosexual tendencies are not a sin, homosexual acts are. It also says homosexuals should be respected in the Church and society but that Catholic homosexuals should remain chaste.
The pope first visited a separate shrine to the 25 Anglican martyrs before saying Mass at the nearby shrine to the Catholic martyrs, who were made saints by Pope Paul VI in 1964.
Later on Saturday, the pope was due to hold a rally with Ugandan youth and visit a Church-run home for the poor.
On Sunday morning, he is due to leave for the Central African Republic, potentially the most dangerous stop on his trip.
For nearly three years, the Central African Republic has been embroiled in an inter-religious conflict that has effectively split it in two. Thousands have been killed and more than one in five have fled internally or sought refuge abroad.
– See more at: http://www.the-star.co.ke/news/pope-francis-visits-ugandan-shrine-amid-gay-rights-debate#sthash.lgHSTg1i.dpuf