mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] opkg-utils: use toolchain provided ar
@ 2012-01-19 15:02 Andreas Bießmann
  2012-01-19 16:52 ` Bernhard Walle
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andreas Bießmann @ 2012-01-19 15:02 UTC (permalink / raw)
  To: PTXdist ML

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 <andreas@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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-22  9:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-19 15:02 [ptxdist] [PATCH] opkg-utils: use toolchain provided ar Andreas Bießmann
2012-01-19 16:52 ` Bernhard Walle
2012-01-19 18:16   ` Andreas Bießmann
2012-01-19 20:54 ` Michael Olbrich
2012-01-20  8:19 ` [ptxdist] [PATCH v2] " Andreas Bießmann
2012-01-21 18:28   ` Michael Olbrich
2012-01-22  9:44   ` [ptxdist] [PATCH v3] " Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox