Changeset df1f734 in rtems


Ignore:
Timestamp:
04/03/02 17:58:26 (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
75db5285
Parents:
47f7dc5
Message:

2002-04-03 Ralf Corsepius <corsepiu@…>

  • mkbinutilspec.in: Add support for empty patch-version (no patch).
  • mkgcc3newlibspec.in: Ditto.
  • setup: Fix gcc3*_versions handling.
  • setup.def: binutils_patch_version=.
  • binutils/binutils.add: Reflect changes to mkbinutilspec.in, Use "%{_target_os}" != "%{_build_os}" to detect cross-building.
  • binutils/target-binutils.add: Comment out c++filt.
  • gcc3newlib/base-gcc.add: Remove duplicate libm.info.
  • gcc3newlib/gccnewlib.add: Reflect changes to mkgcc3newlibspec.in. Use "%{_target_os}" != "%{_build_os}" to detect cross-building. Comment out gcc-2.95.x hacks. Remove *.la from installed files.
  • gcc3newlib/gccnewlib_c_only.spec.in: Remove.
Location:
scripts
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • scripts/ChangeLog

    r47f7dc5 rdf1f734  
     12002-04-03      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * mkbinutilspec.in: Add support for empty patch-version (no patch).
     4        * mkgcc3newlibspec.in: Ditto.
     5        * setup: Fix gcc3*_versions handling.
     6        * setup.def: binutils_patch_version=.
     7        * binutils/binutils.add: Reflect changes to mkbinutilspec.in,
     8        Use "%{_target_os}" != "%{_build_os}" to detect cross-building.
     9        * binutils/target-binutils.add: Comment out c++filt.
     10        * gcc3newlib/base-gcc.add: Remove duplicate libm.info.
     11        * gcc3newlib/gccnewlib.add: Reflect changes to mkgcc3newlibspec.in.
     12        Use "%{_target_os}" != "%{_build_os}" to detect cross-building.
     13        Comment out gcc-2.95.x hacks.
     14        Remove *.la from installed files.
     15        * gcc3newlib/gccnewlib_c_only.spec.in: Remove.
     16
    1172001-04-02      Joel Sherrill <joel@OARcorp.com>
    218
  • scripts/binutils/binutils.add

    r47f7dc5 rdf1f734  
    2323
    2424Version:        @binutils_version@
    25 Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-@binutils_version@.tar.bz2
    26 # Patch0:               binutils-@binutils_version@-rtems-@binutils_patch_version@.diff
     25Source0:        ftp://ftp.gnu.org/pub/gnu/binutils/binutils-@binutils_version@.tar.bz2
     26@PATCH1@
     27
    2728#
    2829# The original sources are not included in the source RPM.
     
    4748# untar the sources inside @target_alias@-binutils
    4849%setup -c -n @target_alias@-binutils
    49 
    50 # %patch0 -p0
     50@PATCH2@
    5151  test -d build || mkdir build
    5252
    5353%build
    5454# HACK: This should be %{target} != %{build}, but SuSE's rpm screws it.
    55 %if "%{target_os}" != "%{build_os}"
     55%if "%{_target_os}" != "%{_build_os}"
    5656  CONFIGURE_ARGS="--build=%{_build} --host=%{_target}"
    5757%endif
  • scripts/binutils/target-binutils.add

    r47f7dc5 rdf1f734  
    2222%{_prefix}/bin/@target_alias@-ar@exe_ext@
    2323%{_prefix}/bin/@target_alias@-as@exe_ext@
    24 %{_prefix}/bin/@target_alias@-c++filt@exe_ext@
     24# c++filt now comes from gcc
     25# %{_prefix}/bin/@target_alias@-c++filt@exe_ext@
    2526%{_prefix}/bin/@target_alias@-gasp@exe_ext@
    2627%{_prefix}/bin/@target_alias@-ld@exe_ext@
  • scripts/gcc3newlib/base-gcc.add

    r47f7dc5 rdf1f734  
    1919%doc %{_prefix}/info/gcc.info*.gz
    2020%doc %{_prefix}/info/libc.info*.gz
    21 %doc %{_prefix}/info/libm.info*.gz
    2221%doc %{_prefix}/info/libm.info*.gz
    2322
  • scripts/gcc3newlib/gccnewlib.add

    r47f7dc5 rdf1f734  
    2626Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
    2727Source1:        ftp://sources.redhat.com/pub/newlib/newlib-@newlib_version@.tar.gz
    28 Patch0:         gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
    29 Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
     28@PATCH1@
     29@PATCH3@
    3030Buildroot:      %{_tmppath}/%{name}
    3131
     
    6161%prep
    6262# untar the sources inside @target_alias@-gcc-newlib
    63 %setup -c -n %{name} -a 0 -a 1
     63%setup -c -n %{name} @SETUP@
    6464
    65 %patch0 -p0
    66 %patch1 -p0
     65@PATCH2@
     66@PATCH4@
    6767
    6868  # Copy the C library into gcc's source tree
     
    7474
    7575# HACK: This should be %{target} != %{build}, but SuSE's rpm screws it.
    76 # %if "%{target_os}" != "%{build_os}"
    77 #   CONFIGURE_ARGS="--build=%{_build} --host=%{_target}"
    78 # %endif
     76%if "%{_target_os}" != "%{_build_os}"
     77   CONFIGURE_ARGS="--build=%{_build} --host=%{_target}"
     78%endif
    7979
    8080  ../gcc-@gcc_version@/configure $CONFIGURE_ARGS --target=@target_alias@ \
     
    8787%install
    8888  cd build
    89   # Bug in gcc-2.95.1: It doesn't build this installation directory
    90   # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
    91   ../gcc-@gcc_version@/mkinstalldirs \
    92     $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
    93 
     89#  # Bug in gcc-2.95.1: It doesn't build this installation directory
     90#  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
     91#  ../gcc-@gcc_version@/mkinstalldirs \
     92#    $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
     93#
     94 
    9495  make prefix=$RPM_BUILD_ROOT%{_prefix} install
    9596  cd @target_alias@/newlib
    9697  make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
     98
     99  # Bug in gcc-3.0.x: It puts the build dirs into *.la files
     100  files=`find ${RPM_BUILD_ROOT}%{_prefix}/@target_alias@/lib -name '*.la'`
     101  for i in $files; do
     102    rm -f $i
     103  done
    97104
    98105  # cd back to build/
     
    101108  # Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
    102109  # Rename it to target_alias-cpp
    103   if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
    104   then
    105     mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \
    106       $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@
    107   fi
     110#  if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
     111#  then
     112#    mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \
     113#      $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@
     114#  fi
    108115
    109116  # gzip info files
  • scripts/gcc3newlib/gccnewlib_c_only.spec.in

    r47f7dc5 rdf1f734  
    1 #
    2 # spec file for building gcc for rtems
    3 #
    4 # Copyright  (c) 1999,2000,2001 OARCorp, Huntsville, AL
    5 #
    6 # please send bugfixes or comments to joel@OARcorp.com
    7 #
    8 
    9 %define _prefix @prefix@
    10 
    11 Vendor:       OAR Corporation
    12 Distribution: Linux
    13 Name:         @target_alias@-gcc-newlib
    14 Summary:      gcc and newlib C Library for @target_alias@.
    15 Group:        rtems
    16 Release:      @Release@
    17 License:      gcc is GPL/LGPL ; newlib no has restrictions on run-time usage
    18 
    19 Autoreqprov:    on
    20 Packager:       corsepiu@faw.uni-ulm.de and joel@OARcorp.com
    21 
    22 Version:        gcc@gcc_version@newlib@newlib_version@
    23 # gcc 3.x and gcc 2.9
    24 # Source0:      ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.bz2
    25 # gcc 2.95.x
    26 Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
    27 Source1:        ftp://sources.redhat.com/pub/newlib/newlib-@newlib_version@.tar.gz
    28 Patch0:         gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
    29 Patch1:         newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
    30 Buildroot:      %{_tmppath}/%{name}
    31 
    32 #
    33 # The original sources are not included in the source RPM.
    34 # If we included them, then the source RPMs for each target
    35 # would duplicate MBs of source unnecessarily.  This is
    36 # a duplication of over 30 MBs of source for each of
    37 # the more than 10 targets it is possible to build.
    38 #
    39 # You can get them yourself from the Internet and copy them to
    40 # your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
    41 # Or you can try the ftp options of rpm :-)
    42 #
    43 NoSource:       0
    44 NoSource:       1
    45 
    46 %description
    47 RTEMS is an open source operating system for embedded systems.
    48 
    49 This is gcc's and newlib C Library's sources with patches for RTEMS.
    50 
    51  The original sources are not included in the source RPM.
    52  If we included them, then the source RPMs for each target
    53  would duplicate MBs of source unnecessarily.  This is
    54  a duplication of over 30 MBs of source for each of
    55  the more than 10 targets it is possible to build.
    56 
    57  You can get them yourself from the Internet and copy them to
    58  your /usr/src/[redhat|packages]/SOURCES directory ($RPM_SOURCE_DIR).
    59  Or you can try the ftp options of rpm :-)
    60 
    61 %prep
    62 # untar the sources inside @target_alias@-gcc-newlib
    63 %setup -c -n %{name} -a 0 -a 1
    64 
    65 %patch0 -p0
    66 %patch1 -p0
    67 
    68   # Copy the C library into gcc's source tree
    69   ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@
    70   test -d build || mkdir build
    71 
    72 %build
    73   cd build
    74 
    75 # HACK: This should be %{target} != %{build}, but SuSE's rpm screws it.
    76 # %if "%{target_os}" != "%{build_os}"
    77 #   CONFIGURE_ARGS="--build=%{_build} --host=%{_target}"
    78 # %endif
    79 
    80   ../gcc-@gcc_version@/configure $CONFIGURE_ARGS --target=@target_alias@ \
    81     --with-gnu-as --with-gnu-ld --with-newlib --verbose \
    82     --enable-threads=rtems --prefix=%{_prefix} '--enable-languages=c,c++'
    83 
    84   make all
    85   make info
    86 
    87 %install
    88   cd build
    89   # Bug in gcc-2.95.1: It doesn't build this installation directory
    90   # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
    91   ../gcc-@gcc_version@/mkinstalldirs \
    92     $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
    93 
    94   make prefix=$RPM_BUILD_ROOT%{_prefix} install
    95   cd @target_alias@/newlib
    96   make prefix=$RPM_BUILD_ROOT%{_prefix} install-info
    97 
    98   # cd back to build/
    99   cd ../..
    100 
    101   # Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
    102   # Rename it to target_alias-cpp
    103   if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
    104   then
    105     mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \
    106       $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@
    107   fi
    108 
    109   # gzip info files
    110   gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null
    111   gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-? 2>/dev/null
    112   gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info-?? 2>/dev/null
    113 
    114   rm -f dirs ;
    115   echo "%dir %{_prefix}/lib" >> dirs ;
    116   echo "%dir %{_prefix}/lib/gcc-lib" >> dirs ;
    117   echo "%dir %{_prefix}/lib/gcc-lib/@target_alias@" >> dirs ;
    118 
    119   # Collect multilib subdirectories
    120   TGTDIR="%{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@"
    121   f=`gcc/xgcc --print-multi-lib | sed -e 's,;.*$,,'`
    122   for i in $f; do
    123     case $i in
    124     \.) echo "%dir ${TGTDIR}" >> dirs
    125       ;;
    126     *)  echo "%dir ${TGTDIR}/$i" >> dirs
    127       ;;
    128     esac
    129   done
    130 
    131   # Collect files to go into different packages
    132   cp dirs files.gcc
    133   cp dirs files.g77
    134   cp dirs files.objc
    135   cp dirs files.gcj
    136 
    137   f=`find ${RPM_BUILD_ROOT}${TGTDIR} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g"`;
    138   for i in $f; do
    139     case $i in
    140     *f771) ;;
    141     *cc1obj) ;;
    142     *libobjc*) echo "$i" >> files.objc ;;
    143     *include/objc*) ;;
    144     *jc1) ;;
    145     *jvgenmain) ;;
    146     *) echo "$i" >> files.gcc ;;
    147     esac
    148   done
    149 
    150 %clean
    151 # let rpm --clean remove BuildRoot iif using the default BuildRoot
    152   test "$RPM_BUILD_ROOT" = "%{_tmppath}/%{name}" && \
    153     rm -rf $RPM_BUILD_ROOT
    154 
    155 # ==============================================================
    156 # rtems-base-gcc
    157 # ==============================================================
    158 %package -n rtems-base-gcc
    159 Provides:       rtems-base-gcc
    160 Summary:        base package for rtems gcc and newlib C Library
    161 Group: rtems
    162 
    163 %description -n rtems-base-gcc
    164 
    165 RTEMS is an open source operating system for embedded systems.
    166 
    167 This is the files for gcc and newlib that are shared by all targets.
    168 
    169 %files -n rtems-base-gcc
    170 %dir %{_prefix}/info
    171 %doc %{_prefix}/info/cpp.info*.gz
    172 %doc %{_prefix}/info/cppinternals.info*.gz
    173 %doc %{_prefix}/info/gcc.info*.gz
    174 %doc %{_prefix}/info/libc.info*.gz
    175 %doc %{_prefix}/info/libm.info*.gz
    176 %doc %{_prefix}/info/libm.info*.gz
    177 
    178 %dir %{_prefix}/bin
    179 %{_prefix}/bin/gcov@exe_ext@
    180 %{_prefix}/bin/gccbug@exe_ext@
    181 
    182 %dir %{_prefix}/man
    183 %dir %{_prefix}/man/man1
    184 %doc %{_prefix}/man/man1/cpp.1
    185 %doc %{_prefix}/man/man1/gcov.1
    186 # %doc %{_prefix}/man/man1/cccp.1
    187 %dir %{_prefix}/man/man7
    188 %doc %{_prefix}/man/man7/fsf-funding.7
    189 %doc %{_prefix}/man/man7/gfdl.7
    190 %doc %{_prefix}/man/man7/gpl.7
    191 
    192 %dir %{_prefix}/include
    193 %{_prefix}/include/g++-v3
    194 
    195 %post -n rtems-base-gcc
    196   if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
    197   then
    198     rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
    199     f=`find $RPM_INSTALL_PREFIX%{_prefix}/info -name '*.info.gz'`
    200     test -n "$f" && for i in $f; do
    201       install-info $i $RPM_INSTALL_PREFIX%{_prefix}/info/dir
    202     done
    203   fi
    204 
    205 %postun -n rtems-base-gcc
    206   if test -d $RPM_INSTALL_PREFIX%{_prefix}/info;
    207   then
    208     rm -f $RPM_INSTALL_PREFIX%{_prefix}/info/dir
    209     f=`find $RPM_INSTALL_PREFIX%{_prefix}/info -name '*.info.gz'`
    210     test -n "$f" && for i in $f; do
    211       install-info $i $RPM_INSTALL_PREFIX%{_prefix}/info/dir
    212     done
    213   fi
    214 
    215 # ==============================================================
    216 # @target_alias@-gcc
    217 # ==============================================================
    218 %package -n @target_alias@-gcc
    219 Provides:       @target_alias@-gcc
    220 Summary:        rtems gcc and newlib C Library for @target_alias@
    221 Group: rtems
    222 Requires: @target_alias@-binutils rtems-base-gcc
    223 
    224 %description -n @target_alias@-gcc
    225 RTEMS is an open source operating system for embedded systems.
    226 
    227 This is gcc and newlib C Library for @target_alias@.
    228 
    229 %files -n @target_alias@-gcc -f build/files.gcc
    230 %doc %{_prefix}/man/man1/@target_alias@-gcc.1
    231 %doc %{_prefix}/man/man1/@target_alias@-g++.1
    232 
    233 %{_prefix}/bin/@target_alias@-cpp@exe_ext@
    234 %{_prefix}/bin/@target_alias@-c++@exe_ext@
    235 %{_prefix}/bin/@target_alias@-g++@exe_ext@
    236 %{_prefix}/bin/@target_alias@-gcc@exe_ext@
    237 %{_prefix}/bin/@target_alias@-c++filt@exe_ext@
    238 # %{_prefix}/bin/@target_alias@-protoize@exe_ext@
    239 # %{_prefix}/bin/@target_alias@-unprotoize@exe_ext@
    240 
    241 %dir %{_prefix}/lib/gcc-lib/@target_alias@/@gcc_version@/include
    242 
    243 %{_prefix}/@target_alias@
    244 
  • scripts/mkbinutilspec.in

    r47f7dc5 rdf1f734  
    5151specfile=${dst}/$target_alias-binutils-${binutils_version}.spec
    5252
     53if test -n "${binutils_patch_version}"; then
     54PATCH1="Patch0: binutils-${binutils_version}-rtems-${binutils_patch_version}.diff"
     55PATCH2="%patch -p0 -P0"
     56fi
     57
    5358sed -e "s%@Release\@%${binutils_rpm_release}%g" \
    5459    -e "s%@rpm_build_root\@%${rpm_build_root}%g" \
     
    5863    -e "s%@binutils_patch_version\@%${binutils_patch_version}%g" \
    5964    -e "s%@exe_ext\@%${exe_ext}%g" \
     65    -e "s,@PATCH1\@,${PATCH1}," \
     66    -e "s,@PATCH2\@,${PATCH2}," \
    6067< ${RTEMS_DIR}/binutils/binutils.spec.in \
    6168> ${specfile}
  • scripts/mkgcc3newlibspec.in

    r47f7dc5 rdf1f734  
    5858specfile=${dst}/${target_alias}-gcc-${gcc3_version}-newlib-${gcc3newlib_version}.spec
    5959
     60patchn=-1
     61if test -n "${gcc3_patch_version}"; then
     62patchn=`expr $patchn + 1`
     63PATCH1="Patch${patchn}: gcc-${gcc3_version}-rtems-${gcc3_patch_version}.diff"
     64PATCH2="%patch${patchn} -p0"
     65SETUP="${SETUP} -a${patchn}"
     66fi
     67
     68if test -n "${gcc3newlib_patch_version}"; then
     69patchn=`expr $patchn + 1`
     70PATCH3="Patch${patchn}: newlib-${gcc3newlib_version}-rtems-${gcc3newlib_patch_version}.diff"
     71PATCH4="%patch${patchn} -p0"
     72SETUP="${SETUP} -a${patchn}"
     73fi
     74
    6075# note that the variables in the gcc3newlib directory are actually the same
    61 sed -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
     76sed -e "s,@PATCH1\@,${PATCH1}," \
     77    -e "s,@PATCH2\@,${PATCH2}," \
     78    -e "s,@PATCH3\@,${PATCH3}," \
     79    -e "s,@PATCH4\@,${PATCH4}," \
     80    -e "s,@SETUP\@,${SETUP}," \
     81    -e "s%@Release\@%${gcc3newlib_rpm_release}%g" \
    6282    -e "s%@target_alias\@%${target_alias}%g" \
    6383    -e "s%@prefix\@%@prefix@%g" \
  • scripts/setup

    r47f7dc5 rdf1f734  
    8181     read gcc3_patch_version ;;
    8282  g) echo -n "NEWLIB source >"
    83      read newlib_version ;;
     83     read gcc3newlib_version ;;
    8484  h) echo -n "NEWLIB patch version>"
    85      read newlib_patch_version ;;
     85     read gcc3newlib_patch_version ;;
    8686  i) echo -n "GCC3/NEWLIB RPM release >"
    8787     read gcc3newlib_rpm_release ;;
  • scripts/setup.def

    r47f7dc5 rdf1f734  
    55#
    66binutils_version=2.12
    7 binutils_patch_version=none
     7binutils_patch_version=
    88binutils_rpm_release=1
    99newlib_version=1.10.0
Note: See TracChangeset for help on using the changeset viewer.