Ticket #209: rtems-rc-20020515-1.diff

File rtems-rc-20020515-1.diff, 8.7 KB (added by Ralf Corsepius, on Dec 3, 2006 at 1:31:13 PM)

rtems-rc-20020515-1.diff

  • new file ./scripts/changes-20020515-1

    - +  
     12002-06-15      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * mkgcc3newlibspec.in: Remove SETUP (bogus).
     4        * gcc3newlib/target-c++.add: New.
     5        * gcc3newlib/Makefile.am: Add target-c++.add.
     6        * gcc3newlib/base-g77.add: Adapt to gcc-3.1.
     7        Reflect having split out c++. Various minor fixes.
     8        * gcc3newlib/base-gcc.add: Ditto.
     9        * gcc3newlib/gccnewlib.add: Ditto.
     10        * gcc3newlib/target-gcc.add: Ditto.
     11
  • ./scripts/mkgcc3newlibspec.in

    old new  
    6262patchn=`expr $patchn + 1`
    6363PATCH1="Patch${patchn}: gcc-${gcc3_version}-rtems-${gcc3_patch_version}.diff"
    6464PATCH2="%patch${patchn} -p0"
    65 SETUP="${SETUP} -a${patchn}"
    6665fi
    6766
    6867if test -n "${gcc3newlib_patch_version}"; then
    6968patchn=`expr $patchn + 1`
    7069PATCH3="Patch${patchn}: newlib-${gcc3newlib_version}-rtems-${gcc3newlib_patch_version}.diff"
    7170PATCH4="%patch${patchn} -p0"
    72 SETUP="${SETUP} -a${patchn}"
    7371fi
    7472
    7573# note that the variables in the gcc3newlib directory are actually the same
     
    7775    -e "s,@PATCH2\@,${PATCH2}," \
    7876    -e "s,@PATCH3\@,${PATCH3}," \
    7977    -e "s,@PATCH4\@,${PATCH4}," \
    80     -e "s,@SETUP\@,${SETUP}," \
    8178    -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
    8279    -e "s%@target_alias\@%${target_alias}%g" \
    8380    -e "s%@prefix\@%@prefix@%g" \
  • new file ./scripts/gcc3newlib/target-c++.add

    - +  
     1# ==============================================================
     2# @target_alias@-c++
     3# ==============================================================
     4%package -n @target_alias@-c++
     5Provides:       @target_alias@-c++
     6Summary:      gcc/g++ compiler (c++) for @target_alias@
     7Group: rtems
     8Requires: rtems-base-gcc @target_alias@-gcc
     9
     10%description -n @target_alias@-c++
     11RTEMS is an open source operating system for embedded systems.
     12
     13This is the gcc/g++ compiler for @target_alias@
     14
     15%files -n @target_alias@-c++ -f build/files.g++
     16%doc %{_prefix}/man/man1/@target_alias@-g++.1*
     17
     18%dir %{_prefix}/bin
     19%{_prefix}/bin/@target_alias@-c++@exe_ext@
     20%{_prefix}/bin/@target_alias@-g++@exe_ext@
     21%{_prefix}/bin/@target_alias@-c++filt@exe_ext@
     22
     23%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/cc1plus@exe_ext@
     24%dir %{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include
     25%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include/g++
  • ./scripts/gcc3newlib/Makefile.am

    old new  
    88    base-gcc.add target-gcc.add \
    99    base-g77.add target-g77.add \
    1010    base-gcj.add target-gcj.add \
    11     target-objc.add
     11    target-objc.add \
     12    target-c++.add
    1213
    1314gccnewlib.spec.in: $(SUBPACKAGES)
    1415        cat $^ \
    1516        | sed -e 's%@GCCLANGS@%%g' > $@
    1617CLEANFILES = gccnewlib.spec.in
    1718
    18 gccnewlib_c_only.spec.in: gccnewlib.add base-gcc.add target-gcc.add
     19gccnewlib_c_only.spec.in: gccnewlib.add base-gcc.add target-gcc.add \
     20        target-c++.add
    1921        cat $^ \
    2022        | sed -e "s%@GCCLANGS@%\'--enable-languages=c,c++\'%g" > $@
    2123CLEANFILES += gccnewlib_c_only.spec.in
  • ./scripts/gcc3newlib/base-g77.add

    old new  
    1818
    1919%dir %{_prefix}/man
    2020%dir %{_prefix}/man/man1
    21 %doc %{_prefix}/man/man1/@target_alias@-g77.1
     21%doc %{_prefix}/man/man1/@target_alias@-g77.1*
    2222
    2323%post -n rtems-base-g77
    2424  if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
  • ./scripts/gcc3newlib/base-gcc.add

    old new  
    2020%doc %{_prefix}/info/libc.info*.gz
    2121%doc %{_prefix}/info/libm.info*.gz
    2222
    23 %dir %{_prefix}/bin
    24 %{_prefix}/bin/gcov@exe_ext@
    25 %{_prefix}/bin/gccbug@exe_ext@
    26 
    2723%dir %{_prefix}/man
    2824%dir %{_prefix}/man/man1
    29 %doc %{_prefix}/man/man1/cpp.1
    30 %doc %{_prefix}/man/man1/gcov.1
    31 # %doc %{_prefix}/man/man1/cccp.1
     25%doc %{_prefix}/man/man1/cpp.1*
     26%doc %{_prefix}/man/man1/gcov.1*
    3227%dir %{_prefix}/man/man7
    33 %doc %{_prefix}/man/man7/fsf-funding.7
    34 %doc %{_prefix}/man/man7/gfdl.7
    35 %doc %{_prefix}/man/man7/gpl.7
     28%doc %{_prefix}/man/man7/fsf-funding.7*
     29%doc %{_prefix}/man/man7/gfdl.7*
     30%doc %{_prefix}/man/man7/gpl.7*
    3631
    3732%dir %{_prefix}/include
    38 %{_prefix}/include/g++-v3
    3933
    4034%post -n rtems-base-gcc
    4135  if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
  • ./scripts/gcc3newlib/gccnewlib.add

    old new  
    6060
    6161%prep
    6262# untar the sources inside @target_alias@-gcc-newlib
    63 %setup -c -n %{name} @SETUP@
     63%setup -c -T -n %{name} -a0 -a1
    6464
    6565@PATCH2@
    6666@PATCH4@
    6767
    6868  # Fix timestamps
    69   gcc-@gcc_version@/contrib/gcc_update --touch
     69  cd gcc-@gcc_version@
     70    contrib/gcc_update --touch
     71  cd ..
     72
    7073  # Copy the C library into gcc's source tree
    7174  ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
    7275  test -d build || mkdir build
     
    8184
    8285  ../gcc-@gcc_version@/configure $CONFIGURE_ARGS --target=@target_alias@ \
    8386    --with-gnu-as --with-gnu-ld --with-newlib --verbose \
     87    --with-system-zlib --disable-nls \
     88    --enable-version-specific-runtime-libs \
    8489    --enable-threads=rtems --prefix=%{_prefix} @GCCLANGS@
    85 
    8690  make all
    8791  make info
    8892
     
    9397#  ../gcc-@gcc_version@/mkinstalldirs \
    9498#    $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
    9599#
    96  
     100
    97101  make prefix=$RPM_BUILD_ROOT%{_prefix} install
    98102  cd @target_alias@/newlib
    99103  make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
     104  # cd back to build/
     105  cd ../..
    100106
    101107  # Bug in gcc-3.0.x: It puts the build dirs into *.la files
    102108  files=`find ${RPM_BUILD_ROOT}%{_prefix}/@target_alias@/lib -name '*.la'`
    103   for i in $files; do
     109  test -n "$files" && for i in $files; do
    104110    rm -f $i
    105111  done
    106112
    107   # cd back to build/
    108   cd ../..
    109 
    110113  # Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
    111114  # Rename it to target_alias-cpp
    112115#  if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
     
    126129  echo "%dir %{_prefix}/lib/gcc-lib/@target_alias@" >> dirs ;
    127130
    128131  # Collect multilib subdirectories
    129   TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
    130132  f=`gcc/xgcc -Bgcc/ --print-multi-lib | sed -e 's,;.*$,,'`
     133
     134  TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
     135  for i in $f; do
     136    case $i in
     137    \.) echo "%dir ${TGTDIR}" >> dirs
     138      ;;
     139    *)  echo "%dir ${TGTDIR}/$i" >> dirs
     140      ;;
     141    esac
     142  done
     143
     144  TGTDIR="%{_prefix}/@target_alias@/lib"
    131145  for i in $f; do
    132146    case $i in
    133147    \.) echo "%dir ${TGTDIR}" >> dirs
     
    142156  cp dirs files.g77
    143157  cp dirs files.objc
    144158  cp dirs files.gcj
     159  cp dirs files.g++
    145160
     161  TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
    146162  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
    147163  for i in $f; do
    148164    case $i in
     165    *lib*.la);; # ignore: gcc produces bogus libtool libs
    149166    *f771) ;;
    150167    *cc1obj) ;;
    151168    *libobjc*) echo "$i" >> files.objc ;;
    152169    *include/objc*) ;;
     170    *include/g++*);;
    153171    *jc1) ;;
    154172    *jvgenmain) ;;
     173    *libstdc++.a) echo "$i" >> files.g++ ;;
     174    *libsupc++.a) echo "$i" >> files.g++ ;;
    155175    *) echo "$i" >> files.gcc ;;
    156176    esac
    157177  done
    158178
     179  TGTDIR="%{_prefix}/@target_alias@/lib"
     180  f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
     181  for i in $f; do
     182    case $i in
     183    *lib*.la);; # ignore - gcc produces bogus libtool libs
     184    *libiberty.a) ;; # ignore - GPL'ed
     185# all other files belong to gcc
     186    *) echo "$i" >> files.gcc ;;
     187    esac
     188  done
     189
    159190%clean
    160191# let rpm --clean remove BuildRoot iif using the default BuildRoot
    161192  test "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}" && \
    162193    rm -rf $RPM_BUILD_ROOT
    163 
  • ./scripts/gcc3newlib/target-gcc.add

    old new  
    1313This is gcc and newlib C Library for @target_alias@.
    1414
    1515%files -n @target_alias@-gcc -f build/files.gcc
    16 %doc %{_prefix}/man/man1/@target_alias@-gcc.1
    17 %doc %{_prefix}/man/man1/@target_alias@-g++.1
     16%doc %{_prefix}/man/man1/@target_alias@-gcc.1*
    1817
    1918%{_prefix}/bin/@target_alias@-cpp@exe_ext@
    20 %{_prefix}/bin/@target_alias@-c++@exe_ext@
    21 %{_prefix}/bin/@target_alias@-g++@exe_ext@
    2219%{_prefix}/bin/@target_alias@-gcc@exe_ext@
    23 %{_prefix}/bin/@target_alias@-c++filt@exe_ext@
    24 # %{_prefix}/bin/@target_alias@-protoize@exe_ext@
    25 # %{_prefix}/bin/@target_alias@-unprotoize@exe_ext@
     20%{_prefix}/bin/@target_alias@-gcov@exe_ext@
     21%{_prefix}/bin/@target_alias@-gccbug@exe_ext@
     22%{_prefix}/@target_alias@/include
    2623
    2724%dir %{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include
    28 
    29 %{_prefix}/@target_alias@
    30