Equilibrium states in ergodic theory are defined via a variational principle where one takes the supremum over all invariant measures of the entropy + the average of the potential. This is therefore a Legendre transform in the general sense. In thermodynamics, Gibbs (equilibrium) states are instead defined by a Legendre transform assuming the differentiability of the average of the potential (and of the topological pressure). It seems to me that the formulation from ergodic theory is therefore more general since it does not assume a differentiable structure.
Under which assumptions on the underlying dynamical system does the supremum formulation from ergodic theory reduce to the differentiable formulation of thermodynamics ?