#### Archived

This topic is now archived and is closed to further replies.

# optimized rpmbuild's

This topic is 5210 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How do you pass build options through rpmbuild? Things like -O3 -fpmath=sse -mmmx etc... $CFLAGS,$CCFLAGS, $CXXFLAGS, and$RPM_OPT_FLAGS seem to be completely ignored.

##### Share on other sites
A well written spec file should use RPM_OPT_FLAGS for CFLAGS etc unless there are compelling reasons for avoiding certain optimizations or features. Not all spec files do that, unfortunately.

RPM_OPT_FLAGS are set per build target (i386, i686 etc) using the RPM configuration files (the "optflags" directive). You can override it system-wide (/etc/rpmrc) and per-user (~/.rpmrc).

RPM_OPT_FLAGS isn't really meant to be passed when you run rpmbuild, but you could use the --rcfile option to specify an additional file with special build options, e.g. for building a certain package with more aggressive optimization settings.

[edited by - spock on October 14, 2003 4:47:16 AM]