gitlab.arm.com will be in the maintainance mode on Wednesday June 29th 01:00 - 10:00 (UTC+1). Repositories is read only during the maintainance.

Commit 1bbaeac3 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

x86: Test if compiler supports -m16

-m16 option is available only since GCC 4.9.0 [1]. That causes a build
failure on centos-7 [2] that has GCC 4.8.5.

Fallback to -m32 if -m16 is not available.

1. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59672
2. https://gitlab.com/bonzini/kvm-unit-tests/-/jobs/755368387

Fixes: 2616ad93

 ("x86: realmode: Workaround clang issues")
Reported-by: default avatarRoman Bolshakov <r.bolshakov@yadro.com>
[Commit message by Roman Bolshakov, patch redone. - Paolo]
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 2616ad93
......@@ -72,7 +72,7 @@ $(TEST_DIR)/realmode.elf: $(TEST_DIR)/realmode.o
$(CC) -m32 -nostdlib -o $@ -Wl,-m,elf_i386 \
-Wl,-T,$(SRCDIR)/$(TEST_DIR)/realmode.lds $^
$(TEST_DIR)/realmode.o: bits = 16
$(TEST_DIR)/realmode.o: bits = $(if $(call cc-option,-m16,""),16,32)
$(TEST_DIR)/kvmclock_test.elf: $(TEST_DIR)/kvmclock.o
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment