diff mbox

[PATCHv3,6/6] ltp: fix ffsb ftbfs on cross-compiled environment

Message ID 1390912914-31576-7-git-send-email-fathi.boudra@linaro.org
State Accepted
Commit ce48f4ebfeae0bca599c6e39958ec8dec11e09dd
Headers show

Commit Message

Fathi Boudra Jan. 28, 2014, 12:41 p.m. UTC
Add ffsb-remove-hardcoded-configure.patch: get rid of the hardcoded configure call preventing cross-compilation
Add do_configure_prepend to explicitly force regeneration the configure file and pass configure options as appropriate.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
 .../ltp/ltp/ffsb-remove-hardcoded-configure.patch         | 15 +++++++++++++++
 meta/recipes-extended/ltp/ltp_20140115.bb                 |  7 +++++++
 2 files changed, 22 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch

Comments

Fathi Boudra Feb. 6, 2014, 8:18 a.m. UTC | #1
On 29 January 2014 01:11, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, Jan 28, 2014 at 4:41 AM, Fathi Boudra <fathi.boudra@linaro.org> wrote:
>> Add ffsb-remove-hardcoded-configure.patch: get rid of the hardcoded configure call preventing cross-compilation
>> Add do_configure_prepend to explicitly force regeneration the configure file and pass configure options as appropriate.
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>> ---
>>  .../ltp/ltp/ffsb-remove-hardcoded-configure.patch         | 15 +++++++++++++++
>>  meta/recipes-extended/ltp/ltp_20140115.bb                 |  7 +++++++
>>  2 files changed, 22 insertions(+)
>>  create mode 100644 meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
>>
>> diff --git a/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch b/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
>> new file mode 100644
>> index 0000000..9f02711
>> --- /dev/null
>> +++ b/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
>> @@ -0,0 +1,15 @@
>> +Get rid of the hardcoded configure call preventing cross-compilation
>> +
>> +Upstream-Status: Pending
>> +Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>> +
>> +--- a/utils/Makefile
>> ++++ b/utils/Makefile
>> +@@ -29,7 +29,6 @@ FILTER_OUT_DIRS              := $(FFSBDIR)
>> + FFSB                  := $(FFSBDIR)/ffsb
>> +
>> + $(FFSB): $(FFSBDIR)
>> +-      cd $^; ./configure
>> +       $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
>> +       cp $(FFSBDIR)/ffsb ffsb
>> +
>> diff --git a/meta/recipes-extended/ltp/ltp_20140115.bb b/meta/recipes-extended/ltp/ltp_20140115.bb
>> index 4e20f24..2ab1d50 100644
>> --- a/meta/recipes-extended/ltp/ltp_20140115.bb
>> +++ b/meta/recipes-extended/ltp/ltp_20140115.bb
>> @@ -25,6 +25,7 @@ SRCREV = "c8b3e28097e7d3208df9daceaf92c25eae87ebf0"
>>  SRC_URI = "git://github.com/linux-test-project/ltp.git \
>>      file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
>>      file://regen-makefile.patch \
>> +    file://ffsb-remove-hardcoded-configure.patch \
>>  "
>>
>>  S = "${WORKDIR}/git"
>> @@ -36,6 +37,12 @@ TARGET_CC_ARCH += "${LDFLAGS}"
>>  export prefix = "/opt/ltp"
>>  export exec_prefix = "/opt/ltp"
>>
>> +# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
>> +# we explicitly force regeneration of that directory and pass configure options.
>> +do_configure_prepend() {
>> +    (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
>
> you should pass ${CONFIGUREOPTS} to autoreconf as well

ok

>> +}
>> +
>>  do_install(){
>>      install -d ${D}/opt/ltp/
>>      oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
>> --
>> 1.8.1.2
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox

Patch

diff --git a/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch b/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
new file mode 100644
index 0000000..9f02711
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/ffsb-remove-hardcoded-configure.patch
@@ -0,0 +1,15 @@ 
+Get rid of the hardcoded configure call preventing cross-compilation
+
+Upstream-Status: Pending
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -29,7 +29,6 @@ FILTER_OUT_DIRS		:= $(FFSBDIR)
+ FFSB			:= $(FFSBDIR)/ffsb
+ 
+ $(FFSB): $(FFSBDIR)
+-	cd $^; ./configure
+ 	$(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all
+ 	cp $(FFSBDIR)/ffsb ffsb
+ 
diff --git a/meta/recipes-extended/ltp/ltp_20140115.bb b/meta/recipes-extended/ltp/ltp_20140115.bb
index 4e20f24..2ab1d50 100644
--- a/meta/recipes-extended/ltp/ltp_20140115.bb
+++ b/meta/recipes-extended/ltp/ltp_20140115.bb
@@ -25,6 +25,7 @@  SRCREV = "c8b3e28097e7d3208df9daceaf92c25eae87ebf0"
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
     file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
     file://regen-makefile.patch \
+    file://ffsb-remove-hardcoded-configure.patch \
 "
 
 S = "${WORKDIR}/git"
@@ -36,6 +37,12 @@  TARGET_CC_ARCH += "${LDFLAGS}"
 export prefix = "/opt/ltp"
 export exec_prefix = "/opt/ltp"
 
+# ltp doesn't regenerate ffsb-6.0-rc2 configure and hardcode configure call.
+# we explicitly force regeneration of that directory and pass configure options.
+do_configure_prepend() {
+    (cd utils/ffsb-6.0-rc2; autoreconf -fvi; ./configure ${CONFIGUREOPTS})
+}
+
 do_install(){
     install -d ${D}/opt/ltp/
     oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install