Message ID | 1480679517-551-1-git-send-email-marcin.nowakowski@imgtec.com |
---|---|
State | Accepted |
Commit | ba19cb915ac3475487d4a1b46d014fcabeb71fdb |
Headers | show |
>>>>> "Marcin" == Marcin Nowakowski <marcin.nowakowski@imgtec.com> writes: > When BR2_STRIP is set to none, a dummy 'true' app is used instead of > strip utility. However, kexec package always requires a real strip > executable as it is used to generate intermediate files during the build > process. > If 'true' is used the build system runs the following command: > true --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym > which obviously doesn't do anything useful and the build later fails > with: > bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c > /bin/sh: purgatory/purgatory.ro: No such file or directory > kexec/Makefile:7: recipe for target 'kexec/purgatory.c' failed > make[2]: *** [kexec/purgatory.c] Error 1 > To resolve it always specify STRIP=$(CROSS_COMPILE)strip, regardless of > buildroot configuration. My first thought was that we shouldn't strip when the user has selected not to do so, but as it leaves the unstripped variant around I guess it is OK. Committed, thanks.
Hello, On Fri, 02 Dec 2016 17:11:07 +0100, Peter Korsgaard wrote: > > When BR2_STRIP is set to none, a dummy 'true' app is used instead of > > strip utility. However, kexec package always requires a real strip > > executable as it is used to generate intermediate files during the build > > process. > > > If 'true' is used the build system runs the following command: > > > true --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym > > > which obviously doesn't do anything useful and the build later fails > > with: > > > bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c > > /bin/sh: purgatory/purgatory.ro: No such file or directory > > kexec/Makefile:7: recipe for target 'kexec/purgatory.c' failed > > make[2]: *** [kexec/purgatory.c] Error 1 > > > To resolve it always specify STRIP=$(CROSS_COMPILE)strip, regardless of > > buildroot configuration. > > My first thought was that we shouldn't strip when the user has selected > not to do so, but as it leaves the unstripped variant around I guess it > is OK. My other thought is that I believe it's not the first time (see commit fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should handle this in a different way. Thomas
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: Hi, > My other thought is that I believe it's not the first time (see commit > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should > handle this in a different way. The question is how? Create a dummy shell script to better emulate the command line options / behaviour of strip?
Hello, On Fri, 02 Dec 2016 22:09:53 +0100, Peter Korsgaard wrote: > Hi, > > > My other thought is that I believe it's not the first time (see commit > > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of > > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should > > handle this in a different way. > > The question is how? Create a dummy shell script to better emulate the > command line options / behaviour of strip? I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass enough options to strip to have it not strip anything? :-) Thomas
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Hello, > On Fri, 02 Dec 2016 22:09:53 +0100, Peter Korsgaard wrote: >> Hi, >> >> > My other thought is that I believe it's not the first time (see commit >> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of >> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should >> > handle this in a different way. >> >> The question is how? Create a dummy shell script to better emulate the >> command line options / behaviour of strip? > I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass > enough options to strip to have it not strip anything? :-) Not that I'm aware of at least. Anyone?
On 05-12-16 23:34, Peter Korsgaard wrote: >>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > > > Hello, > > On Fri, 02 Dec 2016 22:09:53 +0100, Peter Korsgaard wrote: > > >> Hi, > >> > >> > My other thought is that I believe it's not the first time (see commit > >> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of > >> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should > >> > handle this in a different way. > >> > >> The question is how? Create a dummy shell script to better emulate the > >> command line options / behaviour of strip? > > > I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass > > enough options to strip to have it not strip anything? :-) > > Not that I'm aware of at least. Anyone? Why do we have to set TARGET_STRIP to something different when BR2_STRIP_none=y? BR2_STRIP_none is supposed to mean that we don't strip all binaries, it doesn't mean that an individual package isn't allowed to strip its binaries... Regards, Arnout
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: Hi, >> >> > My other thought is that I believe it's not the first time (see commit >> >> > fc174b7057495ebb31393ae27f3ceeefdc490022), so perhaps our idea of >> >> > having STRIP=true when BR2_STRIP_none=y is a bad idea, and we should >> >> > handle this in a different way. >> >> >> >> The question is how? Create a dummy shell script to better emulate the >> >> command line options / behaviour of strip? >> >> > I'm not sure. Yet another wrapper kind of sucks. Is it possible to pass >> > enough options to strip to have it not strip anything? :-) >> >> Not that I'm aware of at least. Anyone? > Why do we have to set TARGET_STRIP to something different when > BR2_STRIP_none=y? BR2_STRIP_none is supposed to mean that we don't strip all > binaries, it doesn't mean that an individual package isn't allowed to strip its > binaries... Sorry, I don't agree. Quite some packages afaik call $(STRIP) (which we set to TARGET_STRIP) in their 'make install'. Users don't really care if binaries are stripped during <foo>-install-target or target-finalize, the end result for them is the same.
diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk index 4ca55e5..08c5424 100644 --- a/package/kexec/kexec.mk +++ b/package/kexec/kexec.mk @@ -10,6 +10,8 @@ KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kexec KEXEC_LICENSE = GPLv2 KEXEC_LICENSE_FILES = COPYING +KEXEC_MAKE_OPTS = STRIP="$(TARGET_CROSS)strip" + ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y) KEXEC_CONF_OPTS += --with-zlib KEXEC_DEPENDENCIES = zlib
When BR2_STRIP is set to none, a dummy 'true' app is used instead of strip utility. However, kexec package always requires a real strip executable as it is used to generate intermediate files during the build process. If 'true' is used the build system runs the following command: true --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym which obviously doesn't do anything useful and the build later fails with: bin/bin-to-hex purgatory < purgatory/purgatory.ro > kexec/purgatory.c /bin/sh: purgatory/purgatory.ro: No such file or directory kexec/Makefile:7: recipe for target 'kexec/purgatory.c' failed make[2]: *** [kexec/purgatory.c] Error 1 To resolve it always specify STRIP=$(CROSS_COMPILE)strip, regardless of buildroot configuration. Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com> --- package/kexec/kexec.mk | 2 ++ 1 file changed, 2 insertions(+)