On OS X (and other maybe other systems) the default provided ar is not a
GNU version and does not understand all the required switches.

To circumvent this fact always use the ar from cross tools which is
proven to be a GNU binutils version (at least with OSELAS.Toolchain).

Signed-off-by: Andreas Bießmann <andr...@biessmann.de>
---
Sorry, I don't know how to provide correct patches/series. Is there any
guideline how to use this git-ptx-patches magic?

 .../0005-opkg-allow-CROSS_COMPILE-ar.diff          |   12 ++++++++++++
 patches/opkg-utils-r4747/series                    |    1 +
 rules/post/ptxd_make_xpkg_finish.make              |    3 ++-
 3 files changed, 15 insertions(+), 1 deletions(-)
 create mode 100644 
patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff

diff --git a/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff 
b/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff
new file mode 100644
index 0000000..43a9ed6
--- /dev/null
+++ b/patches/opkg-utils-r4747/0005-opkg-allow-CROSS_COMPILE-ar.diff
@@ -0,0 +1,12 @@
+diff -Nrupa opkg-utils-r4747.orig/opkg-build opkg-utils-r4747/opkg-build
+--- opkg-utils-r4747.orig/opkg-build   2012-01-19 14:20:32.000000000 +0100
++++ opkg-utils-r4747/opkg-build        2012-01-19 15:49:06.000000000 +0100
+@@ -250,7 +250,7 @@ if [ "$outer" = "ar" ] ; then
+   # chown the content to "0:0".  files. This is needed as high UID values (>
+   # 99999) cause problems when parsing ar file headers
+   ( cd $tmp_dir && chown 0:0 ./debian-binary ./data.tar.gz ./control.tar.gz &&
+-      ar -crf $pkg_file ./debian-binary ./data.tar.gz ./control.tar.gz )
++      ${CROSS_COMPILE}ar -crf $pkg_file ./debian-binary ./data.tar.gz 
./control.tar.gz )
+ else
+   ( cd $tmp_dir && tar -zcf $pkg_file ./debian-binary ./data.tar.gz 
./control.tar.gz )
+ fi
diff --git a/patches/opkg-utils-r4747/series b/patches/opkg-utils-r4747/series
index d6f32a6..4752b71 100644
--- a/patches/opkg-utils-r4747/series
+++ b/patches/opkg-utils-r4747/series
@@ -4,3 +4,4 @@
 0003-opkg-build-don-t-use-bashism.patch
 0004-opkg-Added-sha256-support.patch
 # 84a0f076891d7ac6d8273feb988f63df  - git-ptx-patches magic
+0005-opkg-allow-CROSS_COMPILE-ar.diff
diff --git a/rules/post/ptxd_make_xpkg_finish.make 
b/rules/post/ptxd_make_xpkg_finish.make
index 27a74a7..ba9342d 100644
--- a/rules/post/ptxd_make_xpkg_finish.make
+++ b/rules/post/ptxd_make_xpkg_finish.make
@@ -27,7 +27,8 @@ install_finish = \
 # $1: xpkg label
 #
 xpkg/finish = \
-       $(call xpkg/env, $(1)) \
+       CROSS_COMPILE="$(call ptx/escape,$(PTXCONF_COMPILER_PREFIX))"           
\
+       $(call xpkg/env, $(1))                                                  
\
        ptxd_make_xpkg_finish
 
 # vim: syntax=make
-- 
1.7.8.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to