Created attachment 42500 [details] [review]
While trying to build mesa-demos I got some linking errors for egl/opengl/eglgears_*. It looks like the linking with libm is missing in CMake files. I fixed this with attached patch.
I do not use CMake, but things are compiling fine with this patch applied. Thanks.