Miroslav Lichvar wrote:> Well, this reverts the commit 18e0154. How is the user supposed to set > CFLAGS without getting -O3 -funroll-loops there? (e.g. to minimize the > size of the compiled binaries)Is it -O3 or -funroll-loops that you have a problem with? Or both? What would you prefer to see as the default optimisation level? I'm sure there is a solution to this. Lets find it. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On Tue, Jul 29, 2014 at 07:47:33PM +1000, Erik de Castro Lopo wrote:> Miroslav Lichvar wrote: > > > Well, this reverts the commit 18e0154. How is the user supposed to set > > CFLAGS without getting -O3 -funroll-loops there? (e.g. to minimize the > > size of the compiled binaries) > > Is it -O3 or -funroll-loops that you have a problem with? Or both? > What would you prefer to see as the default optimisation level?The -funroll-loops option improves the encoding speed, but it seems to increase the size significantly. I'm not suggesting to remove it from the default CFLAGS, just have an option to fully override them.> I'm sure there is a solution to this. Lets find it.It would be nice if -funroll-loops was used only for the stream_encoder.c file, that's where it seems to matter most. I'm not sure if there is a better way to do this in automake, in the Fedora flac package I used this patch: http://pkgs.fedoraproject.org/cgit/flac.git/plain/flac-1.2.1-cflags.patch?id=66a59af0bdc5ae4a719aac5d4a8c41817906a01f -- Miroslav Lichvar
Miroslav Lichvar wrote:> The -funroll-loops option improves the encoding speed, but it seems to > increase the size significantly. I'm not suggesting to remove it from > the default CFLAGS, just have an option to fully override them.> It would be nice if -funroll-loops was used only for the > stream_encoder.c file, that's where it seems to matter most. > > I'm not sure if there is a better way to do this in automake, in the > Fedora flac package I used this patch: > > http://pkgs.fedoraproject.org/cgit/flac.git/plain/flac-1.2.1-cflags.patch?id=66a59af0bdc5ae4a719aac5d4a8c41817906a01fUgly, but that seemse to be the standard solution to this: https://www.gnu.org/software/automake/manual/html_node/Per_002dObject-Flags.html Let me play with this. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/