While trying to recompile egcs-1.1.2-30, I noticed it didn't quite build right. There were a few shared libraries that it didn't compile but yet still wanted to put into packages, and at one point it tried to use the new g++ compiler while still mostly configured for the old one. (Plus, it wouldn't build i586/i686 right either. :-) The enclosed patch file is meant to be applied to egcs.spec. Comments, questions, snide remarks.... Steven Boswell [EMAIL PROTECTED]
--- egcs.spec.old Thu Feb 17 10:53:29 2000 +++ egcs.spec Thu Apr 27 16:18:45 2000 @@ -141,15 +141,24 @@ rm -rf obj-$RPM_ARCH-linux mkdir obj-$RPM_ARCH-linux cd obj-$RPM_ARCH-linux +CFLAGS="-g $RPM_OPT_FLAGS"; export CFLAGS +CXXFLAGS="-g $RPM_OPT_FLAGS"; export CXXFLAGS +BOOT_CFLAGS="-g $RPM_OPT_FLAGS"; export BOOT_CFLAGS ../configure --prefix=/usr \ --enable-shared --enable-threads \ $RPM_ARCH-redhat-linux +unset CXXFLAGS +unset CFLAGS + PATH=$PATH:/sbin:/usr/sbin # gperf is most likely broken on alpha and sparc +%ifarch alpha sparc touch ../gcc/c-gperf.h +%endif make MAKEINFO="makeinfo --no-split" bootstrap-lean make MAKEINFO="makeinfo --no-split" info +unset BOOT_CFLAGS %install rm -rf $RPM_BUILD_ROOT @@ -170,6 +179,9 @@ ln -sf gcc $RPM_BUILD_ROOT/usr/bin/cc ln $RPM_BUILD_ROOT/usr/man/man1/gcc.1 $RPM_BUILD_ROOT/usr/man/man1/egcs.1 #mv $RPM_BUILD_ROOT/usr/include/g++-2 $RPM_BUILD_ROOT/usr/include/g++ +ln /usr/lib/libg++.so.2.7.2.8 $RPM_BUILD_ROOT/usr/lib/libg++.so.2.7.2.8 +ln /usr/lib/libstdc++.so.2.7.2.8 $RPM_BUILD_ROOT/usr/lib/libstdc++.so.2.7.2.8 +ln /usr/lib/libstdc++.so.2.8.0 $RPM_BUILD_ROOT/usr/lib/libstdc++.so.2.8.0 rm -f $RPM_BUILD_ROOT/usr/info/dir install -m 644 $RPM_ARCH-redhat-linux/libio/iostream.info $RPM_BUILD_ROOT/usr/info @@ -189,9 +201,12 @@ # build a fake libstdc++.so.2.9 library for compatibility with other distros pushd $RPM_BUILD_ROOT/usr/lib ; { touch foo.c - ../bin/g++ -fPIC -L. -shared -o libstdc++.so.2.9.dummy \ + ln $FULLPATH/crtbeginS.o ./crtbeginS.o + ln $FULLPATH/crtendS.o ./crtendS.o + ../bin/g++ -fPIC -L. -L$FULLPATH \ + -shared -o libstdc++.so.2.9.dummy \ -Wl,-soname,libstdc++.so.2.9 - rm -f foo.c + rm -f crtendS.o crtbeginS.o foo.c } ; popd %clean @@ -321,10 +336,10 @@ %files -n libstdc++ /usr/lib/libstdc++-2-libc*-%{STDC_VERSION}.so -%ifarch i386 sparc alpha +%ifarch i386 i486 i586 i686 sparc alpha /usr/lib/libstdc++.so.2.8.0 %endif -%ifarch i386 alpha +%ifarch i386 i486 i586 i686 alpha /usr/lib/libstdc++.so.2.7.2.8 /usr/lib/libg++.so.2.7.2.8 %endif