]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Relax requirements on asm for non-BIOS i386 platforms.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 21 Feb 2015 19:18:18 +0000 (20:18 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 21 Feb 2015 19:18:18 +0000 (20:18 +0100)
These platforms don't have a hard limit on size of resulting code16
code, so we don't care if assembly is bigger than necessarry.

asm-tests/i386-pc.S [new file with mode: 0644]
asm-tests/i386.S
configure.ac

diff --git a/asm-tests/i386-pc.S b/asm-tests/i386-pc.S
new file mode 100644 (file)
index 0000000..97cd32a
--- /dev/null
@@ -0,0 +1,10 @@
+/* on x86 old clang doesn't support .code16
+   newer clang supports it but creates 6-byte jumps instead of 3-byte ones
+   which makes us go over boot sector size.  */
+
+       .code16
+       jmp far
+       .org 4
+       .space 300
+far:
+       .byte 0
index 97cd32ae8608c09166729932adaa0a2855372b6e..30adc4fe2ebfcacbc709cfcd9671446bdaee7c9a 100644 (file)
@@ -1,10 +1,4 @@
-/* on x86 old clang doesn't support .code16
-   newer clang supports it but creates 6-byte jumps instead of 3-byte ones
-   which makes us go over boot sector size.  */
+/* on x86 old clang doesn't support .code16  */
 
        .code16
-       jmp far
-       .org 4
-       .space 300
-far:
-       .byte 0
+       movb %al, %bl
index 8ddb5d3cc8d5d9e431605c0495fafb740554c179..8b94d346ebe19b63771e008585992acce3ec2707 100644 (file)
@@ -562,14 +562,17 @@ AC_COMPILE_IFELSE(
 
 AC_CACHE_CHECK([for options to compile assembly], [grub_cv_cc_target_asm_compile], [
 test_program=
-case "x$target_cpu" in
-     xmips | xmipsel)
+case "x$target_cpu-$platform" in
+     xmips-* | xmipsel-*)
         test_program=mips
        ;;
-     xi386 | xx86_64)
+     xi386-pc)
+       test_program=i386-pc
+       ;;
+     xi386-* | xx86_64-*)
        test_program=i386
        ;;
-     xpowerpc | xsparc64 | xarm)
+     xpowerpc-* | xsparc64-* | xarm-*)
         test_program=$target_cpu
        ;;
 esac