From 51dfedd76b8108157b8015c30eac02ab7666b948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Tue, 1 May 2018 21:11:35 +0200 Subject: [PATCH] libroot_x86: use the generic memset/memcpy when x86_64 is the primary arch. the standard x86 implementation uses the commpage, which is difficult to setup. we could also use the C++11 version instead. Change-Id: I4be7e3466082ff2c91bc32bef377a664ce65f3fc --- src/system/libroot/posix/string/arch/generic/memcpy.c | 4 ---- src/system/libroot/posix/string/arch/x86/Jamfile | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/system/libroot/posix/string/arch/generic/memcpy.c b/src/system/libroot/posix/string/arch/generic/memcpy.c index b197960154..5070e78bdf 100644 --- a/src/system/libroot/posix/string/arch/generic/memcpy.c +++ b/src/system/libroot/posix/string/arch/generic/memcpy.c @@ -6,8 +6,6 @@ #include #include -/* do not build for for arches that have overridden this with an assembly version */ -#if !defined(ARCH_x86) typedef int word; @@ -45,5 +43,3 @@ void *memcpy(void *dest, const void *src, size_t count) return dest; } -#endif - diff --git a/src/system/libroot/posix/string/arch/x86/Jamfile b/src/system/libroot/posix/string/arch/x86/Jamfile index edd827a2d8..4190cbf535 100644 --- a/src/system/libroot/posix/string/arch/x86/Jamfile +++ b/src/system/libroot/posix/string/arch/x86/Jamfile @@ -7,8 +7,12 @@ for architectureObject in [ MultiArchSubDirSetup x86 x86_gcc2 ] { UsePrivateSystemHeaders ; + SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; + MergeObject <$(architecture)>posix_string_arch_$(TARGET_ARCH).o : - arch_string.S + [ MultiArchIfPrimary memcpy.c memset.c : + arch_string.S : x86_64 ] ; + } }