summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/gdb/build.add
blob: 8468d3d17f83b79a7948f3ac251694607f27c3c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%build
%if "%{_prefix}" != "/usr"
  export PATH="%{_bindir}:${PATH}"
%endif
  mkdir -p build
  cd build
%if "%{_build}" != "%{_host}"
  CFLAGS_FOR_BUILD="-g -O2 -Wall" \
%endif
  CFLAGS="$RPM_OPT_FLAGS" \
  ../gdb-%{gdb_version}/configure \
    --build=%_build --host=%_host \
    --target=@tool_target@ \
    --verbose --disable-nls \
    --without-included-gettext \
    --disable-win32-registry \
    --disable-werror \
    %{build_sim} \
    %{?with_system_readline:--with-system-readline} \
    --with-expat \
%if "%{gdb_version}" >= "6.8.50"
%if %{with python}
    --with-python \
%else
    --without-python \
%endif
%endif
    --with-sysroot=%{_prefix}/@tool_target@/sys-root \
    --prefix=%{_prefix} --bindir=%{_bindir} \
    --includedir=%{_includedir} --libdir=%{_libdir} \
    --mandir=%{_mandir} --infodir=%{_infodir}

  make %{?_smp_mflags} all
%if %build_infos
  make info
%endif
  cd ..