Sync with CVS-HEAD.

This commit is contained in:
Ralf Corsepius
2008-11-06 07:36:41 +00:00
parent 6fd1e6920a
commit d3ae4470ac
3 changed files with 26 additions and 2 deletions

View File

@@ -32,7 +32,8 @@
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
%else
CC="%{__cc} ${RPM_OPT_FLAGS}" \
# gcc is not ready to be compiled with -std=gnu99
CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
%endif
../gcc-%{gcc_pkgvers}/configure \
--prefix=%{_prefix} \

View File

@@ -25,7 +25,7 @@
%endif
%if %build_objc
%setup -T -D -n %{name}-%{version} -a5
%setup -q -T -D -n %{name}-%{version} -a5
%{?PATCH5:%patch5 -p0}
%endif

View File

@@ -47,3 +47,26 @@ EOF
chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
# Extract %%__debug_install_post into debug_install_post~
cat << \EOF > debug_install_post~
%__debug_install_post
EOF
# Generate customized debug_install_post script
cat debug_install_post~ | while read a x y; do
case $a in
# Prevent find-debuginfo.sh* from trying to handle foreign binaries
*/find-debuginfo.sh)
b=$(basename $a)
sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
chmod a+x $b
;;
esac
done
sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
< debug_install_post~ > debug_install_post
%define __debug_install_post . ./debug_install_post