log4cxx: Set optimization level to O2

propertiespatternconverter.cpp fails to compile when the optimization flag
is "-Os", which is the default.  Appending "-O2" to CXXFLAGS, which is a
similar optimization level, resolves the issue.

Fixes Homebrew/homebrew#12565.
Closes Homebrew/homebrew#12566.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
This commit is contained in:
Ben Charrow 2012-06-02 14:37:38 -04:00 committed by Charlie Sharpsteen
parent b7b1ffc9f4
commit d0c8dd6743

View file

@ -23,6 +23,7 @@ class Log4cxx < Formula
def install
ENV.universal_binary if ARGV.build_universal?
ENV.O2 # Using -Os causes build failures on Snow Leopard.
# Fixes build error with clang, old libtool scripts. cf. #12127
# Reported upstream here: https://issues.apache.org/jira/browse/LOGCXX-396