We consider M-theory compactified on elliptically fibered Calabi-Yau threefolds as a top-down approach to understand 5d N=1 theories. Amongst other things, we compute the Euler characteristic from geometry and use such data to see that the anomalies of the uplifted six-dimensional theories are canceled using the Green-Schwarz mechanism.