%if %{_arch} != %{_build_arch}
%define cross_compile 1
%else
%define cross_compile 0
%endif
%{?do_cross_compile:%define cross_compile 1}

# Define march to 1 to enable the mips -march patch.
%define march 1

# Define merge to 1 to enable SHF_MERGE.
%define merge 1
Patch2: gcc-new-abi.patch
Patch4: gcc-c++-typedef.patch
Patch5: gcc-no-warn-trigraphs.patch
Patch6: gcc-incomplete-struct.patch
Patch8: gcc-libstdc++-v3-wnoerror.patch
Patch9: gcc-string-crash.patch
Patch10: gcc-sparc64-subreg-byte.patch
Patch11: gcc-sparc64-reload.patch
Patch12: gcc-sparc64-startfile.patch
Patch13: gcc-sparc64-decloffset.patch
Patch14: gcc-sparc64-uname.patch
Patch15: gcc-sparc32-vaarg.patch
Patch16: gcc-sparc64-hwint.patch
Patch18: gcc-java-jword.patch
Patch19: gcc-align-memcpy.patch
Patch20: gcc-sparcv9-hack.patch
Patch21: gcc-stmtexpr.patch
Patch22: gcc-sparc32-hack.patch
Patch23: gcc-sparc32-hack2.patch
Patch25: gcc-clear-hack.patch
Patch28: gcc-loop.patch
Patch29: gcc-alpha-addressof.patch
Patch31: gcc-regmove-asm.patch
Patch33: gcc-cpplib.patch
Patch35: gcc-cpp0.patch
Patch36: gcc-canon-cond.patch
Patch37: gcc-bogus-subreg.patch
Patch38: gcc-cp-ii.patch
Patch39: gcc-subreg-gcse.patch
Patch40: gcc-subregbyte-gcse.patch
Patch41: gcc-combine-comparison.patch
Patch42: gcc-loop-noopt.patch
Patch43: gcc-loop-unroll.patch
Patch44: gcc-loop-test1.patch
Patch45: gcc-loop-test2.patch
Patch46: gcc-loop-scanloop.patch
Patch48: gcc-i386-ashlsilea.patch
Patch49: gcc-i386-lea.patch
Patch50: gcc-lowpart-test.patch
Patch51: gcc-loop-noopt2.patch
Patch52: gcc-i386-sibcall.patch
Patch53: gcc-cpp-warn.patch
Patch54: gcc-wint_t.patch
Patch55: gcc-format-checking.patch
Patch56: gcc-strftime.patch
Patch57: gcc-xopen.patch
Patch58: gcc-c99.patch
Patch59: gcc-iso-not-ansi.patch
Patch60: gcc-sibcall.patch
Patch61: gcc-Os-testcase.patch
Patch62: gcc-java-misc.patch
Patch63: gcc-java-bytecode.patch
Patch64: gcc-java-pg.patch
Patch65: gcc-commutative.patch
Patch66: gcc-relational.patch
Patch67: gcc-f-include.patch
Patch68: gcc-unroll.patch
Patch69: gcc-i386-strops.patch
Patch70: gcc-simplify-relational.patch
Patch71: gcc-alias.patch
Patch72: gcc-jsm1.patch
Patch73: gcc-jsm2.patch
Patch74: gcc-jsm3.patch
Patch75: gcc-scanf.patch
Patch76: gcc-jsm4.patch
Patch77: gcc-jsm5.patch
Patch78: gcc-jsm6.patch
Patch79: gcc-jsm7.patch
Patch80: gcc-jsm8.patch
Patch81: gcc-loop-hack.patch
Patch82: gcc-cpp-warnpaste.patch
Patch83: gcc-float-condmove.patch
Patch84: gcc-i386-call.patch
Patch85: gcc-i386-call2.patch
Patch86: gcc-i386-call-test.patch
Patch87: gcc-i386-arith.patch
Patch88: gcc-i386-ge_geu.patch
Patch89: gcc-i386-gotoff.patch
Patch90: gcc-java-catchup.patch
Patch91: gcc-java-no-super-layout.patch
Patch92: gcc-make-extraction.patch
Patch93: gcc-segv1.patch
Patch94: gcc-segv2.patch
Patch95: gcc-sparc-copy-leaf-remappable.patch
Patch96: gcc-wchar-const.patch
Patch97: gcc-libio.patch
Patch98: gcc-alpha-tune.patch
Patch99: gcc-alpha-unaligned.patch
Patch100: gcc-cpp-warnpaste2.patch
Patch101: gcc-loop-giv.patch
Patch102: gcc-real-value.patch
Patch103: gcc-sparc-const-pool.patch
Patch104: gcc-sparc64-timode.patch
Patch105: gcc-callersave-segv.patch
Patch106: gcc-libio-printf_fp.patch
Patch107: gcc-pt-enum.patch
Patch108: gcc-sparc-pic.patch
Patch109: gcc-subreg-byte-expmed.patch
Patch110: gcc-test-991206-1.patch
Patch111: gcc-alpha-mi-thunk.patch
Patch112: gcc-c++-pmf.patch
Patch113: gcc-f77-fdebug.patch
Patch114: gcc-libio-endl.patch
Patch115: gcc-i386-compare-test.patch
Patch116: gcc-sparc-may-trap.patch
Patch117: gcc-sparc-mi-thunk.patch
Patch118: gcc-c++-inline16-test.patch
Patch119: gcc-c++-named-return-value.patch
Patch120: gcc-c++-walk-tree.patch
Patch121: gcc-i386-reload-test.patch
Patch122: gcc-i386-reload.patch
Patch123: gcc-sibcall-unchanging.patch
Patch124: gcc-segv3.patch
Patch125: gcc-c++-crash24.patch
Patch126: gcc-do-store-flag.patch
Patch127: gcc-i386-address-cost.patch
Patch128: gcc-i386-arith2.patch
Patch129: gcc-i386-constraint-N.patch
Patch130: gcc-incomplete-aggregate-alias.patch
Patch131: gcc-sibcall-eh2.patch
Patch132: gcc-cpp-assert-crash.patch
Patch133: gcc-c++-undefined-method.patch
Patch134: gcc-sparc-4096.patch
Patch135: gcc-sparc64-reload-test.patch
Patch136: gcc-sparc64-reload2.patch
Patch137: gcc-subreg-byte-operand-subword.patch
Patch139: gcc-c++-static-class.patch
Patch140: gcc-c++-testset1.patch
Patch141: gcc-c++-testset2.patch
Patch142: gcc-place-field.patch
Patch143: gcc-sparc-output-formatting.patch
Patch144: gcc-sparc64-mi-thunk.patch
Patch145: gcc-sparc64-namedret.patch
Patch146: gcc-sparc64-nested-fn.patch
Patch147: gcc-c++-ice.patch
Patch148: gcc-alpha-fold-const.patch
Patch149: gcc-alpha-recog.patch
Patch150: gcc-c++-pointer-to-member-test.patch
Patch151: gcc-c++-sizetype.patch
Patch152: gcc-cpp-64k.patch
Patch153: gcc-cpp-empty-header.patch
Patch154: gcc-i386-regelim.patch
Patch155: gcc-sparc-builtin-setjmp.patch
Patch156: gcc-test-loop-7.patch
Patch157: gcc-c++-dump-expr.patch
Patch158: gcc-c++-inline-cmp.patch
Patch159: gcc-c++-inline-return.patch
Patch160: gcc-c++-label-scope.patch
Patch161: gcc-c++-ptm.patch
Patch162: gcc-c++-qual-error.patch
Patch163: gcc-const-fold.patch
Patch164: gcc-cpp-error-directive.patch
Patch165: gcc-i386-truncxfsf.patch
Patch166: gcc-integrate-clobber.patch
Patch167: gcc-libf2c-mkstemp.patch
Patch168: gcc-local-alloc.patch
Patch169: gcc-loop-hoistmem.patch
Patch170: gcc-sibcall-const.patch
Patch171: gcc-sibcall-emit-queue.patch
Patch172: gcc-unroll-iterations.patch
Patch173: gcc-volatile-local-var.patch
Patch174: gcc-c++-sizetype2.patch
Patch175: gcc-error-diagnostic.patch
Patch176: gcc-aggregate-mode.patch
Patch177: gcc-c++-addressof.patch
Patch178: gcc-aggregate-mode2.patch
Patch179: gcc-c++-addressof2.patch
Patch180: gcc-c++-inline-cmp2.patch
Patch181: gcc-cpp-fno-operator-names.patch
Patch182: gcc-c++-ggc-input.patch
Patch183: gcc-alpha-unaligned2.patch
Patch184: gcc-alpha-ze_and_ne.patch
Patch185: gcc-c++-wchar_t.patch
Patch186: gcc-cpp-arg-loop.patch
Patch187: gcc-cpp-fno-operator-names2.patch
Patch188: gcc-cpp-g3.patch
Patch189: gcc-fshort-wchar.patch
Patch190: gcc-max-strlen.patch
Patch191: gcc-stabs.patch
Patch192: gcc-subreg-byte-gcse2.patch
Patch193: gcc-tradcpp-MD.patch
Patch194: gcc-alpha-expand-block-move.patch
Patch195: gcc-c++-decl-needed.patch
Patch196: gcc-c++-nomods_initdcl0.patch
Patch197: gcc-cpp-MD.patch
Patch198: gcc-fixup-var-refs.patch
Patch199: gcc-frame-related.patch
Patch200: gcc-i386-cmpqi.patch
Patch201: gcc-i386-const-call-address.patch
Patch202: gcc-i386-fcmov.patch
Patch203: gcc-i386-sar.patch
Patch204: gcc-c++-extern-c.patch
Patch205: gcc-c++-inline-static.patch
Patch206: gcc-c++-inline-static2.patch
Patch207: gcc-cpp-M-include.patch
Patch208: gcc-integrate-compare.patch

Source209: gcc-cpp-20010126.tar.bz2
Patch209: gcc-cpp-20010126.patch
Patch210: gcc-objc-cpp-lineno.patch
Patch211: gcc-cpp-paste-avoid.patch
Patch212: gcc-cpp-paste-avoid2.patch

Patch213: gcc-c++-inline-modify_expr.patch
Patch214: gcc-i386-testqi_1.patch
Patch215: gcc-c++-anon-union.patch
Patch216: gcc-extract_bit_field.patch
Patch217: gcc-c++-overload-warn.patch
Patch218: gcc-cpp-implicit-extern-c.patch
Patch219: gcc-cpp-paste-avoid3.patch
Patch220: gcc-packed-enum-bitfield.patch
Patch221: gcc-variable-size.patch

# ia64 jumbo patch
Patch222: gcc-ia64.patch.bz2
Patch223: gcc-ia64-errata.patch

Patch224: gcc-cpp-defined-diag.patch
Patch225: gcc-cpp-paste-avoid4.patch
Patch226: gcc-dwarf2out-ice.patch
Patch227: gcc-g++.jason-2371.patch
Patch228: gcc-lex-line.patch
Patch229: gcc-alpha-unaligned3.patch
Patch230: gcc-consistency-test.patch
Source230: gcc-consistency-test.tar.bz2
Patch231: gcc-nested-parm.patch
Patch232: gcc-alpha-reload.patch
Patch233: gcc-alpha-shift.patch
Patch234: gcc-c++-init-copy-aggr.patch
Patch235: gcc-c++-inline-loop.patch
Patch236: gcc-c++-lookup.patch
Patch237: gcc-c++-taking-address-error.patch
Patch238: gcc-objc-gc.patch
Patch239: gcc-objc-test.patch
Patch240: gcc-reload-hardreg-free.patch
Patch241: gcc-cpp-20010222.patch
Patch242: gcc-expr-safety.patch
Patch243: gcc-debug-static-local.patch
Patch244: gcc-fixup-var-refs2.patch
Patch245: gcc-fold-const-div.patch
Patch246: gcc-g77-unused.patch
Patch247: gcc-ia64-flushrs.patch
Patch248: gcc-ia64-syscall-linkage.patch
Patch249: gcc-recog-addressof.patch
Patch250: gcc-cpp-20010309.patch
Patch251: gcc-cant-combine.patch
Patch252: gcc-i386-crtendS.patch
Patch253: gcc-reg-stack-clobber.patch
Patch254: gcc-reg-stack.patch
Patch255: gcc-store-expr.patch
Patch256: gcc-target-expr.patch
Patch257: gcc-c++-anonaggr-copy.patch
Patch258: gcc-c++-asmspec.patch
Patch259: gcc-c++-static-local.patch
Patch260: gcc-f77-line.patch
Patch261: gcc-libstdc++-getline.patch
Patch262: gcc-no-new-abi.patch
Patch263: gcc-regrename.patch
Patch264: gcc-subreg-byte-gcse3.patch
Patch265: gcc-wshadow-doc.patch
Patch266: gcc-c++-D__EXCEPTIONS.patch
Patch267: gcc-c++-throttle-inline.patch
Patch268: gcc-fold-pointer-cmp.patch
Patch269: gcc-ifcvt-strict-low-part.patch
Patch270: gcc-gcse-reg-equiv.patch
Patch271: gcc-null-pointer-check.patch
Patch272: gcc-local-inline.patch
Patch273: gcc-cpp-Wcomment.patch
Patch274: gcc-cselib-mode.patch
Patch275: gcc-dwarf2-O0-crash.patch
Patch276: gcc-dwarf2out-splice-child.patch
Patch277: gcc-i386-movcc.patch
Patch278: gcc-ia64-xdata.patch
Patch279: gcc-subregbyte-hard-regno.patch
Patch280: gcc-tradtradcpp0.patch
Patch281: gcc-flow-autoinc.patch
Patch282: gcc-ia64-constconst.patch
Patch283: gcc-ia64-G.patch
Patch284: gcc-integrate-error.patch
Patch285: gcc-MD-nodot.patch
Patch286: gcc-store-constructor-field.patch
Patch287: gcc-ia64-except.patch
Patch288: gcc-ia64-loc79.patch
Patch289: gcc-ia64-bstep.patch
Patch290: gcc-c++-templ-arg.patch
Patch291: gcc-frame-state-for-compat.patch
Patch292: gcc-sibcall-catch.patch
Patch293: gcc-tradcpp-define.patch
Patch294: gcc-c++-inline-method.patch
Patch295: gcc-gcse-trapping.patch
Patch296: gcc-nested-expr-stmt.patch
Patch297: gcc-__NO_INLINE__.patch
Patch298: gcc-bogus-inline.patch
Patch299: gcc-c++-defarg.patch
Patch300: gcc-c++-instantiate.patch
Patch301: gcc-c++-static-ctordtor.patch
Patch302: gcc-c++-templ-arg2.patch
Patch303: gcc-c++-ucs.patch
Patch304: gcc-fsyntax-only.patch
Patch305: gcc-g77-unsigned-char.patch
Patch306: gcc-hash-ident.patch
Patch307: gcc-jump-threading.patch
Patch308: gcc-regmove-unchanging.patch
Patch309: gcc-ia64-complex-float.patch
Patch310: gcc-ia64-movcc-fail.patch
Patch311: gcc-ia64-stop-bit.patch
Patch312: gcc-c++-friend.patch
Patch313: gcc-i386-stack-adjust.patch
Patch314: gcc-SHF_MERGE.patch
Patch315: gcc-dwarf2-filenames.patch
Patch316: gcc-k6-loop.patch
Patch317: gcc-libobjc-3.0.patch
Patch318: gcc-texinfo-texconfig.patch
Patch319: gcc-c++-complext.patch
Patch320: gcc-c++-conv-cv-ptr.patch
Patch321: gcc-c++-sstream-warn.patch
Patch322: gcc-f77-ffixed.patch
Patch323: gcc-invalid-stabs.patch
Patch324: gcc-libio-test.patch
Patch325: gcc-alpha-function-sections.patch
Patch326: gcc-alpha-vtable-gc.patch
Patch327: gcc-c++-anontypename.patch
Patch328: gcc-c++-array-cast.patch
Patch329: gcc-c++-colonequal.patch
Patch330: gcc-c++-cond-ovl.patch
Patch331: gcc-c++-weak-address.patch
Patch332: gcc-libio-input-float.patch
Patch333: gcc-subreg-byte-stabs.patch
Patch334: gcc-c++-array-side-effects.patch
Patch335: gcc-cpp-memleak.patch
Patch336: gcc-c++-template-throw.patch
Patch337: gcc-c++-tsubst-friend-class.patch
Patch338: gcc-dwarf2-debug-line.patch
Patch339: gcc-ifcvt-eh.patch
Patch340: gcc-ia64-vararg.patch
Patch341: gcc-gcse-hoist.patch
Patch342: gcc-ia64-eh.patch
Patch343: gcc-libio-stdstream-offset.patch
Patch344: gcc-objc-class-ref.patch
Patch345: gcc-tail-recurse.patch
Patch346: gcc-c++-sstream-seek.patch
Patch347: gcc-loop-combine-givs.patch

Patch500: gcc-libg++-config.patch
%if %{LIBGXX}
Patch501: ftp://gcc.gnu.org/pub/gcc/infrastructure/libg++-2.8.1.3-20000312.diff.gz
Patch502: ftp://gcc.gnu.org/pub/gcc/infrastructure/libg++-2.8.1.3-20000419.diff.gz
Patch503: ftp://gcc.gnu.org/pub/gcc/infrastructure/libg++-2.8.1.3-20000816.diff.gz
%endif

Patch1000: gcc-3.0-libf2c-shell.patch
Patch1002: gcc-3.0-cross.patch
Patch1003: gcc-2.96-glibc-2.2.patch
Patch1004: gcc-2.96-fix-header.patch
Patch1005: gcc-2.96-as-SHF_MERGE.patch
Patch1006: gcc-3.0-tcl-8.x.patch
Patch1007: gcc-2.96-build-cflags.patch
Patch1008: gcc-2.96-parallel.patch
Patch1009: gcc-2.96-c++-template.patch
Patch1010: gcc-2.96-subreg.patch
Patch2000: gcc-3.0-doloop.patch
Patch3000: gcc-2.96-mips.patch
Patch3001: gcc-2.96-mips-type.patch
Patch3002: gcc-2.96-mips-fp.patch
Patch3003: gcc-2.96-mips-reload.patch
Patch3004: gcc-2.96-mips-ident.patch
Patch3005: gcc-2.96-mips-stabs.patch
Patch4000: gcc-2.96-iris6-weak.patch
Patch4001: gcc-2.96-mips-call.patch
Patch4002: gcc-2.96-iris6-size.patch
Patch4003: gcc-2.96-iris6-pthread.patch
Patch4004: gcc-2.96-mips-except.patch
Patch4005: gcc-2.96-mips-invert.patch
Patch4006: gcc-2.96-mips-ascii.patch
Patch5000: gcc-2.96-mips-march.patch
Patch5001: gcc-2.96-mips-mcpu.patch
Patch5002: gcc-2.96-mips-r10k.patch
Patch6000: gcc-2.96-mips-SHF_MERGE.patch

URL: http://gcc.gnu.org
BuildRoot: /var/tmp/gcc-root
%if !%{gcconly}
Obsoletes: egcs
%ifarch sparc sparc64
Obsoletes: egcs64
%endif
%endif
BuildRequires: binutils >= 2.11.90.0.32-1
BuildRequires: zlib-devel
Requires: binutils >= 2.11.90.0.32-1
%{expand: %%{global} _gcc_is_%{_target_cpu} %%{nil}}
%{?_gcc_is_sparc: %global gcc_target_platform sparc64-redhat-linux}
%{!?_gcc_is_sparc: %global gcc_target_platform %{_target_platform}}
%if !%{gcconly}
Requires: cpp = %{version}-%{release}
%endif
Requires: glibc-devel
Prereq: /sbin/install-info

%description
The gcc package contains the GNU Compiler Collection: cc and gcc. You'll need
this package in order to compile C/C++ code.

%package c++
Summary: C++ support for gcc
Obsoletes: egcs-c++
Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: cpp = %{version}-%{release}
Requires: libstdc++ = %{version}
Requires: libstdc++-devel = %{version}

%description c++
This package adds C++ support to the GNU C compiler. It includes support
for most of the current C++ specification, including templates and
exception handling. It does include the static standard C++
library and C++ header files; the library for dynamically linking
programs is available separately.

%package -n libstdc++
Summary: GNU c++ library
Group: System Environment/Libraries
Obsoletes: gcc-libstdc++

%description -n libstdc++
The libstdc++ package contains a snapshot of the GCC Standard C++
Library v3, an ongoing project to implement the ISO 14882 Standard C++
library.

%package -n libstdc++-devel
Summary: Header files and libraries for C++ development
Group: Development/Libraries
Obsoletes: gcc-libstdc++-devel
Requires: libstdc++ = %{version}-%{release}

%description -n libstdc++-devel
This is the GNU implementation of the standard C++ libraries.  This
package includes the header files and libraries needed for C++
development. This includes SGI's implementation of the STL.

%if %{LIBGXX}
%package -n libg++
Summary: Older GNU c++ library
Group: System Environment/Libraries

%description -n libg++
The libg++ package contains the now obsoleted GNU C++ library, which
is an attempt to provide a variety of C++ programming tools and other
support to GNU C++ programmers.
Since this package is now obsolete, please use it for old projects
only, and make sure to use only libstdc++ in newer projects!

%package -n libg++-devel
Summary: Header files and libraries for C++ development (libg++)
Group: Development/Libraries

%description -n libg++-devel
This is the GNU C++ library libg++, which has been obsoleted by
libstdc++ now.  This package includes the header files and libraries
needed for C++ development.
%endif

%package objc
Summary: Objective C support for gcc
Group: Development/Languages
Requires: gcc = %{version}-%{release}
Obsoletes: egcs-objc

%description objc
gcc-objc provides Objective C support for the GNU C compiler (gcc).
Mainly used on systems running NeXTSTEP, Objective C is an
object-oriented derivative of the C language.

Install gcc-objc if you are going to do Objective C development and
you would like to use the gcc compiler.  You'll also need gcc.

%package g77
Summary: Fortran 77 support for gcc
Group: Development/Languages
Requires: gcc = %{version}-%{release}
Obsoletes: egcs-g77

%description g77
The gcc-g77 package provides support for compiling Fortran 77
programs with the GNU gcc compiler.

You should install gcc-g77 if you are going to do Fortran development
and you would like to use the gcc compiler.  You will also need gcc.

%package chill
Summary: CHILL support for gcc
Group: Development/Languages
Requires: gcc = %{version}-%{release}
Obsoletes: gcc-CHILL

%description chill
This package adds support for compiling CHILL programs with the GNU
compiler.

Chill is the "CCITT High-Level Language", where CCITT is the old
name for what is now ITU, the International Telecommunications Union.
It is is language in the Modula2 family, and targets many of the
same applications as Ada (especially large embedded systems).
Chill was never used much in the United States, but is still
being used in Europe, Brazil, Korea, and other places.

%package java
Summary: Java support for gcc
Group: Development/Languages
Requires: gcc = %{version}-%{release}, libgcj >= %{version}, libgcj-devel >= %{version}

%description java
This package adds experimental support for compiling Java(tm) programs and
bytecode into native code. To use this you will also need the libgcj and
libgcj-devel packages.

%package sparc32
Summary: The C compiler optimized for generating SPARC 32bit code
Group: Development/Languages
Requires: gcc = %{version}-%{release}, %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a

%description sparc32
This package contains the GNU C compiler which only supports generating 32bit
SPARC code, but should be faster than the 32/64bit gcc package. You should
install this package if you want to trade disk space required for this
package for faster compilation of 32bit code.

%package c++-sparc32
Summary: The C++ compiler optimized for generating SPARC 32bit code
Group: Development/Languages
Requires: gcc-c++ = %{version}-%{release}, %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libstdc++.so

%description c++-sparc32
This package contains the GNU C++ compiler which only supports generating
32bit SPARC code, but should be faster than the 32/64bit gcc package. You
should install this package if you want to trade disk space required for
this package for faster compilation of 32bit code.

%package -n cpp
Summary: The C Preprocessor.
Group: Development/Languages
Prereq: /sbin/install-info
%ifarch ia64
Obsoletes: gnupro
%endif

%description -n cpp
Cpp is the GNU C-Compatible Compiler Preprocessor.
Cpp is a macro processor which is used automatically
by the C compiler to transform your program before actual
compilation. It is called a macro processor because it allows
you to define macros, abbreviations for longer
constructs.

The C preprocessor provides four separate functionalities: the
inclusion of header files (files of declarations that can be
substituted into your program); macro expansion (you can define macros,
and the C preprocessor will replace the macros with their definitions
throughout the program); conditional compilation (using special
preprocessing directives, you can include or exclude parts of the
program according to various conditions); and line control (if you use
a program to combine or rearrange source files into an intermediate
file which is then compiled, you can use line control to inform the
compiler about where each source line originated).

You should install this package if you are a C programmer and you use
macros.

%prep
%setup -q -n gcc-%{gcc_version}-%{DATE}
%patch10 -p0 -b .sparc
%patch11 -p0 -b .sparc1
%patch12 -p0 -b .sparc2
%patch13 -p0 -b .sparc3
%patch14 -p0 -b .sparc4
%patch15 -p0 -b .sparc5
%patch16 -p0 -b .sparc6
%patch18 -p0 -b .jword
%patch19 -p0 -b .memcpy
%patch20 -p0 -b .sparcv9
%if %{LIBSTDCXX_V3}
%patch2 -p0 -b .new_abi
%endif
%patch4 -p0 -b .typedef
%patch5 -p0 -b .trigraph
%patch6 -p0 -b .incompl
%patch8 -p0 -b .wnoerror
%patch9 -p0 -b .stringcrash
%patch21 -p0 -b .stmtexpr
%ifarch sparc
%patch22 -p0 -b .sparc32hack
if [ ! -f /usr/lib64/crt1.o ]; then
%patch23 -p0 -b .sparc32hack2
fi
%endif
%patch25 -p0 -b .hack
%patch28 -p0 -b .loop
%patch29 -p0 -b .addressof
%patch31 -p0 -b .regmoveasm
%patch33 -p0 -b .cpplib
%patch35 -p0 -b .cpp0
%patch36 -p0 -b .canoncond
%patch37 -p0 -b .bogussubreg
%patch38 -p0 -b .cpii
%patch39 -p0 -b .subreggcse
%patch40 -p0 -b .subregbytegcse
%patch41 -p0 -b .combinecomparison
%patch42 -p0 -b .loopnoopt
%patch43 -p0 -b .loopunroll
%patch44 -p0 -b .looptest1
%patch45 -p0 -b .looptest2
%patch46 -p0 -b .loopscanloop
%patch48 -p0 -b .ashlsilea
%patch49 -p0 -b .lea
%patch50 -p0 -b .lowparttest
%patch51 -p0 -b .loopnoopt2
%patch52 -p0 -b .i386sib
%patch53 -p0 -b .cppwarn
%patch54 -p0 -b .wintt
%patch55 -p0 -b .fmtchk
%patch56 -p0 -b .strftime
%patch57 -p0 -b .xopen
%patch58 -p0 -b .c99std
%patch59 -p0 -b .iso-not-ansi
%patch60 -p0 -b .sibcall
%patch61 -p0 -b .ostest
%patch62 -p0 -b .java-misc
%patch63 -p0 -b .java-bytecode
%patch64 -p0 -b .java-pg
# These two are buggy
#%patch65 -p0 -b .cmtable
#%patch66 -p0 -b .relational
%patch67 -p0 -b .finclude
%patch68 -p0 -b .unroll
%patch69 -p0 -b .i386-strops
%patch70 -p0 -b .simplify-rela
%patch71 -p0 -b .alias
%patch72 -p0 -b .jsm1
%patch73 -p0 -b .jsm2
%patch74 -p0 -b .jsm3
%patch75 -p0 -b .scanf
%patch76 -p0 -b .jsm4
%patch77 -p0 -b .jsm5
%patch78 -p0 -b .jsm6
%patch79 -p0 -b .jsm7
%patch80 -p0 -b .jsm8
%patch81 -p0 -b .loop-hack
%patch82 -p0 -b .cpp-warnpaste
%patch83 -p0 -b .float-condmove
%patch84 -p0 -b .i386-call
%patch85 -p0 -b .i386-call2
%patch86 -p0 -b .i386-call-test
%patch87 -p0 -b .i386-arith
%patch88 -p0 -b .i386-ge_geu
%patch89 -p0 -b .i386-gotoff
%patch90 -p0 -b .java-catchup
%patch91 -p0 -b .java-no-super-layout
%patch92 -p0 -b .make-extraction
%patch93 -p0 -b .segv1
%patch94 -p0 -b .segv2
%patch95 -p0 -b .copy-leaf-remap
%patch96 -p0 -b .wchar-const
%patch97 -p0 -b .libio
%patch98 -p0 -b .alpha-tune
%patch99 -p0 -b .alpha-unaligned
%patch100 -p0 -b .cpp-warnpaste2
%patch101 -p0 -b .loop-giv
%patch102 -p0 -b .real-value
%patch103 -p0 -b .sparc-const-pool
%patch104 -p0 -b .sparc64-timode
%patch105 -p0 -b .callersave-segv
%patch106 -p0 -b .libio-printf_fp
%patch107 -p0 -b .pt-enum
%patch108 -p0 -b .sparc-pic
%patch109 -p0 -b .subreg-byte-expmed
%patch110 -p0 -b .test-991206-1
%patch111 -p0 -b .alpha-mi-thunk
%patch112 -p0 -b .c++-pmf
%patch113 -p0 -b .f77-fdebug
%patch114 -p0 -b .libio-endl
%patch115 -p0 -b .i386-compare-test
%patch116 -p0 -b .sparc-may-trap
%patch117 -p0 -b .sparc-mi-thunk
%patch118 -p0 -b .c++-inline16-test
%patch119 -p0 -b .c++-named-return-value
%patch120 -p0 -b .c++-walk-tree
%patch121 -p0 -b .i386-reload-test
%patch122 -p0 -b .i386-reload
%patch123 -p0 -b .sibcall-unchanging
%patch124 -p0 -b .segv3
%patch125 -p0 -b .c++-crash24
%patch126 -p0 -b .do-store-flag
%patch127 -p0 -b .i386-address-cost
%patch128 -p0 -b .i386-arith2
%patch129 -p0 -b .i386-constraint-N
%patch130 -p0 -b .incomplete-aggregate-alias
%patch131 -p0 -b .sibcall-eh2
%patch132 -p0 -b .cpp-assert-crash
%patch133 -p0 -b .c++-undefined-method
%patch134 -p0 -b .sparc-4096
%patch135 -p0 -b .sparc64-reload-test
%patch136 -p0 -b .sparc64-reload2
%patch137 -p0 -b .subreg-byte-operand-subword
%patch139 -p0 -b .c++-static-class
%patch140 -p0 -b .c++-testset1
%patch141 -p0 -b .c++-testset2
%patch142 -p0 -b .place-field
%patch143 -p0 -b .sparc-output-formatting
%patch144 -p0 -b .sparc64-mi-thunk
%patch145 -p0 -b .sparc64-namedret
%patch146 -p0 -b .sparc64-nested-fn
%patch147 -p0 -b .c++-ice
%patch148 -p0 -b .alpha-fold-const
%patch149 -p0 -b .alpha-recog
%patch150 -p0 -b .c++-pointer-to-member-test
%patch151 -p0 -b .c++-sizetype
%patch152 -p0 -b .cpp-64k
%patch153 -p0 -b .cpp-empty-header
%patch154 -p0 -b .i386-regelim
%patch155 -p0 -b .sparc-builtin-setjmp
%patch156 -p0 -b .test-loop-7
%patch157 -p0 -b .c++-dump-expr
%patch158 -p0 -b .c++-inline-cmp
%patch159 -p0 -b .c++-inline-return
%patch160 -p0 -b .c++-label-scope
%patch161 -p0 -b .c++-ptm
%patch162 -p0 -b .c++-qual-error
%patch163 -p0 -b .const-fold
%patch164 -p0 -b .cpp-error-directive
%patch165 -p0 -b .i386-truncxfsf
%patch166 -p0 -b .integrate-clobber
%patch167 -p0 -b .libf2c-mkstemp
%patch168 -p0 -b .local-alloc
%patch169 -p0 -b .loop-hoistmem
%patch170 -p0 -b .sibcall-const
%patch171 -p0 -b .sibcall-emit-queue
%patch172 -p0 -b .unroll-iterations
%patch173 -p0 -b .volatile-local-var
%patch174 -p0 -b .c++-sizetype2
%patch175 -p0 -b .error-diagnostic
%patch176 -p0 -b .aggregate-mode
%patch177 -p0 -b .c++-addressof
%patch178 -p0 -b .aggregate-mode2
%patch179 -p0 -b .c++-addressof2
%patch180 -p0 -b .c++-inline-cmp2.patch
%patch181 -p0 -b .cpp-fno-operator-names
%patch182 -p0 -b .c++-ggc-input
%patch183 -p0 -b .alpha-unaligned2
%patch184 -p0 -b .alpha-ze_and_ne
%patch185 -p0 -b .c++-wchar_t
%patch186 -p0 -b .cpp-arg-loop
%patch187 -p0 -b .cpp-fno-operator-names2
%patch188 -p0 -b .cpp-g3
%patch189 -p0 -b .fshort-wchar
%patch190 -p0 -b .max-strlen
%patch191 -p0 -b .stabs
%patch192 -p0 -b .subreg-byte-gcse2
%patch193 -p0 -b .tradcpp-MD
%patch194 -p0 -b .alpha-expand-block-move
%patch195 -p0 -b .c++-decl-needed
%patch196 -p0 -b .c++-nomods_initdcl0
%patch197 -p0 -b .cpp-MD
%patch198 -p0 -b .fixup-var-refs
%patch199 -p0 -b .frame-related
%patch200 -p0 -b .i386-cmpqi
%patch201 -p0 -b .i386-const-call-address
%patch202 -p0 -b .i386-fcmov
%patch203 -p0 -b .i386-sar
%patch204 -p0 -b .c++-extern-c
%patch205 -p0 -b .c++-inline-static
%patch206 -p0 -b .c++-inline-static2
%patch207 -p0 -b .cpp-M-include
%patch208 -p0 -b .integrate-compare
# Put in cpp snapshot from 20010126
rm -rf gcc/testsuite/gcc.dg/cpp
tar x --bzip2 -f %{SOURCE209}
%patch209 -p0 -b .cpp-20010126
%patch210 -p0 -b .objc-cpp-lineno
%patch211 -p0 -b .cpp-paste-avoid
%patch212 -p0 -b .cpp-paste-avoid2
# Bug fixing continues
%patch213 -p0 -b .c++-inline-modify_expr
%patch214 -p0 -b .i386-testqi_1
%patch215 -p0 -b .c++-anon-union
%patch216 -p0 -b .extract_bit_field
%patch217 -p0 -b .c++-overload-warn
%patch218 -p0 -b .cpp-implicit-extern-c
%patch219 -p0 -b .cpp-paste-avoid3
%patch220 -p0 -b .packed-enum-bitfield
%patch221 -p0 -b .variable-size
%ifarch ia64
%patch222 -p0 -b .ia64
%patch223 -p0 -b .ia64-errata
%endif

%patch224 -p0 -b .cpp-defined-diag
%patch225 -p0 -b .cpp-paste-avoid4
%patch226 -p0 -b .dwarf2out-ice
%patch227 -p0 -b .g++.jason-2371
%patch228 -p0 -b .lex-line
%patch229 -p0 -b .alpha-unaligned3
tar x --bzip2 -f %{SOURCE230}
%patch230 -p0 -b .consistency
%patch231 -p0 -b .nested-parm
%patch232 -p0 -b .alpha-reload
%patch233 -p0 -b .alpha-shift
%patch234 -p0 -b .c++-init-copy-aggr
%patch235 -p0 -b .c++-inline-loop
%patch236 -p0 -b .c++-lookup
%patch237 -p0 -b .c++-taking-address-error
%patch238 -p0 -b .objc-gc
%patch239 -p0 -b .objc-test
%patch240 -p0 -b .reload-hardreg-free
%patch241 -p0 -b .cpp-20010222
%patch242 -p0 -b .expr-safety
%patch243 -p0 -b .debug-static-local
%patch244 -p0 -b .fixup-var-refs2
%patch245 -p0 -b .fold-const-div
%patch246 -p0 -b .g77-unused
%ifarch ia64
%patch247 -p0 -b .ia64-flushrs
%patch248 -p0 -b .ia64-syscall-linkage
%endif
%patch249 -p0 -b .recog-addressof
%patch250 -p0 -b .cpp-20010309
%patch251 -p0 -b .cant-combine
%patch252 -p0 -b .i386-crtendS
%patch253 -p0 -b .reg-stack-clobber
%patch254 -p0 -b .reg-stack
%patch255 -p0 -b .store-expr
%patch256 -p0 -b .target-expr
%patch257 -p0 -b .c++-anonaggr-copy
%patch258 -p0 -b .c++-asmspec
%patch259 -p0 -b .c++-static-local
%patch260 -p0 -b .f77-line
%patch261 -p0 -b .libstdc++-getline
%patch262 -p0 -b .no-new-abi
%patch263 -p0 -b .regrename
%patch264 -p0 -b .subreg-byte-gcse3
%patch265 -p0 -b .wshadow-doc
%patch266 -p0 -b .c++-D__EXCEPTIONS
%patch267 -p0 -b .c++-throttle-inline
%patch268 -p0 -b .fold-pointer-cmp
%patch269 -p0 -b .ifcvt-strict-low-part
%patch270 -p0 -b .gcse-reg-equiv
%patch271 -p0 -b .null-pointer-check
%patch272 -p0 -b .local-inline
%patch273 -p0 -b .cpp-Wcomment
%patch274 -p0 -b .cselib-mode
%patch275 -p0 -b .dwarf2-O0-crash
%patch276 -p0 -b .dwarf2out-splice-child
%patch277 -p0 -b .i386-movcc
%patch278 -p0 -b .ia64-xdata
%patch279 -p0 -b .subregbyte-hard-regno
%patch280 -p0 -b .tradtradcpp0
%patch281 -p0 -b .flow-autoinc
%patch282 -p0 -b .ia64-constconst
%patch283 -p0 -b .ia64-G
%patch284 -p0 -b .integrate-error
%patch285 -p0 -b .MD-nodot
%patch286 -p0 -b .store-constructor-field
%ifarch ia64
%patch287 -p0 -b .ia64-expect
%patch288 -p0 -b .ia64-loc79
# Add -mb-step automatically -- this will go away when production
# hardware is available.
%patch289 -p0 -b .ia64-bstep
%endif
%patch290 -p0 -b .c++-templ-arg
%patch291 -p0 -b .frame-state-for-compat
%patch292 -p0 -b .sibcall-catch
%patch293 -p0 -b .tradcpp-define
%patch294 -p0 -b .c++-inline-method
%patch295 -p0 -b .gcse-trapping
%patch296 -p0 -b .nested-expr-stmt
%patch297 -p0 -b .__NO_INLINE__
%patch298 -p0 -b .bogus-inline
%patch299 -p0 -b .c++-defarg
%patch300 -p0 -b .c++-instantiate
%patch301 -p0 -b .c++-static-ctordtor
%patch302 -p0 -b .c++-templ-arg2
%patch303 -p0 -b .c++-ucs
%patch304 -p0 -b .fsyntax-only
%patch305 -p0 -b .g77-unsigned-char
%patch306 -p0 -b .hash-ident
#%patch307 -p0 -b .jump-threading
%patch308 -p0 -b .regmove-unchanging
%ifarch ia64
%patch309 -p0 -b .ia64-complex-float
%patch310 -p0 -b .ia64-movcc-fail
%patch311 -p0 -b .ia64-stop-bit
%endif
%patch312 -p0 -b .c++-friend
%patch313 -p0 -b .i386-stack-adjust
%if %{merge}
%patch314 -p0 -b .SHF_MERGE
%endif
%patch315 -p0 -b .dwarf2-filenames
%patch316 -p0 -b .k6-loop
%patch317 -p0 -b .libobjc-3.0
%patch318 -p0 -b .texinfo-texconfig
%patch319 -p0 -b .c++-complext
%patch320 -p0 -b .c++-conv-cv-ptr
%patch321 -p0 -b .c++-sstream-warn
%patch322 -p0 -b .f77-ffixed
%patch323 -p0 -b .invalid-stabs
%patch324 -p0 -b .libio-test
%patch325 -p0 -b .alpha-function-sections
%patch326 -p0 -b .alpha-vtable-gc
%patch327 -p0 -b .c++-anontypename
%patch328 -p0 -b .c++-array-cast
%patch329 -p0 -b .c++-colonequal
%patch330 -p0 -b .c++-cond-ovl
%patch331 -p0 -b .c++-weak-address
%patch332 -p0 -b .libio-input-float
%patch333 -p0 -b .subreg-byte-stabs
%patch334 -p0 -b .c++-array-side-effects
%patch335 -p0 -b .cpp-memleak
%patch336 -p0 -b .c++-template-throw
%patch337 -p0 -b .c++-tsubst-friend-class
%patch338 -p0 -b .dwarf2-debug-line
%patch339 -p0 -b .ifcvt-eh
%patch340 -p0 -b .ia64-vararg
%patch341 -p0 -b .gcse-hoist
%ifarch ia64
%patch342 -p0 -b .ia64-eh
%endif
%patch343 -p0 -b .libio-stdstream-offset
%patch344 -p0 -b .objc-class-ref
%patch345 -p0 -b .tail-recurse
%patch346 -p0 -b .c++-sstream-seek
%patch347 -p0 -b .loop-combine-givs

%if %{LIBGXX}
%setup -q -D -T -a 1 -n gcc-%{gcc_version}-%{DATE}
mv libg++-2.8.1.3/* .
rmdir libg++-2.8.1.3
%patch500 -p0
%patch501 -p1
%patch502 -p1
%patch503 -p1
%endif

%patch1000 -p0 -b .libf2c
%patch1002 -p1 -b .cross
%patch1003 -p1 -b .glibc-2.2
%patch1004 -p0 -b .fix-header
%patch1005 -p0 -b .MS
%patch1006 -p0 -b .tcl
%patch1007 -p1 -b .build-cflags
%patch1008 -p0 -b .parallel
%patch1009 -p0 -b .template
%patch1010 -p0 -b .subreg

%ifnarch ia64
%patch2000 -p0 -b .doloop
%endif

%if %{merge}
%patch6000 -p0 -b .mips
%else
%patch3000 -p0 -b .mips
%endif
%patch3001 -p0 -b .type
%patch3002 -p0 -b .fp
%patch3003 -p0 -b .mips-reload
%patch3004 -p0 -b .ident
%patch3005 -p0 -b .stabs

%patch4000 -p0 -b .weak
%patch4001 -p0 -b .call
%patch4002 -p0 -b .size
%patch4003 -p0 -b .pthread
%patch4004 -p0 -b .except
%patch4005 -p0 -b .invert
%patch4006 -p0 -b .ascii

%if %{march}
%patch5000 -p0 -b .march
%patch5001 -p0 -b .mcpu
%patch5002 -p0 -b .r10k
%endif

(cd gcc; autoconf)

# Don't need it.
rm -rf texinfo

perl -pi -e 's/\(experimental\)/\(Red Hat Linux 7.1 %{gcc_version}-%{gcc_release}\)/' gcc/version.c gcc/f/version.c
perl -pi -e 's/#define GCCBUGURL.*$/#define GCCBUGURL "<URL:http:\/\/bugzilla.redhat.com\/bugzilla\/>"/' gcc/system.h

%build
rm -fr obj-%{gcc_target_platform}
mkdir obj-%{gcc_target_platform}
cd obj-%{gcc_target_platform}

CC=%{__cc}
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'`
%ifarch sparc sparc64
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g' -e 's/-m32//g' -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g'`
%endif
%ifarch ia64
# Add -mb-step automatically -- this will go away when production
# hardware is available.
OPT_FLAGS="$OPT_FLAGS -mb-step"
%endif
ENABLE_LIBSTDCXX_V3=
%if %{LIBSTDCXX_V3}
ENABLE_LIBSTDCXX_V3="--enable-libstdcxx-v3 --enable-new-gxx-abi --enable-long-long --enable-cshadow-headers --enable-namespaces"
%endif
%if %{cross_compile}
CROSS_BUILD_FLAGS="--target=%{gcc_target_platform} --build=%{_build_alias}"
%else
CROSS_BUILD_FLAGS=
%endif
CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" XCFLAGS="$OPT_FLAGS" \
	TCFLAGS="$OPT_FLAGS" \
	../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
	--enable-shared --enable-threads=posix --enable-haifa --disable-checking $ENABLE_LIBSTDCXX_V3 \
%ifarch sparc
	--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
%else
	--host=%{gcc_target_platform} $CROSS_BUILD_FLAGS
%endif

# if RPM_BUILD_NCPUS unset, set it
if [ -z "$RPM_BUILD_NCPUS" ] ; then
  if [ -x /usr/bin/getconf ] ; then
    RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
    if [ $RPM_BUILD_NCPUS -eq 0 ]; then
      RPM_BUILD_NCPUS=1
    fi
  else
    RPM_BUILD_NCPUS=1
  fi
fi
touch ../gcc/c-gperf.h

RPM_BUILD_NCPUS=`expr $RPM_BUILD_NCPUS + $RPM_BUILD_NCPUS`

cat <<EOF > makefile
MAKE=make -j $RPM_BUILD_NCPUS
include Makefile
CFLAGS:=\$(CFLAGS) -pipe
CXXFLAGS:=\$(CXXFLAGS) -pipe
EOF

%if %{cross_compile}
make -j$RPM_BUILD_NCPUS \
	CC=%{__cc} \
	CXX=%{__cxx} \
	AR=%{__ar} \
	AS=%{__as} \
	LD=%{__ld} \
	NM=%{__nm} \
	RANLIB=%{__ranlib} \
	CC_FOR_TARGET=%{__cc} \
	GCC_FOR_TARGET=%{__cc} \
	CXX_FOR_TARGET=%{__cxx} \
	AR_FOR_TARGET=%{__ar} \
	AS_FOR_TARGET=%{__as} \
	LD_FOR_TARGET=%{__ld} \
	NM_FOR_TARGET=%{__nm} \
	RANLIB_FOR_TARGET=%{__ranlib} \
	HOST_CC=cc \
	CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS -pipe" \
	CFLAGS_FOR_BUILD="-O -pipe" \
	CFLAGS="$RPM_OPT_FLAGS -pipe" \
	CXXFLAGS="$RPM_OPT_FLAGS -pipe"
%else
make -j$RPM_BUILD_NCPUS bootstrap-lean
#make -j$RPM_BUILD_NCPUS bootstrap
%endif

# run the tests.
# rpm seems to terminate when make -k check fails.
# make -k check || true

%if !%{cross_compile}
# Make protoize
make -C gcc CC="./xgcc -B ./ -O2" proto
%endif

%ifarch sparc
# Build the -m32 only compiler which does not use long long for HOST_WIDE_INT
mkdir gcc32
cd gcc32
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'`
echo "#!/bin/sh" > gcc32
echo "exec `cd ../gcc; pwd`/xgcc -B `cd ../gcc; pwd`/ $OPT_FLAGS \$*" >> gcc32
chmod +x gcc32
CC=`pwd`/gcc32 CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" XCFLAGS="$OPT_FLAGS" \
  TCFLAGS="$OPT_FLAGS" ../../gcc/configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
  --enable-shared --enable-threads=posix --enable-haifa --disable-checking $ENABLE_LIBSTDCXX_V3 \
  --host=%{_target_platform}
make cc1 cc1plus
cd ..
%endif

# Copy various doc files here and there
cd ..
mkdir -p rpm.doc/libstdc++ rpm.doc/g77 rpm.doc/chill rpm.doc/objc

(cd libio; for i in ChangeLog*; do
	cp -p $i ../rpm.doc/libstdc++/$i.libio
done)
(cd libstdc++; for i in ChangeLog*; do
	cp -p $i ../rpm.doc/libstdc++/$i.libstdc++
done)
(cd gcc/f; for i in ChangeLog*; do
	cp -p $i ../../rpm.doc/g77/$i.f
done)
(cd libf2c; for i in ChangeLog*; do
	cp -p $i ../rpm.doc/g77/$i.libf2c
done)
(cd gcc/ch; for i in ChangeLog*; do
	cp -p $i ../../rpm.doc/chill/$i.ch
done)
(cd libchill; for i in ChangeLog*; do
	cp -p $i ../rpm.doc/chill/$i.libchill
done)
(cd gcc/objc; for i in README*; do
	cp -p $i ../../rpm.doc/objc/$i.objc
done)
(cd libobjc; for i in README*; do
	cp -p $i ../rpm.doc/objc/$i.libobjc
done)

%install
rm -fr $RPM_BUILD_ROOT

cd obj-%{gcc_target_platform}
TARGET_PLATFORM=%{gcc_target_platform}
make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
  infodir=$RPM_BUILD_ROOT%{_infodir} \
%if %{cross_compile}
	CC=%{__cc} \
	CXX=%{__cxx} \
	AR=%{__ar} \
	AS=%{__as} \
	LD=%{__ld} \
	NM=%{__nm} \
	RANLIB=%{__ranlib} \
	CC_FOR_TARGET=%{__cc} \
	GCC_FOR_TARGET=%{__cc} \
	CXX_FOR_TARGET=%{__cxx} \
	AR_FOR_TARGET=%{__ar} \
	AS_FOR_TARGET=%{__as} \
	LD_FOR_TARGET=%{__ld} \
	NM_FOR_TARGET=%{__nm} \
	RANLIB_FOR_TARGET=%{__ranlib} \
	HOST_CC=cc \
	CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS -pipe" \
	CFLAGS_FOR_BUILD="-O -pipe" \
	CFLAGS="$RPM_OPT_FLAGS -pipe" \
	CXXFLAGS="$RPM_OPT_FLAGS -pipe" \
%endif
  install

FULLVER=%{gcc_version}
FULLPATH=$(dirname $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/$FULLVER/cc1)

if [ "%{gcc_target_platform}" != "%{_target_platform}" ]; then
  mv -f $RPM_BUILD_ROOT%{_prefix}/bin/%{gcc_target_platform}-gcc $RPM_BUILD_ROOT%{_prefix}/bin/%{_target_platform}-gcc
fi

file $RPM_BUILD_ROOT/%{_prefix}/bin/* | grep ELF | cut -d':' -f1 | xargs %{__strip} || :
%{__strip} $FULLPATH/{cc1,cc1obj,cpp0,tradcpp0,f771,jc1,jvgenmain,cc1chill}

# fix some things
ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/cc
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
gzip -9 $RPM_BUILD_ROOT%{_infodir}/*.info*

ln -sf g77 $RPM_BUILD_ROOT%{_prefix}/bin/f77

mkdir -p $RPM_BUILD_ROOT/lib
ln -sf ..%{_prefix}/bin/cpp $RPM_BUILD_ROOT/lib/cpp

%if %{LIBSTDCXX_V3}
%ifarch sparc64
# Fix things up for multilibes
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.{so,a}* $RPM_BUILD_ROOT%{_prefix}/lib64
sed -e 's%\(libdir=.%{_prefix}/\)lib\(.\)%\1lib64\2%' $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.la > $RPM_BUILD_ROOT%{_prefix}/lib64/libstdc++.la
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.la
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib64/libstdc++.la
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/32/libstdc++.{so,a}* $RPM_BUILD_ROOT%{_prefix}/lib
sed -e 's%\(libdir=.%{_prefix}/\)lib/32\(.\)%\1lib\2%' $RPM_BUILD_ROOT%{_prefix}/lib/32/libstdc++.la > $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.la
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/32/libstdc++.la
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.la
if [ %{LIBGXX} -ne 0 ]; then
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libg++.{so,a}* $RPM_BUILD_ROOT%{_prefix}/lib64
sed -e 's%\(libdir=.%{_prefix}/\)lib\(.\)%\1lib64\2%' $RPM_BUILD_ROOT%{_prefix}/lib/libg++.la > $RPM_BUILD_ROOT%{_prefix}/lib64/libg++.la
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libg++.la
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib64/libg++.la
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/32/libg++.{so,a}* $RPM_BUILD_ROOT%{_prefix}/lib
sed -e 's%\(libdir=.%{_prefix}/\)lib/32\(.\)%\1lib\2%' $RPM_BUILD_ROOT%{_prefix}/lib/32/libg++.la > $RPM_BUILD_ROOT%{_prefix}/lib/libg++.la
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/32/libg++.la
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libg++.la
fi
# Duh, objc is not able to install multilibs.
if [ ! -f $FULLPATH/32/libobjc.a ]; then
  if [ -d %{gcc_target_platform}/32/libobjc/.libs ]; then
    install -m 644 %{gcc_target_platform}/32/libobjc/.libs/libobjc.a $FULLPATH/32/libobjc.a
    install -m 644 %{gcc_target_platform}/32/libobjc/.libs/libobjc.so* $FULLPATH/32/
  else
    install -m 644 %{gcc_target_platform}/32/libobjc/libobjc.a $FULLPATH/32/libobjc.a
    install -m 644 %{gcc_target_platform}/32/libobjc/libobjc.so* $FULLPATH/32/
  fi
  install -m 644 %{gcc_target_platform}/32/libobjc/libobjc.la $FULLPATH/32/libobjc.la
fi
if [ ! -f $FULLPATH/alt/libobjc.a ]; then
  if [ -d %{gcc_target_platform}/alt/libobjc/.libs ]; then
    install -m 644 %{gcc_target_platform}/alt/libobjc/.libs/libobjc.a $FULLPATH/alt/libobjc.a
    install -m 644 %{gcc_target_platform}/alt/libobjc/.libs/libobjc.so* $FULLPATH/alt/
  else
    install -m 644 %{gcc_target_platform}/alt/libobjc/libobjc.a $FULLPATH/alt/libobjc.a
    install -m 644 %{gcc_target_platform}/alt/libobjc/libobjc.so* $FULLPATH/alt/
  fi
  install -m 644 %{gcc_target_platform}/alt/libobjc/libobjc.la $FULLPATH/alt/libobjc.la
fi
GCCPREFIX=`echo %{_prefix} | sed 's_/_\\\\/_'`
(
cd $FULLPATH
rm -f libstdc++.so libstdc++.a
rm -f 32/libstdc++.so 32/libstdc++.a
ln -sf ../../../../lib64/libstdc++.so libstdc++.so
ln -sf ../../../../lib64/libstdc++.a libstdc++.a
ln -sf ../../../../libstdc++.so 32/libstdc++.so
ln -sf ../../../../libstdc++.a 32/libstdc++.a
if [ %{LIBGXX} -ne 0 ]; then
rm -f libg++.so libg++.a
rm -f 32/libg++.so 32/libg++.a
ln -sf ../../../../lib64/libg++.so libg++.so
ln -sf ../../../../lib64/libg++.a libg++.a
ln -sf ../../../../libg++.so 32/libg++.so
ln -sf ../../../../libg++.a 32/libg++.a
fi
mv -f libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib64/
mv -f 32/libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib/
ln -sf ../../../../lib64/libobjc.so.1* .
ln -sf ../../../../libobjc.so.1* 32/
)
%else
%ifarch sparc
# Install the sparc -m32 only compilers
FULLPATH32=$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target_platform}/$FULLVER
mkdir -p $FULLPATH32
install -m 755 gcc32/cc1 $FULLPATH32/
install -m 755 gcc32/cc1plus $FULLPATH32/
%{__strip} $FULLPATH32/{cc1,cc1plus}
# Fix things up for multilibes
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/64/libstdc++.{so,a}* $RPM_BUILD_ROOT%{_prefix}/lib64 || true
sed -e 's%\(libdir=.%{_prefix}/\)lib/64\(.\)%\1lib64\2%' $RPM_BUILD_ROOT%{_prefix}/lib/64/libstdc++.la > $RPM_BUILD_ROOT%{_prefix}/lib64/libstdc++.la
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/64/libstdc++.la
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib64/libstdc++.la
if [ %{LIBGXX} -ne 0 ]; then
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/64/libg++.{so,a}* $RPM_BUILD_ROOT%{_prefix}/lib64 || true
sed -e 's%\(libdir=.%{_prefix}/\)lib/64\(.\)%\1lib64\2%' $RPM_BUILD_ROOT%{_prefix}/lib/64/libg++.la > $RPM_BUILD_ROOT%{_prefix}/lib64/libg++.la
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/64/libg++.la
chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib64/libg++.la
fi
GCCPREFIX=`echo %{_prefix} | sed 's_/_\\\\/_'`
(
cd $FULLPATH
rm -f 64/libstdc++.so 64/libstdc++.a
ln -sf ../../../../../lib64/libstdc++.so 64/libstdc++.so
ln -sf ../../../../../lib64/libstdc++.a 64/libstdc++.a
if [ %{LIBGXX} -ne 0 ]; then
rm -f 64/libg++.so 64/libg++.a
ln -sf ../../../../../lib64/libg++.so 64/libg++.so
ln -sf ../../../../../lib64/libg++.a 64/libg++.a
fi
mv -f libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib
ln -sf ../../../libobjc.so.1* .
)
%else
(
cd $FULLPATH
rm -f libstdc++.so libstdc++.a
ln -sf ../../../libstdc++.so libstdc++.so
ln -sf ../../../libstdc++.a libstdc++.a
if [ %{LIBGXX} -ne 0 ]; then
rm -f libg++.so libg++.a
ln -sf ../../../libg++.so libg++.so
ln -sf ../../../libg++.a libg++.a
fi
mv -f libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib
ln -sf ../../../libobjc.so.1* .
)
%endif
%endif
%else
%ifarch sparc64
# Fix things up for multilibes
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++-* $RPM_BUILD_ROOT%{_prefix}/lib64
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/32/libstdc++-* $RPM_BUILD_ROOT%{_prefix}/lib
if [ %{LIBGXX} -ne 0 ]; then
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libg++-* $RPM_BUILD_ROOT%{_prefix}/lib64
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/32/libg++-* $RPM_BUILD_ROOT%{_prefix}/lib
fi
# Duh, objc is not able to install multilibs.
if [ ! -f $FULLPATH/32/libobjc.a ]; then
  if [ -d %{gcc_target_platform}/32/libobjc/.libs ]; then
    install -m 644 %{gcc_target_platform}/32/libobjc/.libs/libobjc.a $FULLPATH/32/libobjc.a
    install -m 644 %{gcc_target_platform}/32/libobjc/.libs/libobjc.so* $FULLPATH/32/
  else
    install -m 644 %{gcc_target_platform}/32/libobjc/libobjc.a $FULLPATH/32/libobjc.a
    install -m 644 %{gcc_target_platform}/32/libobjc/libobjc.so* $FULLPATH/32/
  fi
  install -m 644 %{gcc_target_platform}/32/libobjc/libobjc.la $FULLPATH/32/libobjc.la
fi
if [ ! -f $FULLPATH/alt/libobjc.a ]; then
  if [ -d %{gcc_target_platform}/alt/libobjc/.libs ]; then
    install -m 644 %{gcc_target_platform}/alt/libobjc/.libs/libobjc.a $FULLPATH/alt/libobjc.a
    install -m 644 %{gcc_target_platform}/alt/libobjc/.libs/libobjc.so* $FULLPATH/alt/
  else
    install -m 644 %{gcc_target_platform}/alt/libobjc/libobjc.a $FULLPATH/alt/libobjc.a
    install -m 644 %{gcc_target_platform}/alt/libobjc/libobjc.so* $FULLPATH/alt/
  fi
  install -m 644 %{gcc_target_platform}/alt/libobjc/libobjc.la $FULLPATH/alt/libobjc.la
fi
GCCPREFIX=`echo %{_prefix} | sed 's_/_\\\\/_'`
(
cd $FULLPATH
rm -f libstdc++.so libstdc++.a
rm -f 32/libstdc++.so 32/libstdc++.a
STDCV=`echo $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++-libc6*-2.so.3 | sed 's/^.*\(libc6.*-2\).*$/\1/'`
ln -sf ../../../../lib64/libstdc++-$STDCV.so.3 libstdc++.so
ln -sf ../../../../lib64/libstdc++-$STDCV.a.3 libstdc++.a
ln -sf ../../../../libstdc++-$STDCV.so.3 32/libstdc++.so
ln -sf ../../../../libstdc++-$STDCV.a.3 32/libstdc++.a
if [ %{LIBGXX} -ne 0 ]; then
rm -f libg++.so libg++.a
rm -f 32/libg++.so 32/libg++.a
STDCV=`echo $RPM_BUILD_ROOT%{_prefix}/lib/libg++-libc6*-2.so.3 | sed 's/^.*\(libc6.*-2\).*$/\1/'`
ln -sf ../../../../lib64/libg++-$STDCV.so.3 libg++.so
ln -sf ../../../../lib64/libg++-$STDCV.a.3 libg++.a
ln -sf ../../../../libg++-$STDCV.so.3 32/libg++.so
ln -sf ../../../../libg++-$STDCV.a.3 32/libg++.a
fi
mv -f libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib64/
mv -f 32/libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib/
ln -sf ../../../../lib64/libobjc.so.1* .
ln -sf ../../../../libobjc.so.1* 32/
)
%else
%ifarch sparc
# Install the sparc -m32 only compilers
FULLPATH32=$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target_platform}/$FULLVER
mkdir -p $FULLPATH32
install -m 755 gcc32/cc1 $FULLPATH32/
install -m 755 gcc32/cc1plus $FULLPATH32/
%{__strip} $FULLPATH32/{cc1,cc1plus}
# Fix things up for multilibes
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/64/libstdc++-* $RPM_BUILD_ROOT%{_prefix}/lib64 || true
if [ %{LIBGXX} -ne 0 ]; then
mv -f $RPM_BUILD_ROOT%{_prefix}/lib/64/libg++-* $RPM_BUILD_ROOT%{_prefix}/lib64 || true
fi
GCCPREFIX=`echo %{_prefix} | sed 's_/_\\\\/_'`
(
cd $FULLPATH
rm -f 64/libstdc++.so 64/libstdc++.a
STDCV=`echo $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++-libc6*-2.so.3 | sed 's/^.*\(libc6.*-2\).*$/\1/'`
ln -sf ../../../../../lib64/libstdc++-$STDCV.so.3 64/libstdc++.so
ln -sf ../../../../../lib64/libstdc++-$STDCV.a.3 64/libstdc++.a
if [ %{LIBGXX} -ne 0 ]; then
rm -f 64/libg++.so 64/libg++.a
STDCV=`echo $RPM_BUILD_ROOT%{_prefix}/lib/libg++-libc6*-2.so.3 | sed 's/^.*\(libc6.*-2\).*$/\1/'`
ln -sf ../../../../../lib64/libg++-$STDCV.so.3 64/libg++.so
ln -sf ../../../../../lib64/libg++-$STDCV.a.3 64/libg++.a
fi
mv -f libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib
ln -sf ../../../libobjc.so.1* .
)
%else
(
cd $FULLPATH
rm -f libstdc++.so libstdc++.a
ln -sf ../../../libstdc++-libc6*-2.so.3 libstdc++.so
ln -sf ../../../libstdc++-libc6*-2.a.3 libstdc++.a
if [ %{LIBGXX} -ne 0 ]; then
rm -f libg++.so libg++.a
ln -sf ../../../libg++-libc6*-2.so.3 libg++.so
ln -sf ../../../libg++-libc6*-2.a.3 libg++.a
fi
mv -f libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/lib
ln -sf ../../../libobjc.so.1* .
)
%endif
%endif
%endif

# Now let's create the filelist for the libstdc++-devel and the
# libg++-devel package:
cat > ../libstdc++-devel-lst << EOF
%defattr(-,root,root)
EOF
if [ %{LIBSTDCXX_V3} -ne 0 ]; then
  cat >> ../libstdc++-devel-lst << EOF
%{_prefix}/include/g++-v3
%{_prefix}/%{_lib}/libstdc++.so
%{_prefix}/%{_lib}/libstdc++.a
EOF
else
  cat >> ../libstdc++-devel-lst << EOF
%dir %{_prefix}/include/g++-3
%dir %{_prefix}/include/g++-3/std
%{_prefix}/%{_lib}/libstdc++-3-libc*-%{STDC_VERSION}.a
%{_prefix}/%{_lib}/libstdc++-libc*.a.3
EOF
  find $RPM_BUILD_ROOT%{_prefix}/include/g++-3 -type f | sed -e "s,^$RPM_BUILD_ROOT,," | sort | grep -v -f %{SOURCE2} >> ../libstdc++-devel-lst
  cat >> ../libstdc++-devel-lst << EOF
EOF
fi
cat >> ../libstdc++-devel-lst << EOF
%doc rpm.doc/libstdc++/*
EOF

%if %{LIBGXX}
cat > ../libg++-devel-lst << EOF
%defattr(-,root,root)
%dir %{_prefix}/include/g++-3/gen
EOF
cat %{SOURCE2} >> ../libg++-devel-lst
cat >> ../libg++-devel-lst << EOF
%{_prefix}/%{_lib}/libg++-3-libc*-%{LIBGXX_VERSION}.a
%{_prefix}/%{_lib}/libg++-libc*.a.3
EOF
%endif

%if %{cross_compile}
# Install syslimits.h for canadian cross compile.
cp -af ../gcc/gsyslimits.h $FULLPATH/include/syslimits.h
# Fix the specs file.
cat gcc/specs |
awk '
BEGIN {
  cross=0;
}
/cross_compile/ { print; cross = 1; next; }
/^1$/ {
  if (cross == 0) {
    print;
  }
  else {
    cross = 0;
    print "0";
  }
  next;
}
{ print; }
' > $FULLPATH/specs
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/install-info \
	--info-dir=%{_infodir} %{_infodir}/gcc.info.gz

%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete \
	--info-dir=%{_infodir} %{_infodir}/gcc.info.gz
fi

%post -n libstdc++
if [ "%{_prefix}/%{_lib}" != /usr/lib ]; then
  if ! grep -q '^%{_prefix}/%{_lib}$' /etc/ld.so.conf; then
    echo %{_prefix}/%{_lib} >>/etc/ld.so.conf
  fi
fi
/sbin/ldconfig

%postun -n libstdc++
/sbin/ldconfig

%if %{LIBGXX}
%post -n libg++
if [ "%{_prefix}/%{_lib}" != /usr/lib ]; then
  if ! grep -q '^%{_prefix}/%{_lib}$' /etc/ld.so.conf; then
    echo %{_prefix}/%{_lib} >>/etc/ld.so.conf
  fi
fi
/sbin/ldconfig

%postun -n libg++
/sbin/ldconfig
%endif

%post objc -p /sbin/ldconfig

%postun objc -p /sbin/ldconfig

%post g77
/sbin/install-info \
	--info-dir=%{_infodir} %{_infodir}/g77.info.gz

%preun g77
if [ $1 = 0 ]; then
    /sbin/install-info --delete \
	--info-dir=%{_infodir} %{_infodir}/g77.info.gz
fi

%post chill
/sbin/install-info \
	--info-dir=%{_infodir} %{_infodir}/chill.info.gz

%preun chill
if [ $1 = 0 ]; then
    /sbin/install-info --delete \
	--info-dir=%{_infodir} %{_infodir}/chill.info.gz
fi

%post -n cpp
/sbin/install-info \
	--info-dir=%{_infodir} %{_infodir}/cpp.info.gz

%preun -n cpp
if [ $1 = 0 ]; then
    /sbin/install-info --delete \
	--info-dir=%{_infodir} %{_infodir}/cpp.info.gz
fi

/sbin/ldconfig

%files
%defattr(-,root,root)
%{_prefix}/bin/gcc
%{_prefix}/bin/cc
%if !%{cross_compile}
%{_prefix}/bin/protoize
%{_prefix}/bin/unprotoize
%endif
%{_prefix}/bin/gcov
%{_prefix}/bin/%{_target_platform}-gcc
%{_mandir}/man1/gcc.1*
%{_infodir}/gcc*
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/stddef.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/varargs.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/float.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/limits.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/stdbool.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/iso646.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/syslimits.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/proto.h
%ifarch ia64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/ia64intrin.h
%endif
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/README
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/collect2
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/crt*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libgcc.a
%if !%{cross_compile}
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/SYSCALLS.c.X
%endif
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/specs
%ifarch sparc
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/crt*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/alt/crt*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/alt/libgcc.a
%endif
%ifarch sparc64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/crt*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libgcc.a
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/alt/crt*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/alt/libgcc.a
%endif
%doc gcc/README* gcc/*ChangeLog*

%if !%{gcconly}
%files -n cpp
%defattr(-,root,root)
/lib/cpp
%endif
%{_prefix}/bin/cpp
%{_mandir}/man1/cpp.1*
%{_infodir}/cpp.info*.gz
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cpp0
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/tradcpp0

%if !%{gcconly}
%files c++
%defattr(-,root,root)
%{_mandir}/man1/g++.1*
%{_prefix}/bin/%{gcc_target_platform}-*++
%{_prefix}/bin/g++
%{_prefix}/bin/c++
%{_prefix}/bin/c++filt
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1plus
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/cxxabi.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/exception
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/new
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/new.h
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/typeinfo
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libstdc++.so
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libstdc++.a
%ifarch sparc
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libstdc++.so
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libstdc++.a
%endif
%ifarch sparc64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.a
%endif
%if %{LIBGXX}
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libg++.so
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libg++.a
%ifarch sparc
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libg++.so
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libg++.a
%endif
%ifarch sparc64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libg++.so
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libg++.a
%endif
%endif
%doc gcc/cp/ChangeLog*

%files -n libstdc++
%defattr(-,root,root)
%if %{LIBSTDCXX_V3}
%{_prefix}/%{_lib}/libstdc++.so.3*
%else
%{_prefix}/%{_lib}/libstdc++-3-libc*-%{STDC_VERSION}.so
%{_prefix}/%{_lib}/libstdc++-libc*.so.3
%endif

%if %{LIBGXX}
%files -n libg++
%defattr(-,root,root)
%{_prefix}/%{_lib}/libg++-3-libc*-%{LIBGXX_VERSION}.so
%{_prefix}/%{_lib}/libg++-libc*.so.3
%endif

%files -n libstdc++-devel -f libstdc++-devel-lst

%if %{LIBGXX}
%files -n libg++-devel -f libg++-devel-lst
%endif

%files objc
%defattr(-,root,root)
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/objc
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1obj
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libobjc.a
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libobjc.la
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libobjc.so*
%ifarch sparc64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libobjc.a
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libobjc.la
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libobjc.so*
%endif
%{_prefix}/%{_lib}/libobjc.so.1*
%ifarch sparc64
%{_prefix}/lib/libobjc.so.1*
%endif
%doc rpm.doc/objc/*
%doc libobjc/THREADS* libobjc/ChangeLog

%files g77
%defattr(-,root,root)
%{_prefix}/bin/g77
%{_prefix}/bin/f77
%{_infodir}/g77*
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/f771
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libg2c.a
%ifarch sparc
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libg2c.a
%endif
%ifarch sparc64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libg2c.a
%endif
%{_mandir}/man1/g77.1*
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include/g2c.h
%doc gcc/f/README rpm.doc/g77/*

%files chill
%defattr(-,root,root)
%{_prefix}/bin/chill
%{_infodir}/chill*
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1chill
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/chill*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/libchill.a
%ifarch sparc
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/chill*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/64/libchill.a
%endif
%ifarch sparc64
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/chill*.o
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/32/libchill.a
%endif
%doc gcc/ch/README gcc/ch/chill.brochure rpm.doc/chill/*

%ifnarch ia64
%files java
%defattr(-,root,root)
%{_prefix}/bin/gcj
%{_prefix}/bin/gcjh
%{_prefix}/bin/jcf-dump
%{_prefix}/bin/jv-scan
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/jc1
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/jvgenmain
%doc gcc/java/ChangeLog*
%endif

%ifarch sparc
%files sparc32
%defattr(-,root,root)
%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1

%files c++-sparc32
%defattr(-,root,root)
%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1plus
%endif
%endif

%changelog
* Mon Sep 10 2001 Jakub Jelinek <jakub@redhat.com> 2.96-99
- ship /usr/bin/%%{gcc_target_platform}-c++/g++ instead of
  /usr/bin/%%{_target_platform}-c++/g++ so we don't have hardlink
  breakage (needed on sparc)

* Thu Sep  4 2001 Jakub Jelinek <jakub@redhat.com> 2.96-98
- 7 new patches
  - fix strength reduction (#53025)
  - support seek*/tell* methods in <sstream> classes (#53011)
  - fix ICE on tail recursion with user label on top (Jeff Law, #51477)
  - fix GCSE bug causing miscompilation with -Os (Diego Novillo, #52131)
  - backport GCC 3.0 fde lookup handling using glibc's _dl_iterate_phdr,
    use proper eh sections for .gnu.linkonce functions to match
    binutils (#49746)
  - fix libstdc++ stdin/stdout/stderr initialization, so that ftell works
    on it even without any prior stdio calls
  - fix objc class-ref handling, so that no relocations against .rodata
    section are needed (John David Anglin, Rainer Orth, #52400)

* Mon Aug 20 2001 Jakub Jelinek <jakub@redhat.com> 2.96-97
- 7 new patches
  - properly handle throw() exception specifiers in template decls (#51824)
  - fix dwarf-2 .debug_line section generation broken by patch added
    in 2.96-91
  - fix IA-64 varargs handling in presence of additional anonymous arguments
    (#50757)
  - handle error conditions with friend classes gracefully
    (Nathan Sidwell, #51533)
  - handle array initializers with side-effect elements properly
    (Mark Mitchell, #51822)
  - fix a memory leak in cpp (Neil Booth)
  - fix ifcvt breaking eh regions (Richard Henderson, #48835, #51567)

* Thu Aug  9 2001 Jakub Jelinek <jakub@redhat.com> 2.96-96
- 9 new patches
  - fix template processing in casts to array (Nathan Sidwell, #45824)
  - don't crash on := in C++ source (#47240)
  - issue declaration does not declare anything instead of ICE
    (Nathan Sidwell, #48093)
  - fix SUBREG_BYTE related stabs bug (#50244)
  - ignore -fvtable-gc on alpha (#48933)
  - fix -ffunction-sections and -fdata-sections on alpha (H.J. Lu, #48581)
  - don't warn about if (&foo) if foo is weak (H.J. Lu, #50855)
  - set fail() if istream cannot extract a floating point variable
    from the stream (#50722)
  - don't allow unresolved overloaded fns in both sides of ?: (Nathan Sidwell)

* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com> 2.96-95
- readd gcc-java subpackage, gcc3 will provide gcc3-java
- add build dependency on zlib-devel (#49286)
- 6 new patches
  - fix Fortran -ffixed-line-lengh-132 option (Mark Mitchell, #49326)
  - fix handling of C++ conversions to cv void * (Mark Mitchell, #49188)
  - avoid generating bogus .stabs (#49214)
  - avoid warning in <sstream> (#49799)
  - fix <complex> for -pedantic (#49120)
  - fix make check in libio (#44657)

* Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com> 2.96-94
- remove gcc-java subpackage, it is now provided from gcc3 src.rpm
- update libobjc to the one from gcc 3.0, so gcc3-objc and gcc-objc
  can share the same libobjc.so
- don't run texconfig in texinfo configure - it can get stuck if
  tetex is installed but tetex-xdvi is not.

* Fri Jun 22 2001 Jakub Jelinek <jakub@redhat.com> 2.96-93
- use $RPM_BUILD_NCPUS in spec
- disable loop insn for -mcpu=k6 (Jan Hubicka, #23164)
- add SHF_MERGE support for Alpha
- disable jump threading patch temporarily

* Thu Jun 21 2001 Bill Nottingham <notting@redhat.com> 2.96-92
- ship /usr/bin/%%{_target_platform}-c++/g++ so we don't have hardlink
  breakage

* Wed Jun 20 2001 Bill Nottingham <notting@redhat.com> 2.96-91
- add patch for dwarf2 file numbers (<rth@redhat.com>, <drepper@redhat.com>)
- set in_section in the special case for "" in SHF_MERGE

* Wed Jun 20 2001 Elliot Lee <sopwith@redhat.com> 2.96-90
- Emit a newline after the .subsection pseudo-op.

* Thu Jun 14 2001 Jakub Jelinek <jakub@redhat.com> 2.96-89
- SHF_MERGE support (together with binutils 2.11.90.0.8+)

* Wed Jun 13 2001 Jakub Jelinek <jakub@redhat.com> 2.96-88
- prevent stack accesses below %sp in IA-32 (Richard Henderson)

* Fri Jun  8 2001 Jakub Jelinek <jakub@redhat.com> 2.96-87
- fix friend handling in template class specializations (Nathan Sidwell)

* Wed Jun  6 2001 Jakub Jelinek <jakub@redhat.com> 2.96-86
- 13 new patches
  - make jump threading work on ia-32, sparc (#39810)
  - optimize static constructors/destructors function
  - fix ICE on very questionable C++ code from JDK (#39858)
  - fix #ident handling if ident type was seen (#39929)
  - avoid regmove for unchanging pseudo (#40069)
  - fix diagnostic of invalid characters in identifiers (#41554)
  - fix another template mangling bug in the old ABI (#43071)
  - avoid moving CCmode regs around in loop and gcse on IA-64 (#42334)
  - fix ICE with complex float arguments to functions without
    prototypes on IA-64 (#42339)
  - fix Fortran ICHAR() (Toon Moene, #42281)
  - fix IA-64 stop bit handling in presence of asm with multiple
    outputs (Bernd Schmidt, #42560)
  - fix instantiation ICE (Nathan Sidwell, #43150)
  - fix -fsyntax-only (Nix, #43604)
  - fix default argument handling (Jason Merrill, #39466, #42123)

* Wed May  9 2001 Jakub Jelinek <jakub@redhat.com> 2.96-85
- 4 new patches
  - pass -D__NO_INLINE__ to cpp if not inlining (#39824)
  - emit inline method in the object which references it (unless it
    has been successfully inlined) in addition to the "exporting"
    object (#39812)
  - kill trapping exprs in dsts of abnormal edges (Michael Matz)
  - fix nested expression statements in C++ (Mark Mitchell)

* Fri May  3 2001 Jakub Jelinek <jakub@redhat.com> 2.96-84
- doh, 3 typos in the __frame_state_for patch

* Wed May  2 2001 Jakub Jelinek <jakub@redhat.com> 2.96-83
- 4 new patches
  - fix __frame_state_for incompatibility between egcs 1.* and gcc-2.96-RH
    (#37933)
  - fix a tradcpp ICE with -Dfoo= (#38551)
  - fix a sibcall and eh related ICE (#38466)
  - fix a template argument mangling bug (#31168)

* Fri Apr 27 2001 Jakub Jelinek <jakub@redhat.com> 2.96-82
- 16 new patches
  - fix i386 if conversion optimization (#37054)
  - only warn about multi-line comments if -Wcomment or -Wall is given
  - fix a SUBREG_BYTE ICE with ia64 builtins
  - properly honour mode in cse lookups (Bernd Schmidt, #35122)
  - fix an ICE in dwarf-2 support (Jason Merrill)
  - fix an dwarf-2 output bug (Jason Merrill, #32801)
  - fix 2 bugs in ia64 exception handling
  - include ia64intrin.h header on ia64
  - fix yet another alpha unaligned access (Richard Kenner, #37698)
  - fix gcc driver with -traditional -traditional-cpp
    (Neil Booth, Chris Demetriou, #35963)
  - fix tree checking bug on bad arguments to inlined functions (#36986)
  - support -G option on ia64 (#33354)
  - fix -MD -o name_without_dot (#37697)
  - fix ia64 ICE seen in xfig (nested CONST rtl)
  - add a patch for m68k requested by Jes Sorensen (Jeff Law)
  - sync with ia64-000717-branch new patches
    - fix functions using all local regs needing a frame pointer (Jim Wilson)

* Wed Apr  4 2001 Jakub Jelinek <jakub@redhat.com> 2.96-81
- 7 new patches
  - fix constant folding of pointer comparisons where one pointer is
    (void *)(-1UL >> 1) (#33690)
  - handle STRICT_LOW_PART in ifcvt (#33474)
  - throttle C++ inlining (Mark Mitchell, #29556)
  - define -D__EXCEPTIONS in g++ unless -fno-exceptions is passed
  - fix GCSE for function parameters whose addresses are taken (#34050)
  - fix null pointer check optimization (#23891)
  - fix dwarf-2 in presence of inline function redeclared locally
    as extern (Jason Merrill, #25253)

* Mon Mar 26 2001 Jakub Jelinek <jakub@redhat.com> 2.96-80
- 9 new patches
  - fix a SUBREG_BYTE related ICE (#32739)
  - update regrename.c to fix some -frename-registers bugs
    (but -frename-registers is not considered supported)
  - fix Fortran lexer, so that it does not eat one whole line
    after #line directive (#32230)
  - fix implicit operator= handling for classes with anonymous
    aggregates (#32162)
  - fix libstdc++'s bastring.cc so that it does not warn with -Wshadow
  - update documentation about -Wshadow (#32160)
  - optimize C++ frontend by killing -fnew-abi support (it is not
    ABI compatible with gcc 3.0 anyway)
  - store static variables from inline functions into linkonce sections
    (to save space e.g. in mozilla)

* Fri Mar 16 2001 Jakub Jelinek <jakub@redhat.com> 2.96-79
- 6 new patches
  - fix reg-stack return value handling (#20952, #21002, #31756)
  - fix glibc getdents64.c build on ia32 with --enable-kernel 2.4.1
    (Bernd Schmidt, Jan Hubicka)
  - fix aspell miscompilation (#30297)
  - issue a clear error message about invalid ia32 floating point
    asm constraints (#27137)
  - remove libc5 kludge from ia32 crtendS.o

* Fri Mar  9 2001 Jakub Jelinek <jakub@redhat.com> 2.96-78
- 1 new patch, 1 fixed patch
  - fix Alpha combiner patch
  - fix bogus cpp warning (Neil Booth)
  - macro expand I in Objective C @I (Zack Weinberg)

* Thu Mar  1 2001 Jakub Jelinek <jakub@redhat.com>
- libstdc++-devel requires libstdc++

* Tue Feb 27 2001 Jakub Jelinek <jakub@redhat.com> 2.96-77
- 7 new patches
  - fix last cpp patch (so that -MD with -o works)
  - fix constant folding bug (#28864)
  - fix ADDRESSOF recognition (#29686)
  - avoid bogus -Wunused warnings in Fortran (Richard Henderson, #29559)
  - fix debugging of static local variables in stabs (Jason Merrill, #29548)
  - don't crash if fixup_var_refs_1 changed MEM into REG (Richard Kenner,
    #29506)
  - add explicit barriers to flushrs and mov x = ar.bsp on ia64 (Jim Wilson,
    #29155)
  - fix ia64 syscall_linkage security problems (David Mosberger)

* Thu Feb 22 2001 Jakub Jelinek <jakub@redhat.com> 2.96-76
- 11 new patches
  - change some requires from %%{version} to %%{version}-%%{release} (#28200)
  - don't build java subpackage on ia64 - libgcj does not work there
  - fix C++ lookup if aggregate contains field with the same name as itself
    (#21420)
  - clarify error message about taking address of an unqualified non-static
    member (#24329)
  - better trim C++ inlined function graph cycles (#28385)
  - fix C++ static aggregate initialization (#20267)
  - fix Objective C garbage collection bug (#18827)
  - fix Objective C testsuite so that it does not use system libobjc
  - put only basename into -M goal (Nathan Sidwell)
  - fix Alpha reload bug (Richard Henderson, #26749)
  - fix Alpha combiner bug (Richard Henderson, #28509)
  - fix i386 reload bug with long long (Bernd Schmidt, #28209)
  - integrate patch.057 from gnupro-1117 tree

* Tue Feb 13 2001 Jakub Jelinek <jakub@redhat.com> 2.96-75
- 10 new patches, 2 new sources
  - ia64 support
  - fix ia64 B-step errata handling code
  - fix a crash caused by lexing #line directives in some cases (#25851)
  - workaround ICE in dwarf2out (#24741)
  - avoid unaligned accesses on alpha and ia64 (Richard Henderson)
  - handle -foperator-names in the new cpp (#26457)
  - add nice diagnostic message about #if defined(xor) with -foperator-names
    (Neil Booth)
  - fix paste avoidance after builtin (Neil Booth)
  - fix g++.jason/2371.C test so that new cpp does not complain about it
    (Alexandre Oliva)
  - fix ICE on nested function with variable size array argument (#24506)
  - change gcc -v output to include minor release

* Sat Feb  3 2001 Jakub Jelinek <jakub@redhat.com> 2.96-74
- 5 new patches
  - fix last cpp patch so that no whitespace is inserted at start of line
    if last macro expansion resulted in no tokens (Neil Booth)
  - fix ICE during printing warning about overloading decisions (#23584)
  - honor no implicit extern "C" on linux in cpp (#26379)
  - fix layout of __attribute((packed)) enums in bitfields (showing up
    in Linux DAC960 driver, #25440)
  - fix ICE when both prototype and function definition declares
    variable size array argument (#24507)

* Wed Jan 31 2001 Jakub Jelinek <jakub@redhat.com> 2.96-73
- 6 new patches
  - change new cpp so that it does not insert whitespace where no macro
    expansion happens in C mode (Neil Booth, #25200)
  - don't ICE when inlining is replacing with constant a variable which is
    only modified by assigning to itself (#24641)
  - mask constant argument to testl or andl if the operation should be done
    in 8bit mode (#24921)
  - fix C++ anonymous union handling (#23682)
  - fix extract_bit_field so that it works even with XFmode (DJ Delorie)

* Fri Jan 26 2001 Jakub Jelinek <jakub@redhat.com> 2.96-72
- 7 new patches, 1 new tarball
  - prevent inlining C++ functions containing static variables (#24253)
  - include headers sourced from -include or -imacros in -M output (#24317)
  - mangle overloaded operators declared in "C" linkage (#24685)
  - optimize out comparisons of two constants if at least one comes from
    inline function arguments (visible e.g. on undefined __bad_udelay
    symbols from some linux 2.4.0 kernel modules)
  - put in updated preprocessor, it seems stable enough and has tons of bugs
    against both gcc 2.95.2 cccp and cpp used in 2.96-RH until now

* Thu Jan 18 2001 Jakub Jelinek <jakub@redhat.com> 2.96-71
- 10 new patches
  - fix DECL_NEEDED_P (Mark Mitchell, #23401)
  - fix i386 assembly output for calls to symbol+offset (#23429)
  - fix C++ parser to cure GC crashes (#23489, #24060)
  - fix miscompilation due to not copied MEM/f flag (Alexander Oliva, #23502)
  - fix CC flags handling after sar on i386 (Richard Henderson, #24062)
  - only check inmode after checking type of argument in
    fcmov_comparison_operator on i386 (#24115)
  - fix typos in i386 cmpqi_minus_1 (#24178)
  - fix thinko in alpha alpha_expand_block_move
    (#23816, #24092, #24167, #24315)
  - fix fixup_var_refs (#24031)
  - fix my last fix for cpplib dependency handling (Graham Stott)

* Thu Jan  4 2001 Jakub Jelinek <jakub@redhat.com> 2.96-70
- 11 new patches
  - Richard Henderson's debugging fix (#18707, #22671)
  - fix C++ #pragma implementation with -g3 (#21280)
  - avoid bogus warning whenever -fshort-wchar is used (#22786)
  - Richard Henderson's fix for alpha block move (#22972)
  - fix signedness of wchar_t in C++ (#22985)
  - Richard Henderson's alpha ze_and_ne fix (#23123)
  - simplify SUBREGs of VOIDmode CONST_DOUBLEs in addition to
    CONST_INTs (#23211)
  - add -MD, -MMD and -MG support to -traditional cpp (#23254)
  - fix endless loops in cpp with some macros
  - fix patch for -fno-operator-names and -foperator-names
  - fix check for ISO C maximum string length (Geoff Keating)

* Mon Dec 18 2000 Jakub Jelinek <jakub@redhat.com> 2.96-69
- honour -fno-operator-names in cpp (#22324)
- fix a bug in my do_compare_and_jump patch (#22418)
- register cp/input.c input stack with ggc

* Wed Dec 13 2000 Jakub Jelinek <jakub@redhat.com>
- add Mark Mitchell's patch to fix ADDRESSOF patch

* Tue Dec 12 2000 Jakub Jelinek <jakub@redhat.com>
- tweak Jim Wilson's patch so that we maintain binary compatibility

* Mon Dec 11 2000 Jakub Jelinek <jakub@redhat.com>
- 4 new patches
  - partially revert sizeof overloading patch, it breaks other things
    (but fix that bug in method.c)
  - if any errors were diagnosed already, don't ever ICE but issue
    a user-friendly confused by earlier errors, bailing out message
    and exit (#17103, #19609, #19612, #19613, #21861)
  - speed up C++ on Stepanov benchmark from abstraction penalty
    3.88 down to 1.41 with -O2 -march=i686 (Jason Merrill, Jim Wilson)

* Wed Dec 06 2000 Jakub Jelinek <jakub@redhat.com>
- 17 new patches
  - fix cpp handling of huge #error messages (#16965)
  - fix loop unrolling bug (#20580)
  - fix ICE with inlining compare on trees (#21125)
  - avoid ICE from integrate (#21167)
  - make sure volatile local variables don't loose their volatile status
    (#21188)
  - apply Bernd Schmidt's local alloc fix (#21340)
  - fix loop MEM hoisting (#21376, #21423)
  - don't use tempnam in libf2c (Toon Moene, #21426)
  - fix declared with type qualifiers error message (Jeffrey Oldham, #21662)
  - fix truncxfsf2_2 pattern on i?86
  - fix do_compare_and_jump in presence of inlining on trees
  - fix binding level handling for inlined returns
  - fix constant folding constant propagation, so that glibc string2.h
    macros are properly optimized out (Bernd Schmidt)
  - fix pointer to member handling and related warnings (Nathan Sidwell)
  - fix diagnostic output of negative tree constants
    (Nathan Sidwell, Jason Merill)
  - fix cleanup handling with gotos (Will Cohen)
  - Richard Henderson's 2 tail call fixes

* Thu Nov 16 2000 Jakub Jelinek <jakub@redhat.com>
- 9 new patches
  - fix sizeof() overloading in C++ (#18369)
  - fix -fomit-frame-pointer with certain ia32 jumps on floating point
    comparison (#20532, #20954)
  - handle more than 64k tokens on a line in preprocessor (#19290, #20443)
  - output #line directives even for headers generating no output (#20836)
  - fix __builtin_setjmp on sparc
  - fix miscompilation of glibc's e_sqrt.c on alpha (Richard Henderson)

* Mon Nov  6 2000 Jakub Jelinek <jakub@redhat.com>
- 15 new patches
  - fix rtl mode of static class members (#18752)
  - fix ICE when using method undefined in its class (#19606, #19138, #20089)
  - fix ICE in place_field on bad input (#20268)
  - fix sparc ICE (#19884)
  - ressurect "confused by previous errors, bailing out" error
    from g++ 2.95.x (#20104, #20105, #20508, #21322, #21323, #21639)
  - fix ICEs in binding level handling on bad input
  - fix named return values on sparc64
  - fix vtable thunks on sparc64
  - fix nested functions on sparc64

* Tue Oct 31 2000 Jakub Jelinek <jakub@redhat.com>
- 7 new patches
  - fix postfix miscompilation (#18976)
  - fix ICE on NTL (#19092)
  - fix C++ ICE on bad input (#18764)
  - fix ICE on sidplay (#19462)
  - fix aliasing bug for testcase posted on lkml
  - add N constraint so that i386 in/out instructions
    can be optimized by storing ports into instructions
    again
  - fix cpp crash with invalid -A argument (#19974)

* Mon Oct 30 2000 Manfred Hollstein <manfredh@redhat.com>
  - add ability to build libg++-2.8.1.3
  - add two libg++ related sources plus 4 libg++ related patches

* Mon Oct 23 2000 Jakub Jelinek <jakub@redhat.com>
- 7 new patches
  - fix ICE in OpenOffice (Jason Merill, #20281)
  - fix sibcall miscompilation (#19543)
  - fix reload bug (Bernd Schmidt; #19313)
  - fix ICE with named return value (#18765, #21004 and GNATS bug 687)

* Wed Oct 18 2000 Jakub Jelinek <jakub@redhat.com>
- 7 new patches
- since Aug 23 release, this should fix at least:
  #12803, #17205, #17421, #17433, #18027, #18064, #18339, #18861, #19025,
  #19182, #19607, #20011

* Wed Oct 11 2000 Jakub Jelinek <jakub@redhat.com>
- 6 new patches

* Wed Oct  4 2000 Jakub Jelinek <jakub@redhat.com>
- 4 new patches
- fix the bug reporting URL

* Fri Sep 15 2000 Jakub Jelinek <jakub@redhat.com>
- fix cpp paste warnings
- fix alpha -mtune= patch
- Richard's fix for alpha aliasing bugs

* Wed Sep 13 2000 Jakub Jelinek <jakub@redhat.com>
- add libio patch for glibc after Sep, 1st
- add -mtune= option for alpha
- fix libobjc install on sparc64

* Wed Sep 13 2000 Jakub Jelinek <jakub@redhat.com>
- 15 new patches

* Wed Aug 23 2000 Jakub Jelinek <jakub@redhat.com>
- 13 new patches

* Mon Aug 21 2000 Jakub Jelinek <jakub@redhat.com>
- don't miscompile mawk

* Fri Aug 18 2000 Jakub Jelinek <jakub@redhat.com>
- 16 new patches

* Thu Aug  3 2000 Jakub Jelinek <jakub@redhat.com>
- take care of shared libobjc

* Wed Aug  2 2000 Jakub Jelinek <jakub@redhat.com>
- some more patches

* Tue Aug  1 2000 Jakub Jelinek <jakub@redhat.com>
- two loop patches from Bernd
- another loop fix
- two loop testcases

* Tue Aug  1 2000 Jakub Jelinek <jakub@redhat.com>
- fix combine
- apply some more patches

* Mon Jul 31 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000731 to fix sane reload breakage and other things
- fix 20000728-1 testcase
- some more patches

* Mon Jul 31 2000 Jakub Jelinek <jakub@redhat.com>
- don't segfault in cpp on Alpha when input is a directory
- fix soft-fp preprocessing bugs

* Tue Jul 25 2000 Jakub Jelinek <jakub@redhat.com>
- put the tradcpp segfault patch actually in, ho hum

* Mon Jul 24 2000 Jakub Jelinek <jakub@redhat.com>
- don't merge stack adjustements accross asm(), should
  fix kupdate oops in 2.4 kernel

* Mon Jul 24 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000724
- fix an ICE seen in 586 kernel
- fix tradcpp segfaults

* Fri Jul 21 2000 Bill Nottingham <notting@redhat.com>
- yet another cpp fix

* Thu Jul 20 2000 Jakub Jelinek <jakub@redhat.com>
- another tradcpp fix from Zack

* Wed Jul 19 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000719
- tradcpp fix from Zack
- kill deprecated GNU ## extension used warning

* Mon Jul 17 2000 Jakub Jelinek <jakub@redhat.com>
- Another sibcall fix (sibcall4)
- cpp fix for -include

* Sat Jul 15 2000 Jakub Jelinek <jakub@redhat.com>
- Put Richard Henderson's mysql compilation fix instead to play safe
- Move libstdc++-compat stuff into compat-egcs package

* Fri Jul 14 2000 Jakub Jelinek <jakub@redhat.com>
- Zack Weinberg's cpp fixes
- Fix mysql miscompilation

* Thu Jul 13 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000713
- fix i386 -fpic miscompilations
- new version of sibcall3 patch

* Tue Jul 11 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000711
- added spec file option to select:
  -fnew-abi by default and libstdc++-v3
- remove cccp hack, use tradcpp

* Fri Jul 07 2000 Jakub Jelinek <jakub@redhat.com>
- Richard Henderson's alpha ICE patch
- better check for make -j count (Matt Wilson)
- 2 sibcall miscompilations and one ICE fixed

* Mon Jul 03 2000 Jakub Jelinek <jakub@redhat.com>
- fix alpha ldconfig miscompilation due to aliasing
- fix i386 ICE/misoptimization introduced in 20000702

* Sun Jul 02 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000702
- fix up streambuf.h for glibc 2.2

* Fri Jun 30 2000 Jakub Jelinek <jakub@redhat.com>
- avoid putting cccp as /usr/bin/cpp, instead hack xcpp
  so that it looks at $FULLPATH/cccp/cpp for cpp binary

* Thu Jun 29 2000 Jakub Jelinek <jakub@redhat.com>
- fix the cpp fix from yesterday
- fix strength reduction ICE with -g -O2

* Wed Jun 28 2000 Jakub Jelinek <jakub@redhat.com>
- fix cpp to put correct #line commands in ORBit
- rth's alpha summarize_insn fix

* Tue Jun 27 2000 Jakub Jelinek <jakub@redhat.com>
- fix sparc32 vaarg patch vs. aliasing
- don't include fixincluded headers
- move gcc file list back to files section

* Fri Jun 23 2000 Jakub Jelinek <jakub@redhat.com>
- fix interface vs. implementation C++ bug

* Thu Jun 22 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000622
- fix sibcall alias related miscompilation
- --disable-checking
- don't warn about trigraphs unless -ansi for now

* Wed Jun 21 2000 Jakub Jelinek <jakub@redhat.com>
- hopefully last step towards sparc rpm -m64 support
- Jason Merill's fix for the typename ICE
- Jan Hubicka's fix for wine ICE

* Wed Jun 21 2000 Jakub Jelinek <jakub@redhat.com>
- next step towards sparc rpm -m64 support
- don't abort in C++ when a function has statement expression in its
  arguments

* Mon Jun 19 2000 Jakub Jelinek <jakub@redhat.com>
- first step towards even sparc rpm being able to build 64bit stuff
- fix one C++ ICE and one SPARC-only ICE

* Sat Jun 17 2000 Jakub Jelinek <jakub@redhat.com>
- avoid throwing needed eh code away

* Tue Jun 13 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000613
- fix two more ICEs

* Thu Jun  8 2000 Jakub Jelinek <jakub@redhat.com>
- copy requires/provides from egcs, so that e.g. gcc-c++ requires libstdc++
- fix libstdc++-compat packages
- some ICE fixes

* Wed Jun  7 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000607
- use as/ld -relax options if available on sparc
- use mandir, infodir and prefix macros

* Tue Jun  6 2000 Jakub Jelinek <jakub@redhat.com>
- fix x86 ABI breakage with unions
- some other fixes

* Mon Jun  5 2000 Jakub Jelinek <jakub@redhat.com>
- put libgcj into separate source package

* Fri Jun  2 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000602
- fix libgcj bootstrap ICE

* Fri Jun  2 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000601

* Thu May 25 2000 Jakub Jelinek <jakub@redhat.com>
- don't use %f32-%f62 for -m32 on SPARC - proper fix
  is to fix up reload

* Wed May 24 2000 Jakub Jelinek <jakub@redhat.com>
- include old cccp for imake
- make libjava compile with new iconv prototype

* Tue May 23 2000 Jakub Jelinek <jakub@redhat.com>
- fix ifcvt ICE
- fix SPARC -m32 -mvis ICE

* Sun May 21 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000521

* Tue May 16 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000516
- fix jc1 ICE

* Mon May 15 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000515
- update libgcj to current CVS
- fix C++ sibcall related ICE
- avoid endless loop in javac

* Thu May  4 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000504
- fix ICE when compiling kernel on Sparc64
- update libgcj to current CVS, so that it actually compiles
- fix ICE in libgcj

* Wed May  3 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000503
- fix C++ breakage in Qt
- fix libstdc++.{so,a} symlinks for glibc 2.1.x

* Sat Apr 29 2000 Jakub Jelinek <jakub@redhat.com>
- use uint64 for jword on 64bit arches

* Sat Apr 29 2000 Jakub Jelinek <jakub@redhat.com>
- use -n for libgcj* subpackages.
- avoid removing %{GCC_PREFIX}/lib* from /etc/ld.so.conf on package
  uninstalation (some other package might still use it).

* Fri Apr 28 2000 Jakub Jelinek <jakub@redhat.com>
- include libgcj again (current CVS snapshot)
- convert from sparc64 only into all arch package
- split libgcj into libgcj and libgcj-devel

* Wed Apr 20 2000 Jakub Jelinek <jakub@redhat.com>
- build all the languages and libraries with the exception of libgcj

* Mon Apr 17 2000 Jakub Jelinek <jakub@redhat.com>
- two new patches

* Fri Apr 14 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000414

* Sat Apr  8 2000 Jakub Jelinek <jakub@redhat.com>
- update to 20000408
- remove a bunch of commited patches, add some new and updated ones

* Thu Mar 23 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- Fix up cpp

* Wed Mar 15 2000 Bernhard Rosenkraenzer <bero@redhat.com>
- Deal with the build system compressing man pages

* Mon Jan 31 2000 Jakub Jelinek <jakub@redhat.com>
- another cluster of patches

* Tue Jan 25 2000 Jakub Jelinek <jakub@redhat.com>
- Some more patches

* Wed Jan 19 2000 Jakub Jelinek <jakub@redhat.com>
- Initial hack for a 64bit sparc compiler

* Sat Dec 11 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- Obsolete egcs*, g77
- Add egcs 1.1.x'ish libstdc++ versions to libstdc++-compat

* Wed Dec  8 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- Fix build on sparc

* Tue Dec  7 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- Add -warn patch (adapted from egcs-1.1.2 RPM)
- drop release number to 1 for 7.0 tree

* Tue Oct 26 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- 2.95.2 release

* Sun Oct 24 1999 Bernhard Rosenkraenzer <bero@redhat.com>
- initial RPM
