There is: bracket the ```-lphobos``` part with ```-Bstatic``` and ```-Bdynamic``` (those are linker flags. If you pass them to gcc you have to prepend ```-Wl,```)

Example:
```gcc -Wl,-Bstatic -lphobos  -Wl,-Bdynamic```
(-Bdynamic is default)