[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    kernel library ordering
From:       Nicolas Pitre <nico () cam ! org>
Date:       2005-10-31 18:48:49
Message-ID: Pine.LNX.4.64.0510311333320.5288 () localhost ! localdomain
[Download RAW message or body]


In the latest kernel, there is an optimized sha1 routine 
(arch/arm/lib/sha1.S) meant to override the generic one in lib/sha1.c.

The problem is that lib/lib.a is listed _before_ arch/arm/lib/lib.a in 
the link argument list so the architecture specific lib functions are 
not picked up in priority.

To work around this the following patch is needed:

--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -142,7 +142,7 @@ drivers-$(CONFIG_OPROFILE)      += arch/
 drivers-$(CONFIG_ARCH_CLPS7500)	+= drivers/acorn/char/
 drivers-$(CONFIG_ARCH_L7200)	+= drivers/acorn/char/
 
-libs-y				+= arch/arm/lib/
+libs-y				:= arch/arm/lib/ $(libs-y)
 
 # Default target when executing plain make
 ifeq ($(CONFIG_XIP_KERNEL),y)

However I was wondering if there should be a better and generic way to 
fix that.

Comments?


Nicolas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic