Soaking in a Borax solution removes the smell from athletic gear better than anything else I've tried, and it's less expensive than many detergents. It worked on a dry-fit t-shirt that had held onto an unpleasant odour even after two washings and drying in the sun on the line. After the borax-solution soaking, the expensive hockey undergarment didn't have to be trashed.Washing Soda
You can buy washing soda or use baking soda to make it. Put baking soda (sodium bicarbonate) on a baking sheet and heat in the oven at 250 degrees F for 1 hr. Heating removes the water and carbon dioxide molecules form baking soda turning it into sodium carbonate, or washing soda. Add 1/2 cup to a full load of laundry to soften water, boost stain removal and remove odours. See more uses for washing soda here.