On Wed, Aug 23, 2017 at 4:44 PM, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > Hi Anatol, > > On 08/23/2017 04:22 PM, Anatol Pomozov wrote: >> >> * explicitly disable SSE as clang enables it by default for 32bit code >> * add memset() implementation. Clang complains that the function is >> absent, gcc seems provides default built-in. >> --- >> tests/multiboot/Makefile | 2 +- >> tests/multiboot/libc.c | 9 +++++++++ >> tests/multiboot/libc.h | 2 ++ >> 3 files changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/tests/multiboot/Makefile b/tests/multiboot/Makefile >> index 856e76682a..7fadbca33a 100644 >> --- a/tests/multiboot/Makefile >> +++ b/tests/multiboot/Makefile >> @@ -1,5 +1,5 @@ >> CC=gcc >> -CCFLAGS=-m32 -Wall -Wextra -Werror -fno-stack-protector -nostdinc >> -fno-builtin >> +CCFLAGS=-m32 -Wall -Wextra -Werror -fno-stack-protector -nostdinc >> -fno-builtin -mno-sse > > > What about using -march=i586 instead? so no need to disable each next > features clang decide to default enable. > > Even cleaner IMHO, use -march=pentium in CFLAGS and add "-cpu pentium" in > run_test.sh so we are sure the generated code matches, what do you think?
It sounds reasonable. Just sent an updated patch. Works with gcc 6.3 and clang 3.8.