forked from Imagelibrary/rtems
34 lines
911 B
Plaintext
34 lines
911 B
Plaintext
%build
|
|
%if "%{_prefix}" != "/usr"
|
|
export PATH="%{_bindir}:${PATH}"
|
|
%endif
|
|
%if "@tool_target@" == "i686-pc-cygwin"
|
|
# The cygwin sources are leaking memory
|
|
RPM_OPT_FLAGS="$(echo "$RPM_OPT_FLAGS"|sed -e 's; -Wp,-D_FORTIFY_SOURCE=2;;')"
|
|
%endif
|
|
mkdir -p build
|
|
cd build
|
|
%if "%{_build}" != "%{_host}"
|
|
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
|
%endif
|
|
CFLAGS="$RPM_OPT_FLAGS" \
|
|
../binutils-%{binutils_pkgvers}/configure \
|
|
--build=%_build --host=%_host \
|
|
--target=@tool_target@ \
|
|
--verbose --disable-nls \
|
|
--without-included-gettext \
|
|
--disable-win32-registry \
|
|
--disable-werror \
|
|
--with-sysroot=%{_prefix}/@tool_target@/sys-root \
|
|
--prefix=%{_prefix} --bindir=%{_bindir} \
|
|
--exec-prefix=%{_exec_prefix} \
|
|
--includedir=%{_includedir} --libdir=%{_libdir} \
|
|
--mandir=%{_mandir} --infodir=%{_infodir}
|
|
|
|
make %{?_smp_mflags} all
|
|
%if %build_infos
|
|
make info
|
|
%endif
|
|
cd ..
|
|
|