Uganda's parliament on Friday passed an anti-homosexuality bill that would see repeat offenders jailed for life, reports and activists said.