The gemara Erkhin 5b has a whole discussion about whether we may accept donations from goyim. Yet no where in the discussion is the prohibition of beyavesh ketzirah ( as in BB 10a) against taking donations from goyim mentioned!
Thanks for your question. The Rema (YD 254:2) rules that the prohibition does not apply to accepting donations for a Shul. The Taz explains that donation to a Shul has the status of a Korban. The Torah permits accepting Korbanos from non-Jews.
Kol tuv.
Y. Landy