From 81932e2ed3d35df2e8b9c95b1f30a35c649d98783338f87b5b4eeff1cbfd59fb Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 4 Oct 2011 09:59:08 +0000 Subject: [PATCH] Accepting request 86382 from home:uli_suse:branches:Base:System - cross-build workarounds: disable %build section testing, use fake gcc script to work around build system deficiencies OBS-URL: https://build.opensuse.org/request/show/86382 OBS-URL: https://build.opensuse.org/package/show/Base:System/fillup?expand=0&rev=16 --- fillup.changes | 6 ++++++ fillup.spec | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/fillup.changes b/fillup.changes index b485048..909ded8 100644 --- a/fillup.changes +++ b/fillup.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 30 15:00:41 UTC 2011 - uli@suse.com + +- cross-build workarounds: disable %build section testing, use fake + gcc script to work around build system deficiencies + ------------------------------------------------------------------- Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de diff --git a/fillup.spec b/fillup.spec index 0c7c23a..3675e5b 100644 --- a/fillup.spec +++ b/fillup.spec @@ -15,6 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: fillup License: GPLv2+ Group: System/Base @@ -52,6 +54,8 @@ its variable name. # Be sure that the tests for fillup are run in # DEBUG mode for comparision with the references # +# build time testing disabled when cross-compiling +%if !0%{?_crossbuild} make %{?_smp_mflags} clean make %{?_smp_mflags} test OPTISPLUS="$RPM_OPT_FLAGS" # @@ -59,7 +63,13 @@ make %{?_smp_mflags} test OPTISPLUS="$RPM_OPT_FLAGS" # optimzed version. # make %{?_smp_mflags} clean -make %{?_smp_mflags} compile COMPILE_OPTION=OPTIMIZE OPTISPLUS="$RPM_OPT_FLAGS" +%else +# build system does not always honor CC; workaround: +echo -e "#!/bin/bash\nexec %__cc \"\$@\"" >gcc +chmod 755 gcc +export PATH=`pwd`:$PATH +%endif +make %{?_smp_mflags} compile COMPILE_OPTION=OPTIMIZE OPTISPLUS="$RPM_OPT_FLAGS" CC="%__cc" %install mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates