source: rtems/contrib/crossrpms/gcc/build.add @ ffbfa5b

4.115
Last change on this file since ffbfa5b was 12b31895, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/22/10 at 12:57:01

Disable plugins (broken).

  • 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 %build_libgcj
23  optargs="--enable-libgcj"
24%endif
25%if "%{_prefix}" != "/usr"
26  export PATH="%{_bindir}:${PATH}"
27%endif
28%if "%{_build}" != "%{_host}"
29  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
30  CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \
31%else
32# gcc is not ready to be compiled with -std=gnu99
33  CC=$(echo "%{__cc} ${RPM_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \
34%endif
35  ../gcc-%{gcc_pkgvers}/configure \
36    --prefix=%{_prefix} \
37    --bindir=%{_bindir} \
38    --exec_prefix=%{_exec_prefix} \
39    --includedir=%{_includedir} \
40    --libdir=%{_gcclibdir} \
41    --libexecdir=%{_libexecdir} \
42    --mandir=%{_mandir} \
43    --infodir=%{_infodir} \
44    --datadir=%{_datadir} \
45    --build=%_build --host=%_host \
46    --target=@tool_target@ \
47    --disable-libstdcxx-pch \
48    --with-gnu-as --with-gnu-ld --verbose \
49    --with-newlib \
50    --with-system-zlib \
51    --disable-nls --without-included-gettext \
52    --disable-win32-registry \
53    --enable-version-specific-runtime-libs \
54    --enable-threads \
55    --with-sysroot=%{_exec_prefix}/@tool_target@/sys-root \
56    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
57    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
58%if %build_newlib
59    --enable-newlib-io-c99-formats \
60%endif
61    --enable-languages="$languages" $optargs
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.