Commit 0532f0ed authored by Steven Danna's avatar Steven Danna Committed by Marin Jankovski

Use -O2 when building with standard compiler flags

Since we are setting CFLAGS explicitly, we override any Makefile
defaults, which will often be -O2.
parent 139f3c33
......@@ -471,7 +471,7 @@ module Omnibus
when "mac_os_x"
{
"LDFLAGS" => "-L#{install_dir}/embedded/lib",
"CFLAGS" => "-I#{install_dir}/embedded/include",
"CFLAGS" => "-I#{install_dir}/embedded/include -O2",
}
when "solaris2"
{
......@@ -484,7 +484,7 @@ module Omnibus
when "freebsd"
freebsd_flags = {
"LDFLAGS" => "-L#{install_dir}/embedded/lib",
"CFLAGS" => "-I#{install_dir}/embedded/include",
"CFLAGS" => "-I#{install_dir}/embedded/include -O2",
}
# Clang became the default compiler in FreeBSD 10+
if Ohai['os_version'].to_i >= 1000024
......@@ -497,7 +497,7 @@ module Omnibus
else
{
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib",
"CFLAGS" => "-I#{install_dir}/embedded/include",
"CFLAGS" => "-I#{install_dir}/embedded/include -O2",
}
end
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment