[PATCH 2/2] Makefile.build: Fix built-in.o linking errors EABI version mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal wrote:
> 
> Ack on this part, I need to think a bit more about the second part :).
> Could you please send two separate patches, they fix two independent
> issues after all.
> 
Here it the 2nd patch resent. Thanks.

This patch fixes the EABI version mismatch link error "built-in.o has
EABI version 0, but ... has EABI verion 4". The problem happens when
linking the child builtin.o's using arm-xscale-linux-gnueabi linker. The
cause is built-in.o created by $(AR) has an EABI verison 0, while the
non-empty built-in.o's have EABI version 4. Use $(CC) to create the
empty built-in.o fixes the problem.

Signed-off-by: Jiafu He <jay@xxxxxxxxxxxx>
-----
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 341b589..6a990ef 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -291,7 +291,7 @@ quiet_cmd_link_o_target = LD      $@
 cmd_link_o_target = $(if $(strip $(obj-y)),\
                      $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^)
\
                      $(cmd_secanalysis),\
-                     rm -f $@; $(AR) rcs $@)
+                     rm -f $@; $(CC) -c -xassembler /dev/null -o $@)
 
 $(builtin-target): $(obj-y) FORCE
        $(call if_changed,link_o_target)
-----

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux