source: rtems/contrib/crossrpms/gcc/build.add @ 6ae5406c

4.10
Last change on this file since 6ae5406c was 6ae5406c, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/16/11 at 05:19:58

Partial merger from CVS-HEAD.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1%build
2  mkdir -p build
3
4  cd build
5
6  languages="c"
7%if %build_cxx
8  languages="$languages,c++"
9%endif
10%if %build_fortran
11  languages="$languages,fortran"
12%endif
13%if %build_gcj
14  languages="$languages,java"
15%endif
16%if %build_objc
17  languages="$languages,objc"
18%endif
19%if %build_gnat
20  languages="$languages,ada"
21%endif
22%if "%{_prefix}" != "/usr"
23  export PATH="%{_bindir}:${PATH}"
24%endif
25%if "%{_build}" != "%{_host}"
26  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
27  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
28%else
29# gcc is not ready to be compiled with -std=gnu99
30  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
31%endif
32  ../gcc-%{gcc_pkgvers}/configure \
33    --prefix=%{_prefix} \
34    --bindir=%{_bindir} \
35    --exec_prefix=%{_exec_prefix} \
36    --includedir=%{_includedir} \
37    --libdir=%{_gcclibdir} \
38    --libexecdir=%{_libexecdir} \
39    --mandir=%{_mandir} \
40    --infodir=%{_infodir} \
41    --datadir=%{_datadir} \
42    --build=%_build --host=%_host \
43    --target=@tool_target@ \
44    --disable-libstdcxx-pch \
45    --with-gnu-as --with-gnu-ld --verbose \
46    --with-newlib \
47    --with-system-zlib \
48    --disable-nls --without-included-gettext \
49    --disable-win32-registry \
50    --enable-version-specific-runtime-libs \
51    --enable-threads \
52    --with-sysroot=%{_exec_prefix}/@tool_target@/sys-root \
53    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
54    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
55%if %build_newlib
56    --enable-newlib-io-c99-formats \
57%endif
58%if %build_libgcj
59    --enable-libgcj \
60%endif
61    --enable-languages="$languages"
62
63%if "%_host" != "%_build"
64  # Bug in gcc-3.2.1:
65  # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs
66  mkdir -p gcc/include
67  cp ../gcc-%{gcc_pkgvers}/gcc/gsyslimits.h gcc/include/syslimits.h
68%endif
69
70  make %{?_smp_mflags} all
71%if %build_infos
72  make info
73%endif
74  cd ..
75
Note: See TracBrowser for help on using the repository browser.