All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thierry Bultel <thierry.bultel@linatsea.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 1/3] package/cross-ldd: new package
Date: Wed, 5 Jan 2022 23:29:18 +0100	[thread overview]
Message-ID: <20220105222918.GK614810@scaer> (raw)
In-Reply-To: <20211223111348.3532601-1-thierry.bultel@linatsea.fr>

Thierry, All,

On 2021-12-23 12:13 +0100, Thierry Bultel spake thusly:
> cross-ldd works just as ldd, but supports
> other architectures. It is needed by dracut, for instance.
> 
> Signed-off-by: Thierry Bultel <thierry.bultel@linatsea.fr>
> ---
[--SNIP--]
> diff --git a/package/cross-ldd/Config.in b/package/cross-ldd/Config.in
> new file mode 100644
> index 0000000000..3858fbc5fe
> --- /dev/null
> +++ b/package/cross-ldd/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_HOST_CROSS_LDD
> +	bool "cross-ldd"

I don't think this tool warrants a Kconfig entry. I.e. it should be a
blind host-only package, with no Config.in.

> +	help
> +	  ldd drop-in replacement for cross-compilation
> +	  toolchains.
> +	  This is the officially supported version mentioned
> +	  in the dracut documentation

It would have been nice to add a pointer to that documentation (I spent
quite some time look for it...). It's in: docs/README.cross

> diff --git a/package/cross-ldd/cross-ldd.mk b/package/cross-ldd/cross-ldd.mk
> new file mode 100644
> index 0000000000..fc0752adff
> --- /dev/null
> +++ b/package/cross-ldd/cross-ldd.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# cross-ldd
> +#
> +################################################################################
> +
> +CROSS_LDD_VERSION = 6c9c724ebd6a29c279c6e5734e44c07f067808ec
> +CROSS_LDD_SOURCE = $(CROSS_LDD_VERSION).tar.gz
> +CROSS_LDD_SITE = https://gist.github.com/jerome-pouiller/c403786c1394f53f44a3b61214489e6f/archive

I find it really sad that we have to use a random gist without proper
packaging or repository... :-( But I guess we don't have much options...

You are missing the license for that script:

    CROSS_LDD_LICENSE = GPL-2.0

(I should know, I wrote it! ;-) And incidentally, it is also mentioned
in the help text.)

> +# Notice that we change the name to '-ldd-cross', in order to avoid conflict
> +# with some external toolchains that implement it

-ldd-cross is still too generic. Make it really specific to buildroot, by
calling it -ldd-buildroot

> +define HOST_CROSS_LDD_INSTALL_CMDS
> +	$(SED) 's/-ldd}/-ldd-cross}'/g $(@D)/cross-compile-ldd
> +	install -D -m 755 $(@D)/cross-compile-ldd $(TARGET_CROSS)ldd-cross
> +endef

This install comand does two things:

  - modify the source script
  - install the modified script

Semantically, we want to separate actions that happen in the source tree
into one of the extract, patch, configure, or build commands.

Also, usually, we shy away from patching with sed expressions, and we
prefer actual patches.

Regards,
Yann E. MORIN.

> +
> +$(eval $(host-generic-package))
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2022-01-05 22:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 11:13 [Buildroot] [PATCH v3 1/3] package/cross-ldd: new package Thierry Bultel
2021-12-23 11:13 ` [Buildroot] [PATCH v3 2/3] package/dracut: new host package Thierry Bultel
2022-01-05 23:16   ` Yann E. MORIN
2022-01-06 14:56     ` Thierry Bultel
2022-01-06 15:13       ` Thomas Petazzoni
2022-01-06 15:56         ` Thierry Bultel
2021-12-23 11:13 ` [Buildroot] [PATCH v3 3/3] fs/cpio: new option to use dracut tool Thierry Bultel
2022-01-06 10:31   ` Yann E. MORIN
2022-01-06 13:48     ` Thierry Bultel
2022-01-05 22:29 ` Yann E. MORIN [this message]

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=20220105222918.GK614810@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=thierry.bultel@linatsea.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.