Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make clang/clang++ happy compiling MythTV.
We weren't setting and clang++ flags so we got excessive output.
clang errors out in some cases when it sees the same command line option twice.

The first problem has been addressed in configure and the second in settings.pro.
  • Loading branch information
daniel-kristjansson committed Dec 10, 2012
1 parent c0c4734 commit ebf98a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions mythtv/configure
Expand Up @@ -2834,6 +2834,14 @@ elif $cxx --version 2>/dev/null | grep -q Intel; then
speed_cxxflags='-O3'
size_cxxflags='-Os'
noopt_cxxflags='-O1'
elif $cxx --version 2>/dev/null | grep -q clang; then
cxx_type=clangxx
gxx_version="AV_STRINGIFY(__CLANG_COMPILER)"
cxx_ident=$($cxx --version | head -n1)
clangxx_version=$($cxx -dumpversion)
speed_cxxflags='-O3'
size_cxxflags='-Os'
noopt_cxxflags='-O1'
fi

test -n "$cxx_type" && enable $cxx_type ||
Expand Down Expand Up @@ -4738,6 +4746,11 @@ elif enabled icpc; then
# 913: ignoring invalid multibyte character sequence,
# icpc and g++ do the right thing for char 0x80-0xFF
check_cxxflags -wd177,192,592,913
elif enabled clangxx; then
# The self assign warning triggers on headers that use x=x;
# to suppress warnings about unused parameters.
check_cxxflags -Wno-self-assign
check_cxxflags -Qunused-arguments
fi

# Check for python dependencies
Expand Down
4 changes: 2 additions & 2 deletions mythtv/settings.pro
Expand Up @@ -110,8 +110,8 @@ CXX_PP_FLAGS -= -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
macx: QMAKE_CFLAGS_STATIC_LIB += -fno-common

# figure out compile flags based on qmake info
QMAKE_CFLAGS += $$CPPFLAGS $$CFLAGS
QMAKE_CXXFLAGS += $$CXXPPFLAGS $$ECXXFLAGS
QMAKE_CFLAGS *= $$CPPFLAGS $$CFLAGS
QMAKE_CXXFLAGS *= $$CXXPPFLAGS $$ECXXFLAGS

profile:CONFIG += debug

Expand Down

0 comments on commit ebf98a3

Please sign in to comment.