[llvm-bugs] [Bug 48318] New: clang-11 in qemu: error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 27 07:35:17 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48318

            Bug ID: 48318
           Summary: clang-11 in qemu: error: invalid value '4.2.1' in
                    '-fgnuc-version=4.2.1'
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: crusoe at debian.org
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Using clang-11 in an up-to-date s390x Debian unstable/sid cowbuilder chroot on
amd64 using qemu, I am unable to query its defines using the normal
construction:

echo | /usr/bin/clang-11 -E -dM  -

The error received is 

error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'

The same command works without error outside of qemu on real s390x
hardware using the same package version (on zelenka.debian.org, for example)

Note, this is qemu user-mode emulation of s390x, not qemu full system emulation
of s390x

The Debian package version is 1:11.0.0-5+b1, Sylvestre Ledru of the Debian LLVM
packaging team suggested that I file the bug here as he did not think it was a
packaging error.

Recipe for reproduction Debian/Ubuntu:
$ cowbuilder-dist sid s390x create # if needed
$ cowbuilder-dist sid s390x update
$ cowbuilder-dist sid s390x login

# apt install clang-11 -y

# echo | /usr/bin/clang-11 -E -dM  -
error: invalid value '4.2.1' in '-fgnuc-version=4.2.1'

All of the above is true for clang-10 but not clang-9

If `-fgnuc-version=` is added to the command line, then there is a fatal
error

# echo | /usr/bin/clang-11 -E -dM  -fgnuc-version=0 - -v
Debian clang version 11.0.0-5+b1
Target: s390x-ibm-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/s390x-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/s390x-linux-gnu/10
Selected GCC installation: /usr/bin/../lib/gcc/s390x-linux-gnu/10
Candidate multilib: .;@m64
Selected multilib: .;@m64
 (in-process)
 "/usr/lib/llvm-11/bin/clang" -cc1 -triple s390x-ibm-linux-gnu -E -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name -
-mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math
-mconstructor-aliases -target-cpu z10 -fno-split-dwarf-inlining
-debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-11/lib/clang/11.0.0
-internal-isystem /usr/local/include -internal-isystem
/usr/lib/llvm-11/lib/clang/11.0.0/include -internal-externc-isystem
/usr/include/s390x-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir / -ferror-limit
19 -fno-signed-char -fcolor-diagnostics -dM -faddrsig -o - -x c -
clang -cc1 version 11.0.0 based upon LLVM 11.0.0 default target
s390x-ibm-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/llvm-11/lib/clang/11.0.0/include
 /usr/include/s390x-linux-gnu
 /usr/include
End of search list.
fatal error: error opening file '<invalid loc>':
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/bin/clang-11 -E -dM -fgnuc-version=0 - -v
/usr/lib/s390x-linux-gnu/libLLVM-11.so.1(+0xc58b1a)[0x4005af2b1a]
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Debian clang version 11.0.0-5+b1
Target: s390x-ibm-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: Error generating preprocessed source(s) - ignoring
input from stdin.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201127/40fbdd64/attachment.html>


More information about the llvm-bugs mailing list