On the nucleosynthesis of lithium, beryllium, and boron