Fixed a build issue

This commit is contained in:
Ravindra Kumar 2015-09-14 20:39:59 -07:00
parent ba51a75a8d
commit 21b0b63fc3

View File

@ -28,7 +28,7 @@
Name: open-vm-tools
Version: %{toolsversion}
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Open Virtual Machine Tools for virtual machines hosted on VMware
Group: Applications/System
License: GPLv2
@ -116,11 +116,13 @@ VMware virtual machines.
%setup -q -n %{name}-%{version}-%{toolsbuild}
%build
# Use _DEFAULT_SOURCE to suppress warning until upstream
# is fixed. Refer https://sourceware.org/bugzilla/show_bug.cgi?id=16632.
export CFLAGS="$RPM_OPT_FLAGS -D_DEFAULT_SOURCE"
# Some sigc++-2.0 headers need C++11
export CXXFLAGS="$RPM_OPT_FLAGS -D_DEFAULT_SOURCE -std=c++11"
# Fedora 23 uses libsigc++-2.0 version 2.6.1.
# libsigc++-2.0 >= 2.5.1 requires C++11. Using
# -std=c++11 does not provide "linux" definition
# therefore, we need to use -std=gnu++11
%if 0%{?fedora} >= 23
export CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++11"
%endif
# Required for regenerating configure script when
# configure.ac get modified
autoreconf -i
@ -259,6 +261,12 @@ fi
%{_libdir}/libvmtools.so
%changelog
* Wed Sep 30 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 10.0.0-3
- Replace -std=c++11 with -std=gnu++11 to get "linux" definitions work
in order to fix the build issue,
https://kojipkgs.fedoraproject.org//work/tasks/4823/11274823/build.log
- Removed unused definitions for CFLAGS and CXXFLAGS
* Wed Sep 30 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 10.0.0-2
- Add -std=c++11 to CXXFLAGS for fixing the build issue,
https://kojipkgs.fedoraproject.org//work/tasks/3685/11273685/build.log