[U-Boot] [PATCH] example: api: ARM example needs memset

Add memset.S to the needed object for the API example and do not hardcode powerpc as the arch for library assembly files.
Signed-off-by: Emmanuel Vadot manu@bidouilliste.com --- examples/api/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/examples/api/Makefile b/examples/api/Makefile index 6cffee7465..a1bb6eff95 100644 --- a/examples/api/Makefile +++ b/examples/api/Makefile @@ -34,7 +34,10 @@ EXT_COBJ-y += lib/div64.o EXT_COBJ-y += lib/string.o EXT_COBJ-y += lib/time.o EXT_COBJ-y += lib/vsprintf.o +EXT_SOBJDIR-$(CONFIG_PPC) = arch/powerpc +EXT_SOBJDIR-$(CONFIG_ARM) = arch/arm EXT_SOBJ-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o +EXT_SOBJ-$(CONFIG_ARM) += arch/arm/lib/memset.o
# Create a list of object files to be compiled OBJS := $(OBJ-y) $(notdir $(EXT_COBJ-y) $(EXT_SOBJ-y)) @@ -60,5 +63,5 @@ $(addprefix $(obj)/,$(notdir $(EXT_COBJ-y))): $(obj)/%.o: lib/%.c FORCE $(call if_changed_rule,cc_o_c)
# Rule to build architecture-specific library assembly files -$(addprefix $(obj)/,$(notdir $(EXT_SOBJ-y))): $(obj)/%.o: arch/powerpc/lib/%.S FORCE +$(addprefix $(obj)/,$(notdir $(EXT_SOBJ-y))): $(obj)/%.o: $(EXT_SOBJDIR-y)/lib/%.S FORCE $(call if_changed_dep,as_o_S)

On Sat, Dec 31, 2016 at 07:05:50PM +0100, Emmanuel Vadot wrote:
Add memset.S to the needed object for the API example and do not hardcode powerpc as the arch for library assembly files.
Signed-off-by: Emmanuel Vadot manu@bidouilliste.com
This patch isn't quite correct. Not all cases of ARM will have the optimized memset available to them (currently), so we can't apply this today. I'm going to re-examine this post release when I'm going to have optimized memset/memcpy more widely available on ARM, thanks!

On Mon, 2 Jan 2017 16:30:05 -0500 Tom Rini trini@konsulko.com wrote:
On Sat, Dec 31, 2016 at 07:05:50PM +0100, Emmanuel Vadot wrote:
Add memset.S to the needed object for the API example and do not hardcode powerpc as the arch for library assembly files.
Signed-off-by: Emmanuel Vadot manu@bidouilliste.com
This patch isn't quite correct. Not all cases of ARM will have the optimized memset available to them (currently), so we can't apply this today. I'm going to re-examine this post release when I'm going to have optimized memset/memcpy more widely available on ARM, thanks!
-- Tom
Hi Tom,
Mhm right, I'll admit I've only tested the board I have. We'll just use this patch on FreeBSD for now, it seems we are the only consumer of the API so we hit errors that nobody sees.
Thanks !
participants (2)
-
Emmanuel Vadot
-
Tom Rini