In stellar core-collapse events matter is heated and compressed to densities above nuclear matter saturation density. For progenitor stars with masses above roughly 25M , which eventually form black holes, the temperatures and densities reached during the collapse are so high that a traditional description in terms of electrons, nuclei, and nucleons is no longer adequate. We present here an improved equation of state containing, in addition, pions and hyperons. They become abundant in the high-temperature-and-density regime. We study the different constraints on such an equation of state, coming from both hyperonic data and observations of neutron-star properties. To test the zero-temperature versions of our new equations of state, we perform numerical simulations of the collapse of a neutron star to a black hole. We discuss the influence of the additional particles on the thermodynamic properties within the hot versions of the equation of state and we show that, in regimes relevant to core-collapse and black-hole formation, the effects of pions and hyperons on pressure, internal energy, and sound speed are not negligible.