Homophobia is blessedly absent from EBTs, and in fact is rare in all periods and schools of Indian religion. The modern, exceedingly harmful, attacks on people of different sexualities is entirely a product of distorted Western values, ultimately rooted in the Abrahamic traditions. It was for this reason that the Buddhist community in Australia together with the Australian Hindu council, were proud to offer our support for same-sex marriage reform in Australia. The FABC continues to actively support this issue, which our extreme conservative government, supported by the main Christian organizations, has blocked.
Nevertheless, in later Buddhist texts it is possible to find occasional homophobic remarks, although even if these are taken as gospel they do not justify any kind of discrimination.
I have not researched this in any detail, but the only such passage I know of in the Pali commentaries is the gloss on a certain phrase in DN 26 Cakkavatti. I remember in a discussion many years ago on this, I was accused of distorting the Buddha’s words by not accepting this homophobic slur. Good times!
But it turns out that the phrase in question occurs elsewhere, where it has a completely different explanation in the commentary.
The phrase in question is micchādhammā. In both our sources, DN 26 and AN 3.56, it occurs as part of a description of the decline of moral values. And it occurs in conjunction with two other phrases, adhammarāga (illicit lust) and visamalobha (unbalanced greed; but more likely, immoral greed). The fact that all this is shared between the two contexts is more than enough to establish that the meaning should be the same in both places.
Now, obviously micchādhamma is an open term. The first element means “wrong”, and for the second element, take your pick: teachings, principles, practices, laws, thoughts, phenomena …
This is where we turn to the commentary for help. At DN 26 it says:
Micchādhammoti purisānaṃ purisesu itthīnañca itthīsu chandarāgo
“Wrong thoughts” means the desire and lust of men for men and women for women.
However at AN 3.56 we have:
Micchādhammaparetāti avatthupaṭisevanasaṅkhātena micchādhammena samannāgatā
“Overcome with wrong thoughts” means intercourse with those who are considered inappropriate classes of people.
I am not very familiar with commentarial idioms, so am not entirely sure of this, but that’s what I think it means. Avatthu is, I think, the “non-basis”, i.e. the kinds of people mentioned in the precept on sexual misconduct who one should not have intercourse with, such as those who are married, under guardianship, and so on.
Now, in this list of three terms, clearly the meaning is somewhat similar; in fact adhammarāga and visamalobha are just synonyms. So it makes sense if the third term has a similar sense. Given that the term itself does not determine any clear meaning, it is of course better to refer it to related teachings that are clearly found elsewhere in the Suttas, rather than something that is not found elsewhere. Thus we should prefer the AN commentary here. Why the DN commentary came up with that odd gloss remains a mystery.
Not only is homophobia completely absent from all the sayings of the Buddha, it is hardly found in later texts. Even in the rare, possibly unique, instance when it is found in a commentary, it is a disputed and implausible reading, not accepted by another commentary.