diff options
| author | Harshavardhana <harsha@harshavardhana.net> | 2014-05-30 01:07:04 -0700 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2014-06-04 16:24:32 -0700 | 
| commit | ea58f256463efb07824dbd307af06f2c3960f254 (patch) | |
| tree | 2de22ec3ce5e2d065ec32b07f89ca9cc679eca45 | |
| parent | 1f95e55cc633e9b082b4eb37a6a825c0e33ac5c8 (diff) | |
build: Avoid gcc pragmas when clang is enabled
Change-Id: I86544a9bfd24ef1a69315c0f6c3abcdd9aeb2c69
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7932
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
| -rwxr-xr-x | build-aux/xdrgen | 4 | ||||
| -rw-r--r-- | configure.ac | 2 | 
2 files changed, 4 insertions, 2 deletions
diff --git a/build-aux/xdrgen b/build-aux/xdrgen index c6dd5cc0340..a2240a235a2 100755 --- a/build-aux/xdrgen +++ b/build-aux/xdrgen @@ -22,10 +22,12 @@ append_licence_header ()  #if defined(__GNUC__)  #if __GNUC__ >= 4 +#if !defined(__clang__)  #pragma GCC diagnostic ignored "-Wunused-but-set-variable"  #pragma GCC diagnostic ignored "-Wunused-variable"  #endif  #endif +#endif  EOF @@ -67,7 +69,7 @@ gen_headers ()      rm -f $hfile;      rpcgen -h -o $hfile $xfile;      # the '#ifdef' part of file should be fixed -    sed -e 's/-/_/g' $hfile > ${hfile}.new && mv ${hfile}.new $hfile;  +    sed -e 's/-/_/g' $hfile > ${hfile}.new && mv ${hfile}.new $hfile;      # Gen header to temp file and append generated file      append_licence_header $hfile $tmp_hfile;      # now move the destination file to actual original file diff --git a/configure.ac b/configure.ac index 04b6c72fd12..2c69ccdc1c3 100644 --- a/configure.ac +++ b/configure.ac @@ -774,7 +774,7 @@ AC_COMPILE_IFELSE(  AC_MSG_RESULT([$CLANG])  if test "x$CLANG" = "xyes"; then -    GF_COMPILER_FLAGS="-Wno-gnu -Wno-unknown-pragmas -Wno-deprecated-declarations -Wno-enum-conversion" +    GF_COMPILER_FLAGS="-Wno-gnu -Wno-deprecated-declarations -Wno-enum-conversion"  fi  | 
