mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] opkg-utils: use toolchain provided ar
Date: Thu, 19 Jan 2012 21:54:06 +0100	[thread overview]
Message-ID: <20120119205406.GB4854@pengutronix.de> (raw)
In-Reply-To: <1326985362-4691-1-git-send-email-andreas@biessmann.de>

On Thu, Jan 19, 2012 at 04:02:42PM +0100, Andreas Bießmann wrote:
> 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?

You can do the following:

# extract with git:
$ ptxdist --git extract opkg-utils
$ cd platform-<myplat>/build-host/opkg-utils-r4747/

# fit the patch:
$ git commit --amend --reset-author -s

# recreate the patches:
$ git ptx-patches

There will be some minor changes to the other patches. Add those to the
commit as well.

Michael

> 
>  .../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

-- Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2012-01-19 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 15:02 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120119205406.GB4854@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox