Changeset 9724b05 in rtems


Ignore:
Timestamp:
05/18/05 15:46:21 (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
d7f3b91d
Parents:
07cf62a
Message:

Reflect changes to mkspec.in.
Use --with/--without, rework logic for building optional languages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/gccnewlib/gccnewlib.add

    r07cf62a r9724b05  
    1818Source0:        ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}@gcc_suffix@
    1919Source1:        ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}@newlib_suffix@
     20@PATCH0@
    2021@PATCH1@
    21 @PATCH3@
    2222BuildRequires:  texinfo >= 4.2
    2323BuildRequires:  %{rpmprefix}%{gcc_target}-binutils
     
    3737%{?!_with_sources:NoSource:     1}
    3838
    39 # Use rpm -ba --define 'gnat [0|1]' xxx.spec to override building gnat for
    40 # those targets wanting to support ada.
    41 
    42 # default to not building gnat
    43 %define _gnat   %{?gnat:%gnat}%{!?gnat:0}
    44 
    45 # Use rpm -ba --define 'gcj [0|1]' xxx.spec to override building gcj for
    46 # those targets wanting to support gcj.
    47 
    48 # default to not building gcj
    49 %define _gcj    %{?gcj:%gcj}%{!?gcj:0}
    50 
    51 %define build_cxx       %{?cxx:%cxx}%{!?cxx:1}
     39# default languages to build
     40%define _cxx            1
     41%define _fortran        0
     42%define _gcj            0
     43%define _gnat           0
     44%define _objc           0
     45%define _libgcj         0
     46
     47
     48# custom defaults for specific targets
     49%if "%{gcc_target}" == "arm-rtems@osversion@"
     50# Gnat lacks arm support
     51%define _gnat           0
     52%endif
     53
     54%if "%{gcc_target}" == "avr-rtems@osversion@"
     55%define _cxx            0
     56%define _fortran        0
     57%define _gcj            0
     58%define _gnat           0
     59%endif
     60
     61%if "%{gcc_target}" == "h8300-rtems@osversion@"
     62%define _fortran        0
     63%define _gcj            0
     64%define _gnat           0
     65%endif
     66
     67%if "%{gcc_target}" == "sh-rtems@osversion@"
     68# Triggers an ICE in GCC-4.0.0
     69%define _gnat           0
     70%endif
     71
     72%if "%{gcc_target}" == "tic4x-rtems@osversion@"
     73%define _cxx            0
     74%define _gnat           0
     75%define _gcj            0
     76%define _fortran        0
     77%endif
     78
     79
     80# Allow the user to build arbitrary languages
     81%{?_with_cxx:%define _cxx 1}
     82%{?_with_fortran:%define _fortran 1}
     83%{?_with_gcj:%define _gcj 1}
     84%{?_with_gnat:%define _gnat 1}
     85%{?_with_objc:%define _objc 1}
     86%{?_with_libgcj:%define _libgcj 1}
     87
     88# Allow the user to suppress building languages
     89%{?_without_cxx:%define _cxx 0}
     90%{?_without_fortran:%define _fortran 0}
     91%{?_without_gcj:%define _gcj 0}
     92%{?_without_gnat:%define _gnat 0}
     93%{?_without_objc:%define _objc 0}
     94%{?_without_libgcj:%define _libgcj 0}
     95
     96%define build_cxx       %_cxx
    5297%if "%{gcc_version}" >= "4.0.0"
    53 %define build_f95       %{?f95:%f95}%{!?f95:0}
     98%define build_f95       %_fortran
    5499%define build_g77       0
    55100%else
    56101%define build_f95       0
    57 %define build_g77       %{?g77:%g77}%{!?g77:0}
    58 %endif
    59 %define build_objc      %{?objc:%objc}%{!?objc:0}
     102%define build_g77       %_fortran
     103%endif
     104%define build_gnat      %_gnat
    60105%define build_gcj       %_gcj
    61 %define build_gnat      %_gnat
    62 
    63 %if "%{gcc_target}" == "arm-rtems@osversion@"
    64 # Gnat lacks arm support
    65 %define build_gnat      0
    66 %endif
    67 
    68 %if "%{gcc_target}" == "avr-rtems@osversion@"
    69 %define build_cxx       0
    70 %define build_f95       0
    71 %define build_gcj       0
    72 %define build_gnat      0
    73 %endif
    74 
    75 %if "%{gcc_target}" == "h8300-rtems@osversion@"
    76 %define build_f95       0
    77 %define build_gcj       0
    78 %define build_gnat      0
    79 %endif
    80 
    81 %if "%{gcc_target}" == "sh-rtems@osversion@"
    82 # Triggers an ICE in GCC-4.0.0
    83 %define build_gnat      0
    84 %endif
    85 
    86 %if "%{gcc_target}" == "tic4x-rtems@osversion@"
    87 %define build_cxx       0
    88 %define build_gnat      0
    89 %define build_gcj       0
    90 %define build_f95       0
    91 %endif
     106%define build_objc      %_objc
     107%define build_libgcj    %_libgcj
    92108
    93109%if %build_gcj
     
    181197  languages="$languages,ada"
    182198%endif
    183 
     199%if %build_libgcj
     200  optargs="--enable-libgcj"
     201%endif
    184202  export PATH="%{_bindir}:${PATH}"
    185203  ../gcc-%{gcc_version}/configure \
     
    196214    --enable-version-specific-runtime-libs \
    197215    --enable-threads=rtems \
    198     --enable-languages=$languages %{?build_libgcj:--enable-libgcj}
     216    --enable-languages=$languages $optargs
    199217
    200218%if "%_host" != "%_build"
Note: See TracChangeset for help on using the changeset viewer.