Add %{_bindir} to PATH to cater CdnX-builds.

Set CFLAGS_FOR_BUILD.
This commit is contained in:
Ralf Corsepius
2008-03-18 06:12:56 +00:00
parent 10d6b97a0d
commit 5ee16abd07

View File

@@ -1,10 +1,16 @@
%build %build
%if "%{_prefix}" != "/usr"
export PATH="%{_bindir}:${PATH}"
%endif
%if "@tool_target@" == "i686-pc-cygwin" %if "@tool_target@" == "i686-pc-cygwin"
# The cygwin sources are leaking memory # The cygwin sources are leaking memory
RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')" RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')"
%endif %endif
mkdir -p build mkdir -p build
cd build cd build
%if "%{_build}" != "%{_host}"
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
%endif
CFLAGS="$RPM_OPT_FLAGS" \ CFLAGS="$RPM_OPT_FLAGS" \
../binutils-%{binutils_pkgvers}/configure \ ../binutils-%{binutils_pkgvers}/configure \
--build=%_build --host=%_host \ --build=%_build --host=%_host \