First thing to know about bears is that their sense of smell is incredible
http://www.knowyourneighbors.net/bear-sense-of-smell/
It's pretty much how they interact with their world -- in the same way we use our eyes for long distance searching, bears use their noses.
The question then becomes one of how bears react to specific smells.
Which quickly becomes problematic because (1) research is sporadic, usually anecdotal, and sometimes contradictory; and (2) bears don't read the scientific literature.
It's like the Abbott & Costello routine where the former is trying to convince the latter not to worry about vampires:
"C'mon. Dracula doesn't exist, he's just a made-up story! You know he's not real, I know he's not real, EVERYONE knows he's not real."
"Yes, but does DRACULA know that he's not real."
**IN GENERAL**, bears have two main reactions to smells.
https://adventure.howstuffworks.com/...ract-bears.htm
"Food" equals "good."
"Human" equals "bad."
That's why bears will inevitably meander close to ANY kind of smell remotely like food (like perfumes), but (generally) run away when they smell a human.
The problem comes when a bear has learned (been trained?) to think that "human" equals "food" equals "good."
When that happens, a bear will not only fail to run when it smells us, it will start to meander to where humans are gathering.
At which point everyone is in trouble.
Thus, don't count on a bear being disgusted with the smell of a stinky shirt, anymore that it would be disgusted with the smell of a rotting dear carcass. If the bear has learned "stinky shirt" equals "humans" equals "food," then you might as well sleep next to a deer carcass.
Now about the smells of stuff that one might smoke.
Surprisingly, people have tried to answer this question
http://www.westword.com/marijuana/do...o-know-9300448
https://www.backpacker.com/stories/a...l-my-marijuana
and the (basic) answer is, "We're not sure either way, but it would make sense that a bear MIGHT be attracted."