Changeset fa42a76 in rtems


Ignore:
Timestamp:
Aug 19, 2002, 6:28:42 AM (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
845f170a
Parents:
3549ab0
Message:

2002-08-19 Ralf Corsepius <corsepiu@…>

  • gcc3newlib/gccnewlib.add: Re-add i386-rtems Ada. Add %_gnat and --define 'gnat [0|1]' support. Enable gnat for gcc-3.2/Disable for gcc-3.1. Add hacks to build gnatlib. Re-activate commented out fragments for old gcc versions. Add @target_alias@-gnatgcc.
Location:
scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/ChangeLog

    r3549ab0 rfa42a76  
     12002-08-19      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * gcc3newlib/gccnewlib.add: Re-add i386-rtems Ada.
     4        Add %_gnat and --define 'gnat [0|1]' support.
     5        Enable gnat for gcc-3.2/Disable for gcc-3.1.
     6        Add hacks to build gnatlib.
     7        Re-activate commented out fragments for old gcc versions.
     8        Add @target_alias@-gnatgcc.
     9
    1102002-08-15      Joel Sherrill <joel@OARcorp.com>
    211
  • scripts/gcc3newlib/gccnewlib.add

    r3549ab0 rfa42a76  
    4444NoSource:       1
    4545
     46# Use rpm -ba --define 'gnat [0|1]' xxx.spec to override building gnat for
     47# those targets wanting to support ada.
     48
     49%if "@gcc_version@" >= "3.2"
     50# default to building gnat
     51%define _gnat   %{?gnat:%gnat}%{!?gnat:1}
     52%else
     53# default to not building gnat
     54%define _gnat   %{?gnat:%gnat}%{!?gnat:0}
     55%endif
     56
    4657%define build_cxx       1
    4758%define build_g77       0
     
    5465%endif
    5566
     67%if "@target_alias@" == "i386-rtems"
     68%define build_gnat      %_gnat
     69%endif
     70
    5671%if "@target_alias@" == "i960-rtems"
    5772%define build_cxx       0
     
    5974
    6075%if "@target_alias@" == "powerpc-rtems"
    61 %define build_gnat      1
     76%define build_gnat      %_gnat
    6277%endif
    6378
    6479%if "@target_alias@" == "sparc-rtems"
    65 %define build_gnat      1
     80%define build_gnat      %_gnat
    6681%endif
    6782
     
    134149  make all
    135150%if %build_gnat
     151# This gnat configuration is crap :(
     152
    136153# This is what is documented, but it doesn't work for me (RC)
    137154#  make gnatlib_and_tools
    138155  make -C gcc cross-gnattools
    139156  make -C gcc ada.all.cross
    140   make -C gcc gnatlib
     157
     158# This should work, but doesn't.
     159#  make -C gcc gnatlib
     160
     161# This is what gcc/ada/Makefile.in contains by default,
     162# but what we override below
     163  GNATLIBCFLAGS="-g -O2"
     164# Let gnatlib building find newlib's headers
     165  GNATLIBCFLAGS="$GNATLIBCFLAGS -isystem `pwd`/@target_alias@/newlib/targ-include"
     166  GNATLIBCFLAGS="$GNATLIBCFLAGS -isystem `pwd`/../newlib-@newlib_version@/newlib/libc/include"
     167# Without this xgcc doesn't find the target's binutils.
     168  GNATLIBCFLAGS="$GNATLIBCFLAGS -B%{_prefix}/@target_alias@/bin/"
     169  make -C gcc GNATLIBCFLAGS="${GNATLIBCFLAGS}" gnatlib
    141170%endif
    142171  make info
     
    144173%install
    145174  cd build
    146 #  # Bug in gcc-2.95.1: It doesn't build this installation directory
    147 #  # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
    148 #  ../gcc-@gcc_version@/mkinstalldirs \
    149 #    $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
    150 #
     175# Bug in gcc-2.95.1: It doesn't build this installation directory
     176# If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc
     177%if "@gcc_version@" < "3.0"
     178  ../gcc-@gcc_version@/mkinstalldirs \
     179    $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin
     180%endif
    151181
    152182  make prefix=$RPM_BUILD_ROOT%{_prefix} \
     
    158188  cd ../..
    159189
    160   # Bug in gcc-3.0.x: It puts the build dirs into *.la files
     190%if %build_gnat
     191# Install a copy of gcc as gnatgcc
     192# Enables us to mix different versions of gnat and gnatgcc
     193  rm -f $RPM_BUILD_ROOT%{_bindir}/@target_alias@-gnatgcc@exe_ext@
     194  ln $RPM_BUILD_ROOT%{_bindir}/@target_alias@-gcc@exe_ext@ \
     195    $RPM_BUILD_ROOT%{_bindir}/@target_alias@-gnatgcc@exe_ext@
     196%endif
     197
     198  # Bug in gcc-3.x: It puts the build dirs into *.la files
    161199  files=`find ${RPM_BUILD_ROOT}%{_prefix}/@target_alias@/lib -name '*.la'`
    162200  test -n "$files" && for i in $files; do
     
    164202  done
    165203
     204%if "@gcc_version@" < "3.0"
    166205  # Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets.
    167206  # Rename it to target_alias-cpp
    168 #  if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
    169 #  then
    170 #    mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \
    171 #      $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@
    172 #  fi
     207  if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@;
     208  then
     209    mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \
     210      $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@
     211  fi
     212%endif
    173213
    174214  # gzip info files
Note: See TracChangeset for help on using the changeset viewer.