]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix(test): Fix .incbin test with newer binutils
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 20 Aug 2021 17:56:17 +0000 (19:56 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 20 Aug 2021 17:56:17 +0000 (19:56 +0200)
The assembler in binutils 2.37 doesn’t want to include /dev/null with
a .incbin directive:

    /tmp/ccbGWiew.s: Assembler messages:
    /tmp/ccbGWiew.s:4: Error: unable to include `/dev/null'
    incbin.s: Assembler messages:
    incbin.s:1: Error: unable to include `/dev/null'

test/suites/base.bash

index a9839009d526160e13eab3e2ab287b1b247d5454..ec845efeec684bcd7df748497881271ff86dfe0a 100644 (file)
@@ -1394,8 +1394,10 @@ EOF
 if ! $HOST_OS_WINDOWS; then
     TEST ".incbin"
 
+    touch empty.bin
+
     cat <<EOF >incbin.c
-__asm__(".incbin \"/dev/null\"");
+__asm__(".incbin \"empty.bin\"");
 EOF
 
     $CCACHE_COMPILE -c incbin.c
@@ -1404,7 +1406,7 @@ EOF
     expect_stat unsupported_code_directive 1
 
     cat <<EOF >incbin.s
-.incbin "/dev/null";
+.incbin "empty.bin";
 EOF
 
     $CCACHE_COMPILE -c incbin.s