[llvm-bugs] [Bug 28286] New: gcc POWER include headers- e.g. ppc-asm.h to be in clang
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 23 23:05:22 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28286
Bug ID: 28286
Summary: gcc POWER include headers- e.g. ppc-asm.h to be in
clang
Product: clang
Version: 3.8
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Headers
Assignee: unassignedclangbugs at nondot.org
Reporter: danielgb at au1.ibm.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Gcc contains a bunch of include headers on POWER hardware that aren't in clang.
One way to preserve compatibility with gcc the same headers need to be in
clang.
$ ls -la /usr/lib/gcc/powerpc64le-linux-gnu/6/include/
total 364
drwxr-xr-x 3 root root 4096 Jun 10 14:14 .
drwxr-xr-x 5 root root 4096 Jun 10 14:15 ..
-rw-r--r-- 1 root root 21205 May 11 03:54 altivec.h
-rw-r--r-- 1 root root 8761 May 11 06:19 backtrace.h
-rw-r--r-- 1 root root 2989 May 11 06:19 backtrace-supported.h
-rw-r--r-- 1 root root 8729 May 11 03:54 float.h
-rw-r--r-- 1 root root 4397 May 11 03:54 htmintrin.h
-rw-r--r-- 1 root root 5999 May 11 03:54 htmxlintrin.h
-rw-r--r-- 1 root root 1272 May 11 03:54 iso646.h
-rw-r--r-- 1 root root 6087 May 11 06:18 omp.h
-rw-r--r-- 1 root root 4655 May 11 06:18 openacc.h
-rw-r--r-- 1 root root 3135 May 11 03:54 paired.h
-rw-r--r-- 1 root root 7342 May 11 03:54 ppc-asm.h
-rw-r--r-- 1 root root 20866 May 11 03:54 ppu_intrinsics.h
drwxr-xr-x 2 root root 4096 Jun 10 14:14 sanitizer
-rw-r--r-- 1 root root 51710 May 11 03:54 si2vmx.h
-rw-r--r-- 1 root root 33373 May 11 03:54 spe.h
-rw-r--r-- 1 root root 54224 May 11 03:54 spu2vmx.h
-rw-r--r-- 1 root root 1210 May 11 03:54 stdalign.h
-rw-r--r-- 1 root root 4072 May 11 03:54 stdarg.h
-rw-r--r-- 1 root root 9321 May 11 03:54 stdatomic.h
-rw-r--r-- 1 root root 1524 May 11 03:54 stdbool.h
-rw-r--r-- 1 root root 13754 May 11 03:54 stddef.h
-rw-r--r-- 1 root root 6000 May 11 03:54 stdfix.h
-rw-r--r-- 1 root root 7029 May 11 03:54 stdint-gcc.h
-rw-r--r-- 1 root root 328 May 11 03:54 stdint.h
-rw-r--r-- 1 root root 1136 May 11 03:54 stdnoreturn.h
-rw-r--r-- 1 root root 10717 May 11 06:18 unwind.h
-rw-r--r-- 1 root root 139 May 11 03:54 varargs.h
-rw-r--r-- 1 root root 1792 May 11 03:54 vec_types.h
danielgb at p84:~$ uname -a
Linux p84 4.2.0-36-generic #42-Ubuntu SMP Thu May 12 22:02:52 UTC 2016 ppc64le
ppc64le ppc64le GNU/Linux
I discovered this after compiling mariadb-10.1 (which has the crc32 from
https://github.com/antonblanchard/crc32-vpmsum).
$ find /usr/lib/gcc/powerpc64le-linux-gnu/ | grep ppc-asm
/usr/lib/gcc/powerpc64le-linux-gnu/5/include/ppc-asm.h
The exact build line (from comping mariadb 10.1 branch)
[ 27%] Building ASM object
storage/xtradb/CMakeFiles/xtradb.dir/ut/crc32_power8/crc32.S.o
cd /build/build/storage/xtradb && /usr/bin/clang -DHAVE_CONFIG_H
-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS=1
-DHAVE_IB_GCC_ATOMIC_BUILTINS_64=1 -DHAVE_IB_GCC_ATOMIC_BUILTINS_BYTE=1
-DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1 -DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1
-DHAVE_IB_GCC_SYNC_SYNCHRONISE=1 -DHAVE_LZ4=1 -DLINUX_NATIVE_AIO=1
-DSIZEOF_PTHREAD_T=8 -I/build/build/include -I/source/storage/xtradb/include
-I/source/storage/xtradb/handler -I/source/include -I/source/sql
-I/build/build/pcre -I/source/pcre -I/source/zlib -I/usr/include -O2 -g
-DNDEBUG -DUNIV_LINUX -D_GNU_SOURCE=1 -fvisibility=hidden -o
CMakeFiles/xtradb.dir/ut/crc32_power8/crc32.S.o -c
/source/storage/xtradb/ut/crc32_power8/crc32.S
/source/storage/xtradb/ut/crc32_power8/crc32.S:29:10: fatal error: 'ppc-asm.h'
file not found
#include <ppc-asm.h>
^
1 error generated.
Adding strace -fe trace=stat,file -s 999 -o /tmp/clang.strace before the
clang exec in the failed build.
17332 open("/build/build/include/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such
file or directory)
17332 open("/source/storage/xtradb/include/ppc-asm.h", O_RDONLY) = -1 ENOENT
(No such file or directory)
17332 open("/source/storage/xtradb/handler/ppc-asm.h", O_RDONLY) = -1 ENOENT
(No such file or directory)
17332 open("/source/include/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file or
directory)
17332 open("/source/sql/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file or
directory)
17332 open("/build/build/pcre/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file
or directory)
17332 open("/source/pcre/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file or
directory)
17332 open("/source/zlib/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file or
directory)
17332 open("/usr/local/include/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file
or directory)
17332 open("/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/ppc-asm.h",
O_RDONLY) = -1 ENOENT (No such file or directory)
17332 open("/usr/include/powerpc64le-linux-gnu/ppc-asm.h", O_RDONLY) = -1
ENOENT (No such file or directory)
17332 open("/usr/include/ppc-asm.h", O_RDONLY) = -1 ENOENT (No such file or
directory)
17332 open("/source/storage/xtradb/ut/crc32_power8/ppc-asm.h", O_RDONLY) = -1
ENOENT (No such file or directory)
17332 open("/source/storage/xtradb/ut/crc32_power8/ppc-opcode.h", O_RDONLY) = 4
17332 open("/source/storage/xtradb/ut/crc32_power8/crc32_constants.h",
O_RDONLY) = 4
17332 lstat("/tmp/crc32-85823a.s-46503c6c", {st_mode=S_IFREG|0644,
st_size=31638, ...}) = 0
--
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/20160624/d8ce7cb2/attachment-0001.html>
More information about the llvm-bugs
mailing list