* [Buildroot] [PATCH v2] sawman: Link using gcc instead of ld
@ 2013-12-17 16:11 Vicente Olivert Riera
2013-12-17 16:18 ` Markos Chandras
0 siblings, 1 reply; 3+ messages in thread
From: Vicente Olivert Riera @ 2013-12-17 16:11 UTC (permalink / raw)
To: buildroot
Using ld may cause a link failure due to using the default emulation
linker which is configured when building the linker in binutils. Using
gcc instead will pass the appropriate -m value because the compiler
knows the ABI you are using.
Here is an example of the failure:
ld: .libs/libdirectfbwm_sawman.a.tmp/sawman_wm.o: ABI is incompatible
with that of the selected emulation
ld: failed to merge target specific data of file
.libs/libdirectfbwm_sawman.a.tmp/sawman_wm.o
ld: Attempt to do relocatable link with elf64-tradbigmips input and
elf32-tradbigmips output
ld: .libs/libdirectfbwm_sawman.a.tmp/sawman_wm.o: file class ELFCLASS64
incompatible with ELFCLASS32
ld: final link failed: File in wrong format
Fixes:
http://autobuild.buildroot.net/results/e4b/e4b77681a44626efa2a44627604630697e785086/
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
.../sawman-001-link-using-gcc-instead-of-ld.patch | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
create mode 100644 package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
diff --git a/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch b/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
new file mode 100644
index 0000000..fd1b300
--- /dev/null
+++ b/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
@@ -0,0 +1,11 @@
+--- SaWMan-1.6.3/rules/libobject.make.orig 2013-12-17 15:54:22.137856874 +0000
++++ SaWMan-1.6.3/rules/libobject.make 2013-12-17 15:54:44.233201909 +0000
+@@ -3,7 +3,7 @@
+ if test -d $<.tmp; then rmdir $<.tmp; fi
+ mkdir $<.tmp
+ (cd $<.tmp && $(AR) x ../../$<)
+- $(LD) -o $@ -r $<.tmp/*.o
++ $(CC) -nostdlib -o $@ -r $<.tmp/*.o
+ rm -f $<.tmp/*.o && rmdir $<.tmp
+
+ .PHONY: $(LTLIBRARIES:%.la=.libs/%.a)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] sawman: Link using gcc instead of ld
2013-12-17 16:11 [Buildroot] [PATCH v2] sawman: Link using gcc instead of ld Vicente Olivert Riera
@ 2013-12-17 16:18 ` Markos Chandras
2013-12-17 16:23 ` Vicente Olivert Riera
0 siblings, 1 reply; 3+ messages in thread
From: Markos Chandras @ 2013-12-17 16:18 UTC (permalink / raw)
To: buildroot
On 12/17/2013 04:11 PM, Vicente Olivert Riera wrote:
> .../sawman-001-link-using-gcc-instead-of-ld.patch | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
> create mode 100644 package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
>
> diff --git a/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch b/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
> new file mode 100644
> index 0000000..fd1b300
> --- /dev/null
> +++ b/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
> @@ -0,0 +1,11 @@
> +--- SaWMan-1.6.3/rules/libobject.make.orig 2013-12-17 15:54:22.137856874 +0000
> ++++ SaWMan-1.6.3/rules/libobject.make 2013-12-17 15:54:44.233201909 +0000
> +@@ -3,7 +3,7 @@
> + if test -d $<.tmp; then rmdir $<.tmp; fi
> + mkdir $<.tmp
> + (cd $<.tmp && $(AR) x ../../$<)
> +- $(LD) -o $@ -r $<.tmp/*.o
> ++ $(CC) -nostdlib -o $@ -r $<.tmp/*.o
> + rm -f $<.tmp/*.o && rmdir $<.tmp
> +
> + .PHONY: $(LTLIBRARIES:%.la=.libs/%.a)
>
Hi,
You need to add your Signed-off-by to the patch file along with a small
description on what this patch does.
--
markos
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] sawman: Link using gcc instead of ld
2013-12-17 16:18 ` Markos Chandras
@ 2013-12-17 16:23 ` Vicente Olivert Riera
0 siblings, 0 replies; 3+ messages in thread
From: Vicente Olivert Riera @ 2013-12-17 16:23 UTC (permalink / raw)
To: buildroot
On 12/17/2013 04:18 PM, Markos Chandras wrote:
> On 12/17/2013 04:11 PM, Vicente Olivert Riera wrote:
>> .../sawman-001-link-using-gcc-instead-of-ld.patch | 11 +++++++++++
>> 1 files changed, 11 insertions(+), 0 deletions(-)
>> create mode 100644
>> package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
>>
>> diff --git
>> a/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
>> b/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
>> new file mode 100644
>> index 0000000..fd1b300
>> --- /dev/null
>> +++ b/package/sawman/sawman-001-link-using-gcc-instead-of-ld.patch
>> @@ -0,0 +1,11 @@
>> +--- SaWMan-1.6.3/rules/libobject.make.orig 2013-12-17
>> 15:54:22.137856874 +0000
>> ++++ SaWMan-1.6.3/rules/libobject.make 2013-12-17
>> 15:54:44.233201909 +0000
>> +@@ -3,7 +3,7 @@
>> + if test -d $<.tmp; then rmdir $<.tmp; fi
>> + mkdir $<.tmp
>> + (cd $<.tmp && $(AR) x ../../$<)
>> +- $(LD) -o $@ -r $<.tmp/*.o
>> ++ $(CC) -nostdlib -o $@ -r $<.tmp/*.o
>> + rm -f $<.tmp/*.o && rmdir $<.tmp
>> +
>> + .PHONY: $(LTLIBRARIES:%.la=.libs/%.a)
>>
> Hi,
>
> You need to add your Signed-off-by to the patch file along with a small
> description on what this patch does.
>
Ooops! I forgot it when I changed the patch.
Done. v3 sent.
Thank you very much.
--
Vincent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-17 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 16:11 [Buildroot] [PATCH v2] sawman: Link using gcc instead of ld Vicente Olivert Riera
2013-12-17 16:18 ` Markos Chandras
2013-12-17 16:23 ` Vicente Olivert Riera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox