Blame SPECS/compat-gcc-32.spec

4ac4fd
%define LIBSTDCXXDATE 20040818
4ac4fd
%define DATE 20040701
4ac4fd
%define gcc_version 3.2.3
aaa856
%define gcc_release 72
4ac4fd
%define _unpackaged_files_terminate_build 0
4ac4fd
%define multilib_64_archs sparc64 ppc64 s390x x86_64
4ac4fd
%define build_java 0
4ac4fd
%define _default_patch_fuzz 2
4ac4fd
%ifarch s390x
4ac4fd
%define multilib_32_arch s390
4ac4fd
%endif
4ac4fd
%ifarch sparc64
4ac4fd
%define multilib_32_arch sparc
4ac4fd
%endif
4ac4fd
%ifarch ppc64
4ac4fd
%define multilib_32_arch ppc
4ac4fd
%endif
4ac4fd
%ifarch x86_64
4ac4fd
%define multilib_32_arch i386
4ac4fd
%endif
4ac4fd
Summary: The compatibility GNU Compiler Collection
4ac4fd
Name: compat-gcc-32
4ac4fd
Version: %{gcc_version}
4ac4fd
Release: %{gcc_release}%{?dist}
4ac4fd
License: GPLv2+ with exceptions
4ac4fd
Group: Development/Languages
4ac4fd
Source0: gcc-%{gcc_version}-%{DATE}.tar.bz2
4ac4fd
Source2: libstdc++-3.3.4-%{LIBSTDCXXDATE}.tar.bz2
4ac4fd
Source3: dummylib.sh
4ac4fd
URL: http://gcc.gnu.org
4ac4fd
BuildRoot: /var/tmp/gcc-root
4ac4fd
# Need .eh_frame ld optimizations
4ac4fd
# Need proper visibility support
4ac4fd
# Need -pie support
4ac4fd
# Need --as-needed/--no-as-needed support
4ac4fd
# Need .weakref support
4ac4fd
BuildRequires: binutils >= 2.16.91.0.5-1
4ac4fd
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo
4ac4fd
# Make sure pthread.h doesn't contain __thread tokens
4ac4fd
BuildRequires: glibc-devel >= 2.2.90-12, glibc-static
4ac4fd
# Need .eh_frame ld optimizations
4ac4fd
# Need proper visibility support
4ac4fd
# Need -pie support
4ac4fd
# Need .weakref support
4ac4fd
Requires: binutils >= 2.16.91.0.5-1
4ac4fd
# Make sure gdb will understand DW_FORM_strp
4ac4fd
Conflicts: gdb < 5.1-2
4ac4fd
Requires: glibc-devel >= 2.2.90-12
4ac4fd
Requires: libgcc >= 3.4.0
4ac4fd
%ifarch %{multilib_64_archs} sparc sparcv9 ppc
4ac4fd
# Ensure glibc{,-devel} is installed for both multilib arches
4ac4fd
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
4ac4fd
%endif
4ac4fd
Provides: bundled(libiberty)
4ac4fd
4ac4fd
Patch1: gcc32-multi32-hack.patch
4ac4fd
Patch2: gcc32-ice-hack.patch
4ac4fd
Patch3: gcc32-ppc64-m32-m64-multilib-only.patch
4ac4fd
Patch4: gcc32-bison-1.875c.patch
4ac4fd
Patch5: gcc32-i386-prefetch-sse.patch
4ac4fd
Patch6: gcc32-convert-move.patch
4ac4fd
Patch7: gcc32-libjava-jar-timestamps.patch
4ac4fd
Patch8: gcc32-c++-friend-templ-member.patch
4ac4fd
Patch9: gcc32-c++-scope-nesting.patch
4ac4fd
Patch10: gcc32-libstdc++-symver.patch
4ac4fd
Patch11: gcc32-java-intlex.patch
4ac4fd
Patch12: gcc32-java-nan.patch
4ac4fd
Patch13: gcc32-dwarf2-pruning-keep-spec.patch
4ac4fd
Patch14: gcc32-java-bytecode.patch
4ac4fd
Patch15: gcc32-pr3581.patch
4ac4fd
Patch16: gcc32-libstdc++-limits.patch
4ac4fd
Patch17: gcc32-ppc64-crtsavres.patch
4ac4fd
Patch18: gcc32-s390-reload-dup.patch
4ac4fd
Patch19: gcc32-ppc-altivec-ap.patch
4ac4fd
Patch20: gcc32-ppc-mpowerpc64.patch
4ac4fd
Patch21: gcc32-null-pointer-check-noncc0.patch
4ac4fd
Patch22: gcc32-ppc-movdi_internal64.patch
4ac4fd
Patch23: gcc32-c++-reregister-specialization.patch
4ac4fd
Patch24: gcc32-c++-pr7566.patch
4ac4fd
Patch25: gcc32-c++-pass-by-invisible-ref.patch
4ac4fd
Patch26: gcc32-c++-unitialized-self-ref.patch
4ac4fd
Patch27: gcc32-tablejump-cleanup.patch
4ac4fd
Patch28: gcc32-libstdc++-fully-dynamic-strings.patch
4ac4fd
Patch29: gcc32-Winline-doc.patch
4ac4fd
Patch30: gcc32-ia64-expand_load_address.patch
4ac4fd
Patch31: gcc32-demangle-pr16240.patch
4ac4fd
Patch32: gcc32-debug-cdtor.patch
4ac4fd
Patch33: gcc32-cxa_demangle-ambiguity.patch
4ac4fd
Patch34: gcc32-c++-pr10558.patch
4ac4fd
Patch35: gcc32-libstdc++-pr9659.patch
4ac4fd
Patch36: gcc32-libstdc++-symver2.patch
4ac4fd
Patch37: gcc32-pr19005.patch
4ac4fd
Patch38: gcc32-rh149250.patch
4ac4fd
Patch39: gcc32-rh156185.patch
4ac4fd
Patch40: gcc32-rh156291.patch
4ac4fd
Patch41: gcc32-pr18300.patch
4ac4fd
Patch42: gcc32-gnuc-rh-release.patch
4ac4fd
Patch43: gcc32-weakref.patch
4ac4fd
Patch44: gcc32-pr13106.patch
4ac4fd
Patch45: gcc32-ppc64-stack-boundary.patch
4ac4fd
Patch46: gcc32-pr12799.patch
4ac4fd
Patch47: gcc32-pr13041.patch
4ac4fd
Patch48: gcc32-pr26208.patch
4ac4fd
Patch49: gcc32-rh173224.patch
4ac4fd
Patch50: gcc32-rh180778.patch
4ac4fd
Patch51: gcc32-rh181894.patch
4ac4fd
Patch52: gcc32-rh186252.patch
4ac4fd
Patch53: gcc32-pr26208-workaround.patch
4ac4fd
Patch54: gcc32-libgcc_eh-hidden.patch
4ac4fd
Patch55: gcc32-java-zoneinfo.patch
4ac4fd
Patch56: gcc32-CVE-2006-3619.patch
4ac4fd
Patch57: gcc32-rh226706.patch
4ac4fd
4ac4fd
Patch60: gcc32-obstack-lvalues.patch
4ac4fd
Patch61: gcc32-fc4-compile.patch
4ac4fd
Patch62: gcc32-s390x-compile.patch
4ac4fd
Patch63: gcc32-bison.patch
4ac4fd
4ac4fd
Patch100: compat-libstdc++33-incdir.patch
4ac4fd
Patch101: compat-libstdc++33-limits.patch
4ac4fd
Patch102: compat-libstdc++33-symver.patch
4ac4fd
Patch103: compat-libstdc++33-v3.patch
4ac4fd
Patch104: compat-libstdc++33++-fully-dynamic-strings.patch
4ac4fd
Patch105: compat-libstdc++33++-symver2.patch
4ac4fd
Patch106: compat-libstdc++33-cxa_demangle-ambiguity.patch
4ac4fd
Patch107: compat-libstdc++33-ldbl.patch
4ac4fd
4ac4fd
%define _gnu %{nil}
4ac4fd
4ac4fd
%ifarch sparc sparcv9
4ac4fd
%define gcc_target_platform sparc64-%{_vendor}-linux
4ac4fd
%endif
4ac4fd
%ifarch ppc
4ac4fd
%define gcc_target_platform ppc64-%{_vendor}-linux
4ac4fd
%endif
4ac4fd
%ifnarch sparc sparcv9 ppc
4ac4fd
%define gcc_target_platform %{_target_cpu}-%{_vendor}-linux
4ac4fd
%endif
4ac4fd
4ac4fd
%description
4ac4fd
This package includes a GCC 3.2.3-RH compatibility compiler.
4ac4fd
4ac4fd
%package -n compat-libstdc++-33
4ac4fd
Summary: Compatibility standard C++ libraries
4ac4fd
Group: System Environment/Libraries
4ac4fd
Obsoletes: compat-libstdc++
4ac4fd
Obsoletes: compat-gcc-32, compat-gcc-32-c++, compat-gcc-32-g77
4ac4fd
4ac4fd
%description -n compat-libstdc++-33
4ac4fd
The compat-libstdc++ package contains compatibility standard C++ library
4ac4fd
from GCC 3.3.4.
4ac4fd
4ac4fd
%prep
4ac4fd
%setup -q -n gcc-%{gcc_version}-%{DATE} -a2
4ac4fd
mv gcc-3.3.4-%{LIBSTDCXXDATE}/libstdc++-v3 libstdc++33-v3
4ac4fd
%ifarch sparc ppc
4ac4fd
#%patch1 -p0 -b .multi32-hack~
4ac4fd
%endif
4ac4fd
%patch2 -p0 -b .ice-hack~
4ac4fd
%patch3 -p0 -b .ppc64-m32-m64-multilib-only~
4ac4fd
%patch4 -p0 -b .bison-1.875c~
4ac4fd
%patch5 -p0 -b .i386-prefetch-sse~
4ac4fd
%patch6 -p0 -b .convert-move~
4ac4fd
%patch7 -p0 -b .libjava-jar-timestamps~
4ac4fd
%patch8 -p0 -b .c++-friend-templ-member~
4ac4fd
#%patch9 -p0 -b .c++-scope-nesting~
4ac4fd
%patch10 -p0 -b .libstdc++-symver~
4ac4fd
%patch11 -p0 -b .java-intlex~
4ac4fd
%patch12 -p0 -b .java-nan~
4ac4fd
%patch13 -p0 -b .dwarf2-pruning-keep-spec~
4ac4fd
%patch14 -p0 -b .java-bytecode~
4ac4fd
%patch15 -p0 -b .pr3581~
4ac4fd
%patch16 -p0 -b .libstdc++-limits~
4ac4fd
%patch17 -p0 -b .ppc64-crtsavres~
4ac4fd
%patch18 -p0 -b .s390-reload-dup~
4ac4fd
%patch19 -p0 -b .ppc-altivec-ap~
4ac4fd
%patch20 -p0 -b .ppc-mpowerpc64~
4ac4fd
%patch21 -p0 -b .null-pointer-check-noncc0~
4ac4fd
%patch22 -p0 -b .ppc-movdi_internal64~
4ac4fd
%patch23 -p0 -b .c++-reregister-specialization~
4ac4fd
%patch24 -p0 -b .c++-pr7566~
4ac4fd
%patch25 -p0 -b .c++-pass-by-invisible-ref~
4ac4fd
%patch26 -p0 -b .c++-unitialized-self-ref~
4ac4fd
%patch27 -p0 -b .tablejump-cleanup~
4ac4fd
%patch28 -p0 -b .libstdc++-fully-dynamic-strings~
4ac4fd
%patch29 -p0 -b .Winline-doc~
4ac4fd
%patch30 -p0 -b .ia64-expand_load_address~
4ac4fd
%patch31 -p0 -b .demangle-pr16240~
4ac4fd
%patch32 -p0 -b .debug-cdtor~
4ac4fd
%patch33 -p0 -b .cxa_demangle-ambiguity~
4ac4fd
%patch34 -p0 -b .c++-pr10558~
4ac4fd
%patch35 -p0 -b .libstdc++-pr9659~
4ac4fd
%patch36 -p0 -b .libstdc++-symver2~
4ac4fd
%patch37 -p0 -b .pr19005~
4ac4fd
%patch38 -p0 -b .rh149250~
4ac4fd
%patch39 -p0 -b .rh156185~
4ac4fd
%patch40 -p0 -b .rh156291~
4ac4fd
%patch41 -p0 -b .pr18300~
4ac4fd
%patch42 -p0 -b .gnuc-rh-release~
4ac4fd
%patch43 -p0 -b .weakref~
4ac4fd
%patch44 -p0 -b .pr13106~
4ac4fd
%patch45 -p0 -b .ppc64-stack-boundary~
4ac4fd
%patch46 -p0 -b .pr12799~
4ac4fd
%patch47 -p0 -b .pr13041~
4ac4fd
%patch48 -p0 -b .pr26208~
4ac4fd
%patch49 -p0 -b .rh173224~
4ac4fd
%patch50 -p0 -b .rh180778~
4ac4fd
%patch51 -p0 -b .rh181894~
4ac4fd
%patch52 -p0 -b .rh186252~
4ac4fd
%patch53 -p0 -b .pr26208-workaround~
4ac4fd
%patch54 -p0 -b .libgcc_eh-hidden~
4ac4fd
%patch55 -p0 -b .java-zoneinfo~
4ac4fd
%patch56 -p0 -b .CVE-2006-3619~
4ac4fd
%patch57 -p0 -b .rh226706~
4ac4fd
4ac4fd
%patch60 -p0 -b .obstack-lvalues~
4ac4fd
%patch61 -p0 -b .fc4-compile~
4ac4fd
%patch62 -p0 -b .s390x-compile~
4ac4fd
%patch63 -p0 -b .bison~
4ac4fd
4ac4fd
%patch100 -p0 -b .compat-libstdc++33-incdir~
4ac4fd
%patch101 -p0 -b .compat-libstdc++33-limits~
4ac4fd
%patch102 -p0 -b .compat-libstdc++33-symver~
4ac4fd
%patch103 -p0 -b .compat-libstdc++33-v3~
4ac4fd
%patch104 -p0 -b .compat-libstdc++33++-fully-dynamic-strings~
4ac4fd
%patch105 -p0 -b .compat-libstdc++33++-symver2~
4ac4fd
%patch106 -p0 -b .compat-libstdc++33-cxa_demangle-ambiguity~
4ac4fd
%patch107 -p0 -b .compat-libstdc++33-ldbl.patch~
4ac4fd
4ac4fd
sed -i -e 's/struct siginfo/siginfo_t/' gcc/config/*/linux*.h
4ac4fd
4ac4fd
%ifarch ppc ppc64 s390 s390x
4ac4fd
sed -i -e 's/-lm @LIBUNWIND_FLAG@/-lm @LIBUNWIND_FLAG@ -lnldbl_nonshared/' \
4ac4fd
  libstdc++33-v3/src/Makefile.{am,in}
4ac4fd
%endif
4ac4fd
# Don't need to test C, only check-g++ and libstdc++-v33's make check
4ac4fd
sed -i -e 's/\$(RUNTEST) --tool gcc/: $(RUNTEST) --tool gcc/' \
4ac4fd
  gcc/Makefile.in
4ac4fd
sed -i -e 's/\$\$runtest \$(RUNTESTDEFAULTFLAGS)/: $$runtest $(RUNTESTDEFAULTFLAGS)/' \
4ac4fd
  libstdc++-v3/testsuite/Makefile.in
4ac4fd
perl -pi -e 's/3\.2\.4/3.2.3/' gcc/version.c
4ac4fd
perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
4ac4fd
perl -pi -e 's/\((prerelease|experimental|release|Red Hat[^)]*)\)/\(Red Hat Linux %{gcc_version}-%{gcc_release}\)/' gcc/version.c
4ac4fd
4ac4fd
cp -a libstdc++33-v3/config/cpu/i{4,3}86/atomicity.h
4ac4fd
4ac4fd
./contrib/gcc_update --touch
4ac4fd
4ac4fd
%build
4ac4fd
4ac4fd
rm -fr obj-%{gcc_target_platform}
4ac4fd
mkdir obj-%{gcc_target_platform}
4ac4fd
cd obj-%{gcc_target_platform}
4ac4fd
4ac4fd
mkdir -p ld_hack
4ac4fd
cat > ld_hack/ld <<\EOF
4ac4fd
#!/bin/sh
4ac4fd
case " $* " in *\ -r\ *) exec /usr/bin/ld "$@";; esac
4ac4fd
exec /usr/bin/ld --build-id "$@"
4ac4fd
EOF
4ac4fd
chmod 755 ld_hack/ld
4ac4fd
export PATH=`pwd`/ld_hack/${PATH:+:$PATH}
4ac4fd
4ac4fd
if [ ! -f /usr/lib/locale/de_DE/LC_CTYPE ]; then
4ac4fd
  mkdir locale
4ac4fd
  localedef -f ISO-8859-1 -i de_DE locale/de_DE
4ac4fd
  export LOCPATH=`pwd`/locale:/usr/lib/locale
4ac4fd
fi
4ac4fd
4ac4fd
CC=gcc
4ac4fd
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'`
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
4ac4fd
%ifarch %{ix86}
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=pentium4/-mcpu=i686/g'`
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=generic/-mcpu=i686/g'`
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=atom/-mcpu=i686/g'`
e73a19
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=atom/-mcpu=i686/g'`
e73a19
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=x86-64//g'`
e73a19
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse//g'`
4ac4fd
%endif
4ac4fd
%ifarch x86_64
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=nocona//g'`
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mtune=generic//g'`
4ac4fd
%endif
4ac4fd
%ifarch sparc sparcv9 sparc64
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g'`
4ac4fd
%endif
4ac4fd
%ifarch s390 s390x
e73a19
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=z9-109//g;s/-march=z10//g;s/-march=z196//g;s/-mtune=z10//g;s/-mtune=zEC12//g'`
e73a19
%endif
e73a19
%ifarch ppc ppc64
e73a19
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=power[678]//g;s/-mcpu=power[678]//g;s/-mtune=power[678]//g'`
4ac4fd
%endif
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Wall//g' -e 's/-Wp,-D_FORTIFY_SOURCE=2//g'`
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-fexceptions//g' -e 's/-fasynchronous-unwind-tables//g'`
e73a19
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-grecord-gcc-switches//g' -e 's/-fstack-protector-strong//g'`
4ac4fd
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-fstack-protector//g' -e 's/--param=ssp-buffer-size=[0-9]*//g'`
4ac4fd
%ifarch sparc64
4ac4fd
cat > gcc64 <<"EOF"
4ac4fd
#!/bin/sh
4ac4fd
exec /usr/bin/gcc -m64 "$@"
4ac4fd
EOF
4ac4fd
chmod +x gcc64
4ac4fd
CC=`pwd`/gcc64
4ac4fd
%endif
4ac4fd
%ifarch ppc64
4ac4fd
if gcc -m64 -xc -S /dev/null -o - > /dev/null 2>&1; then
4ac4fd
  cat > gcc64 <<"EOF"
4ac4fd
#!/bin/sh
4ac4fd
exec /usr/bin/gcc -m64 "$@"
4ac4fd
EOF
4ac4fd
  chmod +x gcc64
4ac4fd
  CC=`pwd`/gcc64
4ac4fd
fi
4ac4fd
%endif
4ac4fd
CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
4ac4fd
	GCJFLAGS="$OPT_FLAGS" \
4ac4fd
	../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
4ac4fd
	--enable-shared --enable-threads=posix --disable-checking \
4ac4fd
	--with-system-zlib --enable-__cxa_atexit \
4ac4fd
	--enable-languages=c,c++ --disable-libgcj \
4ac4fd
%ifarch sparc sparcv9
4ac4fd
	--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
4ac4fd
%endif
4ac4fd
%ifarch ppc
4ac4fd
	--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
4ac4fd
%endif
4ac4fd
%ifnarch sparc sparcv9 ppc
4ac4fd
	--host=%{gcc_target_platform}
4ac4fd
%endif
4ac4fd
4ac4fd
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap-lean
4ac4fd
#make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
4ac4fd
4ac4fd
# Fix up libstdc++.so's
4ac4fd
for d in `pwd`/%{gcc_target_platform}/libstdc++-v3 `pwd`/%{gcc_target_platform}/*/libstdc++-v3; do
4ac4fd
  test -d $d || continue
4ac4fd
  d33=`dirname $d`/libstdc++33-v3
4ac4fd
  pushd $d/src
4ac4fd
    sh %{SOURCE3} .libs/libstdc++.so .libs/ll.so linker.map
4ac4fd
    rm .libs/libstdc++.so; mv .libs/ll.so .libs/libstdc++.so
4ac4fd
    f=`basename .libs/libstdc++.so.5.0.*`
4ac4fd
    f33=`basename $d33/src/.libs/libstdc++.so.5.0.*`
4ac4fd
    cp -a $d33/src/.libs/libstdc++.so.5.0.* .libs/
4ac4fd
    if [ "$f" != "$f33" ]; then
4ac4fd
      ln -sf $f33 .libs/libstdc++.so.5
4ac4fd
      ln -sf $f33 .libs/$f
4ac4fd
    fi
4ac4fd
  popd
4ac4fd
  pushd $d33/src
4ac4fd
    sh %{SOURCE3} .libs/libstdc++.so .libs/ll.so libstdc++*.ver
4ac4fd
    rm .libs/libstdc++.so; mv .libs/ll.so .libs/libstdc++.so
4ac4fd
  popd
4ac4fd
done
4ac4fd
4ac4fd
# Make sure we are using system libgcc_s, as system libc might
4ac4fd
# use unwinding features that require it.
4ac4fd
mv gcc/libgcc_s.so.1{,.bak}
4ac4fd
ln -sf /%{_lib}/libgcc_s.so.1 gcc/libgcc_s.so.1
4ac4fd
4ac4fd
# run the tests.
4ac4fd
make %{?_smp_mflags} -k check || :
4ac4fd
sed -ie s/libstdc++-v3/libstdc++33-v3/g `find $(find %{gcc_target_platform} -type d -a -name libstdc++33-v3) -name \*.sum`
4ac4fd
echo ====================TESTING=========================
4ac4fd
( ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
4ac4fd
echo ====================TESTING END=====================
4ac4fd
4ac4fd
%install
4ac4fd
rm -fr $RPM_BUILD_ROOT
4ac4fd
4ac4fd
export PATH=`pwd`/obj-%{gcc_target_platform}/ld_hack/${PATH:+:$PATH}
4ac4fd
4ac4fd
perl -pi -e \
4ac4fd
  's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
4ac4fd
  libstdc++-v3/docs/html/documentation.html
4ac4fd
ln -sf documentation.html libstdc++-v3/docs/html/index.html
4ac4fd
find libstdc++-v3/docs/html -name CVS | xargs rm -rf
4ac4fd
4ac4fd
cd obj-%{gcc_target_platform}
4ac4fd
4ac4fd
if [ ! -f /usr/lib/locale/de_DE/LC_CTYPE ]; then
4ac4fd
  export LOCPATH=`pwd`/locale:/usr/lib/locale
4ac4fd
fi
4ac4fd
4ac4fd
TARGET_PLATFORM=%{gcc_target_platform}
4ac4fd
4ac4fd
# There are some MP bugs in libstdc++ and libjava Makefiles
4ac4fd
# make -C %{gcc_target_platform}/libstdc++-v3
4ac4fd
4ac4fd
make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
4ac4fd
  infodir=$RPM_BUILD_ROOT%{_infodir} install
4ac4fd
4ac4fd
FULLPATH=$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
4ac4fd
FULLPATH33=$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/3.3.4
4ac4fd
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libstdc++.*a
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libsupc++.*a
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libstdc++.so*
4ac4fd
4ac4fd
for d in %{gcc_target_platform}/libstdc++-v3 %{gcc_target_platform}/*/libstdc++-v3; do
4ac4fd
  test -d $d || continue
4ac4fd
  d33=`dirname $d`/libstdc++33-v3
4ac4fd
  b=""
4ac4fd
  test x"$d" != x%{gcc_target_platform}/libstdc++-v3 && b=/`basename $(dirname $d)`
4ac4fd
  install -m 644 $d/libsupc++/.libs/libsupc++.a $FULLPATH$b/
4ac4fd
  install -m 644 $d/src/.libs/libstdc++.a $FULLPATH$b/
4ac4fd
  strip -g $FULLPATH$b/*.a
4ac4fd
  install -m 644 $d/src/.libs/libstdc++.so $FULLPATH$b/
4ac4fd
4ac4fd
  mkdir -p $FULLPATH33$b
4ac4fd
  install -m 644 $d33/libsupc++/.libs/libsupc++.a $FULLPATH33$b/
4ac4fd
  install -m 644 $d33/src/.libs/libstdc++.a $FULLPATH33$b/
4ac4fd
  strip -g $FULLPATH33$b/*.a
4ac4fd
  install -m 644 $d33/src/.libs/libstdc++.so $FULLPATH33$b/
4ac4fd
done
4ac4fd
4ac4fd
mkdir -p $RPM_BUILD_ROOT/%{_lib}
4ac4fd
install -m755 %{gcc_target_platform}/libstdc++33-v3/src/.libs/libstdc++.so.5.0* \
4ac4fd
  $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
4ac4fd
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
4ac4fd
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s*
4ac4fd
4ac4fd
cd ..
4ac4fd
4ac4fd
for i in $RPM_BUILD_ROOT%{_prefix}/bin/{*gcc,*++,gcov}; do
4ac4fd
  mv -f $i ${i}32
4ac4fd
done
4ac4fd
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/lib*/{libiberty.a,*/libiberty.a}
4ac4fd
rm -f $RPM_BUILD_ROOT/lib*/libgcc_s*
4ac4fd
4ac4fd
%ifarch %{multilib_64_archs}
4ac4fd
# Remove libraries for the other arch on multilib arches
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/lib*.so*
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/lib*.a
4ac4fd
%else
4ac4fd
%ifarch sparc sparcv9 ppc
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/lib*.so*
4ac4fd
rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/lib*.a
4ac4fd
%endif
4ac4fd
%endif
4ac4fd
4ac4fd
rm -rf $RPM_BUILD_ROOT%{_prefix}/{lib/gcc-lib,bin,include}
4ac4fd
4ac4fd
%clean
4ac4fd
rm -rf $RPM_BUILD_ROOT
4ac4fd
4ac4fd
%post -n compat-libstdc++-33 -p /sbin/ldconfig
4ac4fd
4ac4fd
%postun -n compat-libstdc++-33 -p /sbin/ldconfig
4ac4fd
4ac4fd
%files -n compat-libstdc++-33
4ac4fd
%defattr(-,root,root)
4ac4fd
%{_prefix}/%{_lib}/libstdc++.so.5*
4ac4fd
4ac4fd
%changelog
aaa856
* Tue Nov  4 2014 Jakub Jelinek  <jakub@redhat.com> 3.2.3-72
aaa856
- rebuilt against fixed glibc to avoid infinite recursion in btowc (#1159772)
aaa856
e73a19
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 3.2.3-71
e73a19
- Mass rebuild 2014-01-24
e73a19
e73a19
* Tue Jan  7 2014 Jakub Jelinek  <jakub@redhat.com> 3.2.3-70
e73a19
- filter out -fstack-protector-strong, -grecord-gcc-switches and new
e73a19
  i686, ppc and s390 tunings (#1048850)
e73a19
4ac4fd
* Wed Aug 28 2013 Jakub Jelinek  <jakub@redhat.com> 3.2.3-69
4ac4fd
- add %%{?dist} to release (#874993)
4ac4fd
4ac4fd
* Wed Feb 20 2013 Jakub Jelinek  <jakub@redhat.com> 3.2.3-68.7
4ac4fd
- use siginfo_t instead of struct siginfo
4ac4fd
4ac4fd
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-68.6
4ac4fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4ac4fd
4ac4fd
* Mon Oct 15 2012 Jon Ciesla <limburgher@gmail.com> - 3.2.3-68.5
4ac4fd
- Provides: bundled(libiberty)
4ac4fd
4ac4fd
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-68.4
4ac4fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4ac4fd
4ac4fd
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-68.3
4ac4fd
- Rebuilt for c++ ABI breakage
4ac4fd
4ac4fd
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-68.2
4ac4fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
4ac4fd
4ac4fd
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-68.1
4ac4fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
4ac4fd
4ac4fd
* Thu Sep 17 2009 Jakub Jelinek  <jakub@redhat.com> 3.2.3-68
4ac4fd
- strip -march=z9-109 and -mtune=z10 from OPT_FLAGS on s390, s390x
4ac4fd
  (#523209)
4ac4fd
- make sure to use system libgcc_s.so.1 instead of gcc32 one during
4ac4fd
  testing
4ac4fd
4ac4fd
* Tue Jul 28 2009 Jakub Jelinek  <jakub@redhat.com> 3.2.3-67
4ac4fd
- replace -mtune=generic in $RPM_OPT_FLAGS with something that
4ac4fd
  GCC 3.2.3 groks
4ac4fd
4ac4fd
* Mon Mar  9 2009 Jakub Jelinek  <jakub@redhat.com> 3.2.3-66
4ac4fd
- fix up for latest bison
4ac4fd
4ac4fd
* Sat Feb 14 2009 Dennis Gilmore <dennis@ausil.us> - 3.2.3-65
4ac4fd
- fix to build 32 bit sparc sparcv9
4ac4fd
4ac4fd
* Tue Jul 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2.3-64
4ac4fd
- fix license tag
4ac4fd
- apply patches with fuzz=2
4ac4fd
4ac4fd
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.2.3-63
4ac4fd
- Autorebuild for GCC 4.3
4ac4fd
4ac4fd
* Tue Oct  9 2007 Jakub Jelinek  <jakub@redhat.com> 3.2.3-62
4ac4fd
- rebuilt
4ac4fd
4ac4fd
* Mon Aug 21 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-61
4ac4fd
- fix the ppc*/s390* math *l stub changes
4ac4fd
4ac4fd
* Fri Aug 18 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-60
4ac4fd
- on ppc*/s390* make sure all needed math *l stubs are included
4ac4fd
4ac4fd
* Thu Aug 10 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-59
4ac4fd
- fix cleaning up the buildroot before debuginfo generation
4ac4fd
4ac4fd
* Thu Aug 10 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-58
4ac4fd
- include only compat-libstdc++-33 subpackage
4ac4fd
4ac4fd
* Thu Aug  3 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-57
4ac4fd
- in 64-bit builds remove 32-bit /usr/lib/lib* libraries from the
4ac4fd
  buildroots (and similarly on 32-bit builds remove 64-bit /usr/lib64/lib*)
4ac4fd
  before AutoReq generation
4ac4fd
4ac4fd
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.2.3-55.fc5.1
4ac4fd
- rebuild
4ac4fd
4ac4fd
* Sat Feb 11 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-55.fc5
4ac4fd
- replace -mtune=generic in $RPM_OPT_FLAGS with something that
4ac4fd
  GCC 3.2.3 groks
4ac4fd
4ac4fd
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.2.3-54.fc5.2
4ac4fd
- bump again for double-long bug on ppc(64)
4ac4fd
4ac4fd
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.2.3-54.fc5.1
4ac4fd
- rebuilt for new gcc4.1 snapshot and glibc changes
4ac4fd
4ac4fd
* Wed Jan  4 2006 Jakub Jelinek  <jakub@redhat.com> 3.2.3-54.fc5
4ac4fd
- rebuilt with new gcc, massage $RPM_OPT_FLAGS, as GCC 3.2.3-RH doesn't
4ac4fd
  grok -fstack-protector etc.
4ac4fd
- make sure glibc and glibc-devel for all multilib arches is installed
4ac4fd
  for building (#170601)
4ac4fd
- fix compat-libstdc++-33 %%description (#171684)
4ac4fd
- disable os_defines.h changes introduced in 3.2.3-45 also for
4ac4fd
  IBM xlC compiler (#146196, IT#75174)
4ac4fd
- fix pushdecl_class_level for OVERLOADs (Mark Mitchell,
4ac4fd
  Alexandre Oliva, #156185)
4ac4fd
- reword diagnostics about unresolved overloaded type
4ac4fd
  (Alexandre Oliva, #156291, IT#70101)
4ac4fd
- fix x86_64 compiler hang when passing object with 3+ base classes by value
4ac4fd
  (Zak Kipling, PR target/18300, #164421, #171940, IT#76454)
4ac4fd
- predefine __GNUC_RH_RELEASE__ macro to rpm's %%{release} (Alexandre Oliva)
4ac4fd
- weakref attribute support, use it in <bits/gthr.h> various C++ headers
4ac4fd
  are using (Alexandre Oliva, #165728, IT#73356)
4ac4fd
- don't warn in templates about missing return if return type is dependent
4ac4fd
  on template parameters (Alexandre Oliva, PR c++/13106, #169044, IT#77857)
4ac4fd
- ensure ppc64 keeps stack 16 byte aligned even with dynamic allocation
4ac4fd
  (alloca, VLAs), but don't rely on it in the generated code
4ac4fd
  (Alexandre Oliva, #169111, IT#76136)
4ac4fd
- fix invalid CC clobberation on i?86/x86_64 (Eric Botcazou,
4ac4fd
  PR optimization/12799, #169654)
4ac4fd
- don't assume hard frame pointer register is STACK_BOUNDARY aligned
4ac4fd
  if frame pointer isn't used and the register has been reused
4ac4fd
  for something else (Eric Botcazou, PR optimization/13041, #169845)
4ac4fd
- fix libstdc++ seekoff bug (Scott Snyder, #151692, IT#66065,
4ac4fd
  PR libstdc++/9659)
4ac4fd
- don't use .symver directives in libstdc++.a, instead
4ac4fd
  provide hidden aliases for the obsolete symbols (#151732, IT#64710)
4ac4fd
- fix a strength reduction bug (Jan Hubicka, #149250, IT#66328)
4ac4fd
- fix xchgb constraints on i386 (#156104, IT#69633, PR target/19005)
4ac4fd
- change __cxa_demangle to match cxx-abi change
4ac4fd
  http://www.codesourcery.com/archives/cxx-abi-dev/msg01877.html
4ac4fd
  (Jason Merrill, #133406)
4ac4fd
- fix ICE on invalid use of template without arguments as primary
4ac4fd
  expression (Mark Mitchell, #149492, PR c++/10558)
4ac4fd
- fix c++filt/__cxa_demangle segfault on invalidly mangled names
4ac4fd
  generated by G++ 3.4 (Ian Lance Taylor, #145781, PR c++/16240)
4ac4fd
- disable os_defines.h changes introduced in 3.2.3-45 for non-GCC
4ac4fd
  compilers (#144725, #146196)
4ac4fd
- fix debugging information in in-charge constructors and
4ac4fd
  destructors (Mark Mitchell, #146416, PR debug/11098)
4ac4fd
- fix delete_null_pointer_checks on non-cc0 targets (Alan Modra, #141694,
4ac4fd
  IT#54408, PR rtl-optimization/14279)
4ac4fd
- fix some reload related issues on ppc64 (David Edelsohn, #139099,
4ac4fd
  IT#45622, PRs target/16239, target/8480, optimization/8328)
4ac4fd
- fix ICE in regenerate_decl_from_template (Mark Mitchell, #142418,
4ac4fd
  PR c++/7053)
4ac4fd
- fix ICE when printing jump to case label... crosses initialization
4ac4fd
  warning (Gabriel Dos Reis, #140830, PR c++/7566)
4ac4fd
- fix corner case in passing by invisible reference (Alexandre Oliva,
4ac4fd
  IT#54891, #141270)
4ac4fd
- fix ICE on code that uses value of reference in reference's initializer
4ac4fd
  (Alexandre Oliva, #141274, IT#36304)
4ac4fd
- avoid moving jumptable away from corresponding jump even if there is an
4ac4fd
  intervening barrier (Josef Zlomek, #131378)
4ac4fd
- with -D_GLIBCXX_FULLY_DYNAMIC_STRING, STL should now avoid
4ac4fd
  _S_empty_rep_storage (Paolo Carlini, #131030, IT#45103, PR libstdc++/16612)
4ac4fd
- document -Winline only works for languages that use RTL inliner (Java,
4ac4fd
  Ada, #141272, IT#28331)
4ac4fd
4ac4fd
* Tue Mar  8 2005 Jakub Jelinek  <jakub@redhat.com> 3.2.3-47.fc4
4ac4fd
- new compatibility package