* [PATCH] builddeb: use $OBJCOPY variable instead of objcopy
@ 2014-04-12 10:13 Fathi Boudra
2014-04-13 13:25 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Fathi Boudra @ 2014-04-12 10:13 UTC (permalink / raw)
To: linux-kbuild; +Cc: Michal Marek, Ben Hutchings, Maximilian Attems, Fathi Boudra
In cross-build environment, we expect to use the cross-compiler objcopy
instead of the host objcopy.
It fixes following build failures:
objcopy --only-keep-debug lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko /srv/build/linux/debian/dbgtmp/usr/lib/debug/lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko
objcopy: Unable to recognise the format of the input file `lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko'
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
scripts/package/builddeb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f46e4dd..152d4d2 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
for module in $(find lib/modules/ -name *.ko); do
mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
# only keep debug symbols in the debug file
- objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
+ $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
# strip original module from debug symbols
- objcopy --strip-debug $module
+ $OBJCOPY --strip-debug $module
# then add a link to those
- objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
+ $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
done
)
fi
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] builddeb: use $OBJCOPY variable instead of objcopy
2014-04-12 10:13 [PATCH] builddeb: use $OBJCOPY variable instead of objcopy Fathi Boudra
@ 2014-04-13 13:25 ` Ben Hutchings
2014-04-24 13:26 ` Michal Marek
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2014-04-13 13:25 UTC (permalink / raw)
To: Fathi Boudra; +Cc: linux-kbuild, Michal Marek, Maximilian Attems
[-- Attachment #1: Type: text/plain, Size: 1856 bytes --]
On Sat, 2014-04-12 at 13:13 +0300, Fathi Boudra wrote:
> In cross-build environment, we expect to use the cross-compiler objcopy
> instead of the host objcopy.
>
> It fixes following build failures:
> objcopy --only-keep-debug lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko /srv/build/linux/debian/dbgtmp/usr/lib/debug/lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko
> objcopy: Unable to recognise the format of the input file `lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko'
>
> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
You could add:
Cc: stable <stable@vger.kernel.org> # 3.12+
Fixes: 810e843746b7 ('deb-pkg: split debug symbols in their own package')
Ben.
> ---
> scripts/package/builddeb | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index f46e4dd..152d4d2 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
> for module in $(find lib/modules/ -name *.ko); do
> mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
> # only keep debug symbols in the debug file
> - objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
> + $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
> # strip original module from debug symbols
> - objcopy --strip-debug $module
> + $OBJCOPY --strip-debug $module
> # then add a link to those
> - objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
> + $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
> done
> )
> fi
--
Ben Hutchings
I haven't lost my mind; it's backed up on tape somewhere.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] builddeb: use $OBJCOPY variable instead of objcopy
2014-04-13 13:25 ` Ben Hutchings
@ 2014-04-24 13:26 ` Michal Marek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Marek @ 2014-04-24 13:26 UTC (permalink / raw)
To: Ben Hutchings, Fathi Boudra; +Cc: linux-kbuild, Maximilian Attems
On 2014-04-13 15:25, Ben Hutchings wrote:
> On Sat, 2014-04-12 at 13:13 +0300, Fathi Boudra wrote:
>> In cross-build environment, we expect to use the cross-compiler objcopy
>> instead of the host objcopy.
>>
>> It fixes following build failures:
>> objcopy --only-keep-debug lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko /srv/build/linux/debian/dbgtmp/usr/lib/debug/lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko
>> objcopy: Unable to recognise the format of the input file `lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko'
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>
> Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
>
> You could add:
>
> Cc: stable <stable@vger.kernel.org> # 3.12+
> Fixes: 810e843746b7 ('deb-pkg: split debug symbols in their own package')
Applied to kbuild.git#misc with the above hears.
Thanks,
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-24 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-12 10:13 [PATCH] builddeb: use $OBJCOPY variable instead of objcopy Fathi Boudra
2014-04-13 13:25 ` Ben Hutchings
2014-04-24 13:26 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox