Perfect multicollinearity when estimating a gravity model
My problem is: because Brazil is the origin for the exports to all other countries, GDP_O, POP_O and any other variables representing Brazilian data will be equal for all observations and as such there will be perfect multicollinearity.


This isn't perfect multicollinearity. It's a lack of time/space variation.  Multicollinearity occurs between features, not observations.  You would of course not have space variation in any given year, for the reason you note - but in a comment you said you ran a panel regression, so you should have that time variation.


  I want to regress exports as a function of, among other things, Brazil's GDP. As such, I want to see the effect of GDP on Brazil's exports and not the effect of GDP on exports to each country 


Then, why are you using a gravity model for trade flows? Doing so spreads the effect size across a bunch of variables you seem to be uninterested in.  Total exports is just a number that relates to GDP through the accounting identity.  Since that identity is additive, a log-log form for your regression does not make sense.