2002-06-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* mkgcc3newlibspec.in: Remove SETUP (bogus).
	* gcc3newlib/target-c++.add: New.
	* gcc3newlib/Makefile.am: Add target-c++.add.
	* gcc3newlib/base-g77.add: Adapt to gcc-3.1.
	Reflect having split out c++. Various minor fixes.
	* gcc3newlib/base-gcc.add: Ditto.
	* gcc3newlib/gccnewlib.add: Ditto.
	* gcc3newlib/target-gcc.add: Ditto.
This commit is contained in:
Joel Sherrill
2002-05-15 16:38:16 +00:00
parent a923a82d2d
commit 6e9746a29c
8 changed files with 90 additions and 37 deletions

View File

@@ -1,3 +1,14 @@
2002-06-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* mkgcc3newlibspec.in: Remove SETUP (bogus).
* gcc3newlib/target-c++.add: New.
* gcc3newlib/Makefile.am: Add target-c++.add.
* gcc3newlib/base-g77.add: Adapt to gcc-3.1.
Reflect having split out c++. Various minor fixes.
* gcc3newlib/base-gcc.add: Ditto.
* gcc3newlib/gccnewlib.add: Ditto.
* gcc3newlib/target-gcc.add: Ditto.
2002-04-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* gcc3newlib/gccnewlib.add: Add gcc_update --touch to fix

View File

@@ -8,14 +8,16 @@ SUBPACKAGES = gccnewlib.add \
base-gcc.add target-gcc.add \
base-g77.add target-g77.add \
base-gcj.add target-gcj.add \
target-objc.add
target-objc.add \
target-c++.add
gccnewlib.spec.in: $(SUBPACKAGES)
cat $^ \
| sed -e 's%@GCCLANGS@%%g' > $@
CLEANFILES = gccnewlib.spec.in
gccnewlib_c_only.spec.in: gccnewlib.add base-gcc.add target-gcc.add
gccnewlib_c_only.spec.in: gccnewlib.add base-gcc.add target-gcc.add \
target-c++.add
cat $^ \
| sed -e "s%@GCCLANGS@%\'--enable-languages=c,c++\'%g" > $@
CLEANFILES += gccnewlib_c_only.spec.in

View File

@@ -18,7 +18,7 @@ This is the files for gcc/g77 that are shared by all targets.
%dir %{_prefix}/man
%dir %{_prefix}/man/man1
%doc %{_prefix}/man/man1/@target_alias@-g77.1
%doc %{_prefix}/man/man1/@target_alias@-g77.1*
%post -n rtems-base-g77
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;

View File

@@ -20,22 +20,16 @@ This is the files for gcc and newlib that are shared by all targets.
%doc %{_prefix}/info/libc.info*.gz
%doc %{_prefix}/info/libm.info*.gz
%dir %{_prefix}/bin
%{_prefix}/bin/gcov@exe_ext@
%{_prefix}/bin/gccbug@exe_ext@
%dir %{_prefix}/man
%dir %{_prefix}/man/man1
%doc %{_prefix}/man/man1/cpp.1
%doc %{_prefix}/man/man1/gcov.1
# %doc %{_prefix}/man/man1/cccp.1
%doc %{_prefix}/man/man1/cpp.1*
%doc %{_prefix}/man/man1/gcov.1*
%dir %{_prefix}/man/man7
%doc %{_prefix}/man/man7/fsf-funding.7
%doc %{_prefix}/man/man7/gfdl.7
%doc %{_prefix}/man/man7/gpl.7
%doc %{_prefix}/man/man7/fsf-funding.7*
%doc %{_prefix}/man/man7/gfdl.7*
%doc %{_prefix}/man/man7/gpl.7*
%dir %{_prefix}/include
%{_prefix}/include/g++-v3
%post -n rtems-base-gcc
if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;

View File

@@ -60,13 +60,16 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
%prep
# untar the sources inside @target_alias@-gcc-newlib
%setup -c -n %{name} @SETUP@
%setup -c -T -n %{name} -a0 -a1
@PATCH2@
@PATCH4@
# Fix timestamps
gcc-@gcc_version@/contrib/gcc_update --touch
cd gcc-@gcc_version@
contrib/gcc_update --touch
cd ..
# Copy the C library into gcc's source tree
ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
test -d build || mkdir build
@@ -81,8 +84,9 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
../gcc-@gcc_version@/configure $CONFIGURE_ARGS --target=@target_alias@ \
--with-gnu-as --with-gnu-ld --with-newlib --verbose \
--with-system-zlib --disable-nls \
--enable-version-specific-runtime-libs \
--enable-threads=rtems --prefix=%{_prefix} @GCCLANGS@
make all
make info
@@ -93,20 +97,19 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
# ../gcc-@gcc_version@/mkinstalldirs \
# $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
#
make prefix=$RPM_BUILD_ROOT%{_prefix} install
cd @target_alias@/newlib
make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
# cd back to build/
cd ../..
# Bug in gcc-3.0.x: It puts the build dirs into *.la files
files=`find ${RPM_BUILD_ROOT}%{_prefix}/@target_alias@/lib -name '*.la'`
for i in $files; do
test -n "$files" && for i in $files; do
rm -f $i
done
# cd back to build/
cd ../..
# Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
# Rename it to target_alias-cpp
# if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
@@ -126,8 +129,19 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
echo "%dir %{_prefix}/lib/gcc-lib/@target_alias@" >> dirs ;
# Collect multilib subdirectories
TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
f=`gcc/xgcc -Bgcc/ --print-multi-lib | sed -e 's,;.*$,,'`
TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
for i in $f; do
case $i in
\.) echo "%dir ${TGTDIR}" >> dirs
;;
*) echo "%dir ${TGTDIR}/$i" >> dirs
;;
esac
done
TGTDIR="%{_prefix}/@target_alias@/lib"
for i in $f; do
case $i in
\.) echo "%dir ${TGTDIR}" >> dirs
@@ -142,22 +156,38 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
cp dirs files.g77
cp dirs files.objc
cp dirs files.gcj
cp dirs files.g++
TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
for i in $f; do
case $i in
*lib*.la);; # ignore: gcc produces bogus libtool libs
*f771) ;;
*cc1obj) ;;
*libobjc*) echo "$i" >> files.objc ;;
*include/objc*) ;;
*include/g++*);;
*jc1) ;;
*jvgenmain) ;;
*libstdc++.a) echo "$i" >> files.g++ ;;
*libsupc++.a) echo "$i" >> files.g++ ;;
*) echo "$i" >> files.gcc ;;
esac
done
TGTDIR="%{_prefix}/@target_alias@/lib"
f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
for i in $f; do
case $i in
*lib*.la);; # ignore - gcc produces bogus libtool libs
*libiberty.a) ;; # ignore - GPL'ed
# all other files belong to gcc
*) echo "$i" >> files.gcc ;;
esac
done
%clean
# let rpm --clean remove BuildRoot iif using the default BuildRoot
test "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}" && \
rm -rf $RPM_BUILD_ROOT

View File

@@ -0,0 +1,25 @@
# ==============================================================
# @target_alias@-c++
# ==============================================================
%package -n @target_alias@-c++
Provides: @target_alias@-c++
Summary: gcc/g++ compiler (c++) for @target_alias@
Group: rtems
Requires: rtems-base-gcc @target_alias@-gcc
%description -n @target_alias@-c++
RTEMS is an open source operating system for embedded systems.
This is the gcc/g++ compiler for @target_alias@
%files -n @target_alias@-c++ -f build/files.g++
%doc %{_prefix}/man/man1/@target_alias@-g++.1*
%dir %{_prefix}/bin
%{_prefix}/bin/@target_alias@-c++@exe_ext@
%{_prefix}/bin/@target_alias@-g++@exe_ext@
%{_prefix}/bin/@target_alias@-c++filt@exe_ext@
%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/cc1plus@exe_ext@
%dir %{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include
%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include/g++

View File

@@ -13,18 +13,12 @@ RTEMS is an open source operating system for embedded systems.
This is gcc and newlib C Library for @target_alias@.
%files -n @target_alias@-gcc -f build/files.gcc
%doc %{_prefix}/man/man1/@target_alias@-gcc.1
%doc %{_prefix}/man/man1/@target_alias@-g++.1
%doc %{_prefix}/man/man1/@target_alias@-gcc.1*
%{_prefix}/bin/@target_alias@-cpp@exe_ext@
%{_prefix}/bin/@target_alias@-c++@exe_ext@
%{_prefix}/bin/@target_alias@-g++@exe_ext@
%{_prefix}/bin/@target_alias@-gcc@exe_ext@
%{_prefix}/bin/@target_alias@-c++filt@exe_ext@
# %{_prefix}/bin/@target_alias@-protoize@exe_ext@
# %{_prefix}/bin/@target_alias@-unprotoize@exe_ext@
%{_prefix}/bin/@target_alias@-gcov@exe_ext@
%{_prefix}/bin/@target_alias@-gccbug@exe_ext@
%{_prefix}/@target_alias@/include
%dir %{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include
%{_prefix}/@target_alias@

View File

@@ -62,14 +62,12 @@ if test -n "${gcc3_patch_version}"; then
patchn=`expr $patchn + 1`
PATCH1="Patch${patchn}: gcc-${gcc3_version}-rtems-${gcc3_patch_version}.diff"
PATCH2="%patch${patchn} -p0"
SETUP="${SETUP} -a${patchn}"
fi
if test -n "${gcc3newlib_patch_version}"; then
patchn=`expr $patchn + 1`
PATCH3="Patch${patchn}: newlib-${gcc3newlib_version}-rtems-${gcc3newlib_patch_version}.diff"
PATCH4="%patch${patchn} -p0"
SETUP="${SETUP} -a${patchn}"
fi
# note that the variables in the gcc3newlib directory are actually the same
@@ -77,7 +75,6 @@ sed -e "s,@PATCH1\@,${PATCH1}," \
-e "s,@PATCH2\@,${PATCH2}," \
-e "s,@PATCH3\@,${PATCH3}," \
-e "s,@PATCH4\@,${PATCH4}," \
-e "s,@SETUP\@,${SETUP}," \
-e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
-e "s%@target_alias\@%${target_alias}%g" \
-e "s%@prefix\@%@prefix@%g" \