Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gollvm: libffi and GNU as bugs #42049

Closed
advancedwebdeveloper opened this issue Oct 18, 2020 · 37 comments
Closed

gollvm: libffi and GNU as bugs #42049

advancedwebdeveloper opened this issue Oct 18, 2020 · 37 comments
Milestone

Comments

@advancedwebdeveloper
Copy link

@advancedwebdeveloper advancedwebdeveloper commented Oct 18, 2020

While building gollvm, using the latest version of Clang and libc++, I got such a problem:

428/1925] Building CXX object tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:2160:11: warning: 'insertEdge' is deprecated: Use applyUpdates() instead. [-Wdeprecated-declarations]
DTU.insertEdge(Old, PadBB);
^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/Analysis/DomTreeUpdater.h:159:3: note: 'insertEdge' has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(void insertEdge(BasicBlock *From, BasicBlock *To),
^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/Support/Compiler.h:319:23: note: expanded from macro 'LLVM_ATTRIBUTE_DEPRECATED'
decl attribute((deprecated(message)))
^
1 warning generated.
[438/1925] Building CXX object tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/Util.cpp.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/passes/Util.cpp:74:34: warning: 'getNumElements' is deprecated: Calling this function via a base VectorType is deprecated. Either call getElementCount() and handle the case where Scalable is true or cast to FixedVectorType. [-Wdeprecated-declarations]
for (unsigned i = 0, n = VT->getNumElements(); i < n; ++i) {
^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:426:3: note: 'getNumElements' has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(
^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/Support/Compiler.h:319:23: note: expanded from macro 'LLVM_ATTRIBUTE_DEPRECATED'
decl attribute((deprecated(message)))
^
1 warning generated.
[442/1925] Building C object tools/gollvm/libgo/CMakeFiles/libffi_nonpiclib.dir/libffi/src/x86/ffiw64.c.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:79:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case FFI_TYPE_STRUCT:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:79:5: note: insert 'attribute((fallthrough));' to silence this warning
case FFI_TYPE_STRUCT:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:79:5: note: insert 'break;' to avoid fall-through
case FFI_TYPE_STRUCT:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:243:18: warning: assigning to 'void *' from 'void (void)' converts between void pointer and function pointer [-Wpedantic]
closure->tramp = ffi_go_closure_win64;
^ ~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[444/1925] Building C object tools/gollvm/libgo/CMakeFiles/libbacktrace_piclib.dir/libbacktrace/elf.c.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2085:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 5:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2085:4: note: insert 'attribute((fallthrough));' to silence this warning
case 5:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2085:4: note: insert 'break;' to avoid fall-through
case 5:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2088:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 4:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2088:4: note: insert 'attribute((fallthrough));' to silence this warning
case 4:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2088:4: note: insert 'break;' to avoid fall-through
case 4:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2119:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 9:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2119:4: note: insert 'attribute((fallthrough));' to silence this warning
case 9:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2119:4: note: insert 'break;' to avoid fall-through
case 9:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2122:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 8:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2122:4: note: insert 'attribute((fallthrough));' to silence this warning
case 8:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2122:4: note: insert 'break;' to avoid fall-through
case 8:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2125:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 7:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2125:4: note: insert 'attribute((fallthrough));' to silence this warning
case 7:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2125:4: note: insert 'break;' to avoid fall-through
case 7:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2128:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 6:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2128:4: note: insert 'attribute((fallthrough));' to silence this warning
case 6:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2128:4: note: insert 'break;' to avoid fall-through
case 6:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2131:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 5:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2131:4: note: insert 'attribute((fallthrough));' to silence this warning
case 5:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2131:4: note: insert 'break;' to avoid fall-through
case 5:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2134:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 4:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2134:4: note: insert 'attribute((fallthrough));' to silence this warning
case 4:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2134:4: note: insert 'break;' to avoid fall-through
case 4:
^
break;
8 warnings generated.
[445/1925] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/java_raw_api.c.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/java_raw_api.c:328:46: warning: 'ffi_java_raw_size' is deprecated [-Wdeprecated-declarations]
ffi_java_raw raw = (ffi_java_raw)alloca (ffi_java_raw_size (cif));
^
tools/gollvm/libgo/ffi.h:299:56: note: 'ffi_java_raw_size' has been explicitly marked deprecated here
size_t ffi_java_raw_size (ffi_cif *cif) attribute((deprecated));
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/java_raw_api.c:331:3: warning: 'ffi_java_ptrarray_to_raw' is deprecated [-Wdeprecated-declarations]
ffi_java_ptrarray_to_raw (cif, avalue, raw);
^
tools/gollvm/libgo/ffi.h:295:93: note: 'ffi_java_ptrarray_to_raw' has been explicitly marked deprecated here
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) attribute((deprecated));
^
2 warnings generated.
[446/1925] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/ffiw64.c.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:79:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case FFI_TYPE_STRUCT:
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:79:5: note: insert 'attribute((fallthrough));' to silence this warning
case FFI_TYPE_STRUCT:
^
attribute((fallthrough));
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:79:5: note: insert 'break;' to avoid fall-through
case FFI_TYPE_STRUCT:
^
break;
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/ffiw64.c:243:18: warning: assigning to 'void *' from 'void (void)' converts between void pointer and function pointer [-Wpedantic]
closure->tramp = ffi_go_closure_win64;
^ ~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[448/1925] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/closures.c.o
In file included from /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/closures.c:530:
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2937:33: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
used = fp - (m->topsize + TOP_FOOT_SIZE);
^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)

/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2937:33: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   used = fp - (m->topsize + TOP_FOOT_SIZE);
                             ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3294:39: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
                                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3294:39: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
                                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3388:41: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                     ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3388:41: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                     ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3466:40: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3466:40: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3480:51: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3480:51: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3492:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
         asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3492:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
         asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3493:49: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
       size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3493:49: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
       size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3517:23: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3517:23: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3530:43: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3530:43: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3540:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     if (ssize > nb + TOP_FOOT_SIZE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3540:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     if (ssize > nb + TOP_FOOT_SIZE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3560:47: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                           ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3560:47: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                           ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3564:64: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
                                                            ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3564:64: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
                                                            ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3632:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
                                                       ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3632:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
                                                       ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3663:12: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
        ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3663:12: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
        ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/closures.c:754:29: warning: comparison of integers of different signs: 'off_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
   off_t to_write = (len < page_size) ? len : page_size;
                     ~~~ ^ ~~~~~~~~~
29 warnings generated.
[449/1925] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o
FAILED: tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o 
/usr/bin/clang -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/home/oceanfish81/workarea/llvm-project/llvm/include -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/include -x c  -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g -fPIC -g -fsplit-stack -MD -MT tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -MF tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o.d -o tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -c /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:36:2: error: expected identifier or '('
     .text
     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:120:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %cl
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:208:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:214:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:238:1: error: expected identifier or '('
ENDF(C(ffi_call_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:257:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:272:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:281:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:308:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     addq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:313:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %al
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:402:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:411:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:426:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:435:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:458:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
9 warnings and 6 errors generated.
[451/1925] Performing configure step for 'libgmp'
FAILED: tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure 
cd /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/gmp-build && /usr/bin/cmake -P /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-Debug.cmake && /usr/bin/cmake -E touch /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure
CMake Error at /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-Debug.cmake:49 (message):
Command failed: 1

'/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/gmp/configure' '--prefix=/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/install' 'CFLAGS=-I/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/install/include -fPIC -DPIC' 'LDFLAGS=-L/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/install/lib' 'CC=/usr/bin/clang' 'CXX=/usr/bin/clang++'

See also

 /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-*.log


[452/1925] Linking CXX shared library lib/libLTO.so.12git
FAILED: lib/libLTO.so.12git 
: && /usr/bin/clang++ -fPIC -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -g  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/oceanfish81/workarea/gollvm_release_build/./lib   -Wl,--version-script,"/home/oceanfish81/workarea/gollvm_release_build/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.12git -o lib/libLTO.so.12git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMX86AsmParser.a  lib/libLLVMX86CodeGen.a  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBitReader.a  lib/libLLVMCore.a  lib/libLLVMCodeGen.a  lib/libLLVMLTO.a  lib/libLLVMMC.a  lib/libLLVMMCDisassembler.a  lib/libLLVMSupport.a  lib/libLLVMTarget.a  lib/libLLVMAsmPrinter.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMCFGuard.a  lib/libLLVMGlobalISel.a  lib/libLLVMSelectionDAG.a  lib/libLLVMCodeGen.a  lib/libLLVMExtensions.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMCoroutines.a  lib/libLLVMHelloNew.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMLinker.a  lib/libLLVMInstrumentation.a  lib/libLLVMVectorize.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMProfileData.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMIRReader.a  lib/libLLVMBitReader.a  lib/libLLVMAsmParser.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMBinaryFormat.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  lib/libLLVMDemangle.a && :
clang-11: error: unable to execute command: Killed
clang-11: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 1
[1/1476] Linking CXX shared library lib/libLTO.so.12git
FAILED: lib/libLTO.so.12git 
: && /usr/bin/clang++ -fPIC -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -g  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/oceanfish81/workarea/gollvm_release_build/./lib   -Wl,--version-script,"/home/oceanfish81/workarea/gollvm_release_build/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.12git -o lib/libLTO.so.12git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMX86AsmParser.a  lib/libLLVMX86CodeGen.a  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBitReader.a  lib/libLLVMCore.a  lib/libLLVMCodeGen.a  lib/libLLVMLTO.a  lib/libLLVMMC.a  lib/libLLVMMCDisassembler.a  lib/libLLVMSupport.a  lib/libLLVMTarget.a  lib/libLLVMAsmPrinter.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMCFGuard.a  lib/libLLVMGlobalISel.a  lib/libLLVMSelectionDAG.a  lib/libLLVMCodeGen.a  lib/libLLVMExtensions.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMCoroutines.a  lib/libLLVMHelloNew.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMLinker.a  lib/libLLVMInstrumentation.a  lib/libLLVMVectorize.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMProfileData.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMIRReader.a  lib/libLLVMBitReader.a  lib/libLLVMAsmParser.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMBinaryFormat.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  lib/libLLVMDemangle.a && :
clang-11: error: unable to execute command: Killed
clang-11: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 1
[1/1476] Linking CXX shared library lib/libLTO.so.12git
FAILED: lib/libLTO.so.12git 
: && /usr/bin/clang++ -fPIC -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -g  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/oceanfish81/workarea/gollvm_release_build/./lib   -Wl,--version-script,"/home/oceanfish81/workarea/gollvm_release_build/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.12git -o lib/libLTO.so.12git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMX86AsmParser.a  lib/libLLVMX86CodeGen.a  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBitReader.a  lib/libLLVMCore.a  lib/libLLVMCodeGen.a  lib/libLLVMLTO.a  lib/libLLVMMC.a  lib/libLLVMMCDisassembler.a  lib/libLLVMSupport.a  lib/libLLVMTarget.a  lib/libLLVMAsmPrinter.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMCFGuard.a  lib/libLLVMGlobalISel.a  lib/libLLVMSelectionDAG.a  lib/libLLVMCodeGen.a  lib/libLLVMExtensions.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMCoroutines.a  lib/libLLVMHelloNew.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMLinker.a  lib/libLLVMInstrumentation.a  lib/libLLVMVectorize.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMProfileData.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMIRReader.a  lib/libLLVMBitReader.a  lib/libLLVMAsmParser.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMBinaryFormat.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  lib/libLLVMDemangle.a && :
clang-11: error: unable to execute command: Killed
clang-11: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ /usr/bin/clang++ -fPIC -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -g  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/oceanfish81/workarea/gollvm_release_build/./lib   -Wl,--version-script,"/home/oceanfish81/workarea/gollvm_release_build/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.12git -o lib/libLTO.so.12git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMX86AsmParser.a  lib/libLLVMX86CodeGen.a  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBitReader.a  lib/libLLVMCore.a  lib/libLLVMCodeGen.a  lib/libLLVMLTO.a  lib/libLLVMMC.a  lib/libLLVMMCDisassembler.a  lib/libLLVMSupport.a  lib/libLLVMTarget.a  lib/libLLVMAsmPrinter.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMCFGuard.a  lib/libLLVMGlobalISel.a  lib/libLLVMSelectionDAG.a  lib/libLLVMCodeGen.a  lib/libLLVMExtensions.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMCoroutines.a  lib/libLLVMHelloNew.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMLinker.a  lib/libLLVMInstrumentation.a  lib/libLLVMVectorize.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMProfileData.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMIRReader.a  lib/libLLVMBitReader.a  lib/libLLVMAsmParser.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMBinaryFormat.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  lib/libLLVMDemangle.a 
^C
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ /usr/bin/clang++ -fuse-ld=lld -fPIC -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -g  -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/home/oceanfish81/workarea/gollvm_release_build/./lib   -Wl,--version-script,"/home/oceanfish81/workarea/gollvm_release_build/tools/lto/LTO.exports" -shared -Wl,-soname,libLTO.so.12git -o lib/libLTO.so.12git tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o tools/lto/CMakeFiles/LTO.dir/lto.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMX86AsmParser.a  lib/libLLVMX86CodeGen.a  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBitReader.a  lib/libLLVMCore.a  lib/libLLVMCodeGen.a  lib/libLLVMLTO.a  lib/libLLVMMC.a  lib/libLLVMMCDisassembler.a  lib/libLLVMSupport.a  lib/libLLVMTarget.a  lib/libLLVMAsmPrinter.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMCFGuard.a  lib/libLLVMGlobalISel.a  lib/libLLVMSelectionDAG.a  lib/libLLVMCodeGen.a  lib/libLLVMExtensions.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMCoroutines.a  lib/libLLVMHelloNew.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMLinker.a  lib/libLLVMInstrumentation.a  lib/libLLVMVectorize.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMProfileData.a  lib/libLLVMObject.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMIRReader.a  lib/libLLVMBitReader.a  lib/libLLVMAsmParser.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMBinaryFormat.a  lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/x86_64-linux-gnu/libz.so  lib/libLLVMDemangle.a 
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 1
[0/1476] Linking CXX shared library lib/libLTO.so.12git^C
ninja: build stopped: interrupted by user.
Traceback (most recent call last):
File "/usr/local/bin/ninja", line 8, in <module>
 sys.exit(ninja())
File "/usr/local/lib/python3.8/dist-packages/ninja/__init__.py", line 50, in ninja
 raise SystemExit(_program('ninja', sys.argv[1:]))
File "/usr/local/lib/python3.8/dist-packages/ninja/__init__.py", line 46, in _program
 return subprocess.call([os.path.join(BIN_DIR, name)] + args)
File "/usr/lib/python3.8/subprocess.py", line 342, in call
 return p.wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1079, in wait
 return self._wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1804, in _wait
 (pid, sts) = self._try_wait(0)
File "/usr/lib/python3.8/subprocess.py", line 1762, in _try_wait
 (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ gedit build.ninja &
[1] 7063
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 1
[2/1476] Performing configure step for 'libgmp'^CTraceback (most recent call last):
File "/usr/local/bin/ninja", line 8, in <module>
 sys.exit(ninja())
File "/usr/local/lib/python3.8/dist-packages/ninja/__init__.py", line 50, in ninja
 raise SystemExit(_program('ninja', sys.argv[1:]))
File "/usr/local/lib/python3.8/dist-packages/ninja/__init__.py", line 46, in _program
 return subprocess.call([os.path.join(BIN_DIR, name)] + args)
File "/usr/lib/python3.8/subprocess.py", line 342, in call
 return p.wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1079, in wait
 return self._wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1804, in _wait
 (pid, sts) = self._try_wait(0)
File "/usr/lib/python3.8/subprocess.py", line 1762, in _try_wait
 (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

[1]+  Done                    gedit build.ninja
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 4
[5/1474] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o
FAILED: tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o 
/usr/bin/clang -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/home/oceanfish81/workarea/llvm-project/llvm/include -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/include -x c  -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g -fPIC -g -fsplit-stack -MD -MT tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -MF tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o.d -o tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -c /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:36:2: error: expected identifier or '('
     .text
     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:120:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %cl
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:208:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:214:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:238:1: error: expected identifier or '('
ENDF(C(ffi_call_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:257:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:272:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:281:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:308:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     addq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:313:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %al
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:402:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:411:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:426:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:435:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:458:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
9 warnings and 6 errors generated.
[6/1474] Building C object tools/gollvm/libgo/CMakeFiles/libbacktrace_nonpiclib.dir/libbacktrace/elf.c.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2085:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 5:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2085:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 5:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2085:4: note: insert 'break;' to avoid fall-through
                     case 5:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2088:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 4:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2088:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 4:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2088:4: note: insert 'break;' to avoid fall-through
                     case 4:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2119:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 9:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2119:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 9:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2119:4: note: insert 'break;' to avoid fall-through
                     case 9:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2122:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 8:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2122:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 8:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2122:4: note: insert 'break;' to avoid fall-through
                     case 8:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2125:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 7:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2125:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 7:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2125:4: note: insert 'break;' to avoid fall-through
                     case 7:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2128:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 6:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2128:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 6:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2128:4: note: insert 'break;' to avoid fall-through
                     case 6:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2131:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 5:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2131:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 5:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2131:4: note: insert 'break;' to avoid fall-through
                     case 5:
                     ^
                     break; 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2134:4: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
                     case 4:
                     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2134:4: note: insert '__attribute__((fallthrough));' to silence this warning
                     case 4:
                     ^
                     __attribute__((fallthrough)); 
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libbacktrace/elf.c:2134:4: note: insert 'break;' to avoid fall-through
                     case 4:
                     ^
                     break; 
8 warnings generated.
[8/1474] Performing configure step for 'libgmp'
FAILED: tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure 
cd /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/gmp-build && /usr/bin/cmake -P /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-Debug.cmake && /usr/bin/cmake -E touch /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure
CMake Error at /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-Debug.cmake:49 (message):
Command failed: 1

'/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/gmp/configure' '--prefix=/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/install' 'CFLAGS=-I/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/install/include -fPIC -DPIC' 'LDFLAGS=-L/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/install/lib' 'CC=/usr/bin/clang' 'CXX=/usr/bin/clang++'

See also

 /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-*.log


ninja: build stopped: subcommand failed.
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ sudo apt install m4
[sudo] password for oceanfish81: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
libsigsegv2
Suggested packages:
m4-doc
The following NEW packages will be installed:
libsigsegv2 m4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 213 kB of archives.
After this operation, 402 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libsigsegv2 amd64 2.12-2 [13,9 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 m4 amd64 1.4.18-4 [199 kB]
Fetched 213 kB in 1s (392 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 165407 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.12-2_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.12-2) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.18-4_amd64.deb ...
Unpacking m4 (1.4.18-4) ...
Setting up libsigsegv2:amd64 (2.12-2) ...
Setting up m4 (1.4.18-4) ...
Processing triggers for install-info (6.7.0.dfsg.2-5) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Processing triggers for man-db (2.9.1-1) ...
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 4
[1/1468] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o
FAILED: tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o 
/usr/bin/clang -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/home/oceanfish81/workarea/llvm-project/llvm/include -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/include -x c  -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g -fPIC -g -fsplit-stack -MD -MT tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -MF tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o.d -o tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -c /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:36:2: error: expected identifier or '('
     .text
     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:120:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %cl
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:208:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:214:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:238:1: error: expected identifier or '('
ENDF(C(ffi_call_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:257:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:272:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:281:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:308:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     addq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:313:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %al
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:402:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:411:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:426:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:435:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:458:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
9 warnings and 6 errors generated.
[4/1468] Performing configure step for 'libgmp'
-- libgmp configure command succeeded.  See also /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-*.log
ninja: build stopped: subcommand failed.
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja clean
[1/1] Cleaning all built files...
Cleaning... 1666 files.
oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 4
[32/3091] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.o^C
ninja: build stopped: interrupted by user.
Traceback (most recent call last):
File "/usr/local/bin/ninja", line 8, in <module>
 sys.exit(ninja())
File "/usr/local/lib/python3.8/dist-packages/ninja/__init__.py", line 50, in ninja
 raise SystemExit(_program('ninja', sys.argv[1:]))
File "/usr/local/lib/python3.8/dist-packages/ninja/__init__.py", line 46, in _program
 return subprocess.call([os.path.join(BIN_DIR, name)] + args)
File "/usr/lib/python3.8/subprocess.py", line 342, in call
 return p.wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1079, in wait
 return self._wait(timeout=timeout)
File "/usr/lib/python3.8/subprocess.py", line 1804, in _wait
 (pid, sts) = self._try_wait(0)
File "/usr/lib/python3.8/subprocess.py", line 1762, in _try_wait
 (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

oceanfish81@oceanfish81-VirtualBox:~/workarea/gollvm_release_build$ ninja -j 8
[1448/3059] Performing download step (download, verify and extract) for 'libgmp'
-- verifying file...
    file='/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external-downloads/gmp-6.1.0.tar.bz2'
-- File already exists and hash match (skip download):
file='/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external-downloads/gmp-6.1.0.tar.bz2'
MD5='86ee6e54ebfc4a90b643a65e402c4048'
-- extracting...
  src='/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external-downloads/gmp-6.1.0.tar.bz2'
  dst='/home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/external/gmp'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[1458/3059] Building CXX object tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/GoStatepoints.cpp.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/passes/GoStatepoints.cpp:2160:11: warning: 'insertEdge' is deprecated: Use applyUpdates() instead. [-Wdeprecated-declarations]
   DTU.insertEdge(Old, PadBB);
       ^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/Analysis/DomTreeUpdater.h:159:3: note: 'insertEdge' has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(void insertEdge(BasicBlock *From, BasicBlock *To),
^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/Support/Compiler.h:319:23: note: expanded from macro 'LLVM_ATTRIBUTE_DEPRECATED'
decl __attribute__((deprecated(message)))
                   ^
1 warning generated.
[1543/3059] Performing configure step for 'libgmp'
-- libgmp configure command succeeded.  See also /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-configure-*.log
[1567/3059] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/closures.c.o
In file included from /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/closures.c:530:
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2937:33: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   used = fp - (m->topsize + TOP_FOOT_SIZE);
                             ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2937:33: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   used = fp - (m->topsize + TOP_FOOT_SIZE);
                             ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3294:39: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
                                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3294:39: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
                                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3388:41: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                     ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3388:41: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                     ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3466:40: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3466:40: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3480:51: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3480:51: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3492:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
         asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3492:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
         asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3493:49: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
       size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3493:49: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
       size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3517:23: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3517:23: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
                   ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3530:43: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3530:43: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2148:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3540:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     if (ssize > nb + TOP_FOOT_SIZE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3540:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     if (ssize > nb + TOP_FOOT_SIZE) {
                      ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3560:47: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                           ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3560:47: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
                                           ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3564:64: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
                                                            ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3564:64: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
     init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
                                                            ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3632:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
                                                       ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3632:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
   if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
                                                       ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3663:12: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
        ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1280:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
          ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:3663:12: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
 pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
        ^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:2193:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1693:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p)        ((void*)((char*)(p)       + TWO_SIZE_T_SIZES))
                                                   ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/dlmalloc.c:1281:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/closures.c:754:29: warning: comparison of integers of different signs: 'off_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
   off_t to_write = (len < page_size) ? len : page_size;
                     ~~~ ^ ~~~~~~~~~
29 warnings generated.
[1572/3059] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o
FAILED: tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o 
/usr/bin/clang -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/home/oceanfish81/workarea/llvm-project/llvm/include -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/include -x c  -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g -fPIC -g -fsplit-stack -MD -MT tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -MF tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o.d -o tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/unix64.S.o -c /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:36:2: error: expected identifier or '('
     .text
     ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:120:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %cl
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:208:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:214:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     shrl    $UNIX64_SIZE_SHIFT, %ecx
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:238:1: error: expected identifier or '('
ENDF(C(ffi_call_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:257:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:272:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:281:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:308:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     addq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:313:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     cmpb    $UNIX64_RET_LAST, %al
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:402:1: error: expected identifier or '('
ENDF(C(ffi_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:411:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:426:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64_sse))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:435:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
     subq    $ffi_closure_FS, %rsp
             ^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:458:1: error: expected identifier or '('
ENDF(C(ffi_go_closure_unix64))
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h:25:38: note: expanded from macro 'ENDF'
# define ENDF(X)  .type X,@function; .size X, . - X
                                  ^
9 warnings and 6 errors generated.
[1575/3059] Building CXX object tools/gollvm/passes/CMakeFiles/LLVMCppGoPasses.dir/Util.cpp.o
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/passes/Util.cpp:74:34: warning: 'getNumElements' is deprecated: Calling this function via a base VectorType is deprecated. Either call getElementCount() and handle the case where Scalable is true or cast to FixedVectorType. [-Wdeprecated-declarations]
 for (unsigned i = 0, n = VT->getNumElements(); i < n; ++i) {
                              ^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:426:3: note: 'getNumElements' has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(
^
/home/oceanfish81/workarea/llvm-project/llvm/include/llvm/Support/Compiler.h:319:23: note: expanded from macro 'LLVM_ATTRIBUTE_DEPRECATED'
decl __attribute__((deprecated(message)))
                   ^
1 warning generated.
[1579/3059] Performing build step for 'libgmp'
-- libgmp build command succeeded.  See also /home/oceanfish81/workarea/gollvm_release_build/tools/gollvm/libgmp-prefix/src/libgmp-stamp/libgmp-build-*.log
ninja: build stopped: subcommand failed.
@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 18, 2020

$ as --version
GNU assembler (GNU Binutils for Ubuntu) 2.34
This assembler was configured for a target of `x86_64-linux-gnu'.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 18, 2020

$ clang --version && clang++ --version
clang version 11.0.0 (https://github.com/llvm/llvm-project.git 0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang version 11.0.0 (https://github.com/llvm/llvm-project.git 0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 18, 2020

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 18, 2020

I was able to compile libgmp and install it locally.
Then I have compiled and installed libffi locally.
Something is wrong with CMake's config - it is triggering the generation of libgmp's configuration in a wrong way. Thus non-working Makefile is produced.

@thanm
Copy link
Member

@thanm thanm commented Oct 22, 2020

@advancedwebdeveloper randomly mentioning folks as you did above is not helpful, just generates noise and confusion.

As of 33d28e1b8583e3e0455d80bc5bec05476257c39c gollvm is no longer invoking the external assembler by default, so the version of "as" should not be relevant. I would suggest updating your git clients and redoing the build from a clean slate.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 22, 2020

@advancedwebdeveloper randomly mentioning folks as you did above is not helpful, just generates noise and confusion.

As of 33d28e1b8583e3e0455d80bc5bec05476257c39c gollvm is no longer invoking the external assembler by default, so the version of "as" should not be relevant. I would suggest updating your git clients and redoing the build from a clean slate.

What exactly are you proposing?
The question was about libffi, probably - it is not compiling.
And it is about building gollvm's dependency - and it is surely about invoking GNU as.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 22, 2020

I would suggest updating your git clients and redoing the build from a clean slate.

And why did you decide that I have an outdated Git client?

$ git version
git version 2.25.1

@thanm
Copy link
Member

@thanm thanm commented Oct 22, 2020

Not the version of git itself, the revision checked out in each repo. Example:

$ cd [your llvm project root]/llvm/tools/gollvm
$ git log --oneline -1
33d28e1 (HEAD -> master, origin/master, origin/HEAD) gollvm: support debug compression options for integ assembler
$ git -C libgo/libffi log --oneline -1
407394c (HEAD -> master, origin/master, origin/HEAD) docs: fix simple typo, paramters -> parameters (#589)
$ git -C gofrontend log --oneline -1
3b6252d2 (HEAD -> master, origin/master, origin/HEAD) compiler: don't export function type parameter names

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 22, 2020

Here is what I see:

~/workarea/llvm-project/llvm/tools/gollvm$ git log --oneline -1
33d28e1 (HEAD -> master, origin/master, origin/HEAD) gollvm: support debug compression options for integ assembler

~/workarea/llvm-project/llvm/tools/gollvm$ git -C libgo/libffi log --oneline -1
407394c (HEAD -> master, origin/master, origin/HEAD) docs: fix simple typo, paramters -> parameters (#589)

~/workarea/llvm-project/llvm/tools/gollvm$ git -C gofrontend log --oneline -1
b2be9455 (HEAD -> master, origin/master, origin/HEAD) libgo: adjust NetBSD-specific types for stable syscall API

@thanm
Copy link
Member

@thanm thanm commented Oct 22, 2020

OK, try rerunning the compile command for that file with -E (and with -MT/-MD etc stripped out). This will show the preprocessed source. Ex:

/usr/bin/clang -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/home/oceanfish81/workarea/llvm-project/llvm/include -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/include -x c -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g -fPIC -g -fsplit-stack -c /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S -E | head -100

@cagedmantis cagedmantis added this to the Backlog milestone Oct 22, 2020
@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 22, 2020

Here you go:

$ /usr/bin/clang -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gollvm/libgo -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo -Iinclude -I/home/oceanfish81/workarea/llvm-project/llvm/include -I/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/include -x c -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -g -fPIC -g -fsplit-stack -c /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S -E | head -100
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:120:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
cmpb $UNIX64_RET_LAST, %cl
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:208:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
shrl $UNIX64_SIZE_SHIFT, %ecx
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:214:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
shrl $UNIX64_SIZE_SHIFT, %ecx
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:257:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
subq $ffi_closure_FS, %rsp
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:281:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
subq $ffi_closure_FS, %rsp
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:308:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
addq $ffi_closure_FS, %rsp
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:313:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
cmpb $UNIX64_RET_LAST, %al
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:411:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
subq $ffi_closure_FS, %rsp
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:435:7: warning: '$' in identifier [-Wdollar-in-identifier-extension]
subq $ffi_closure_FS, %rsp
^
# 1 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S"
# 1 "" 1
# 1 "" 3
# 343 "" 3
# 1 "" 1
# 1 "" 2
# 1 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S" 2
# 31 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S"
# 1 "tools/gollvm/libgo/fficonfig.h" 1
# 32 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S" 2
# 1 "tools/gollvm/libgo/ffi.h" 1
# 58 "tools/gollvm/libgo/ffi.h"
# 1 "tools/gollvm/libgo/ffitarget.h" 1
# 59 "tools/gollvm/libgo/ffi.h" 2
# 33 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S" 2
# 1 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/internal64.h" 1
# 34 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S" 2
# 1 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/asmnames.h" 1
# 35 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S" 2

.text
# 59 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S"
.balign 8
.globl ffi_call_unix64
.hidden ffi_call_unix64

ffi_call_unix64:
.LUW0:

movq (%rsp), %r10
leaq (%rdi, %rsi), %rax
movq %rdx, (%rax)
movq %rcx, 8(%rax)
movq %rbp, 16(%rax)
movq %r10, 24(%rax)
movq %rax, %rbp

81 "/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S"

.LUW1:

movq %rdi, %r10
movq %r8, %r11
movl %r9d, %eax

movq (%r10), %rdi
movq 0x08(%r10), %rsi
movq 0x10(%r10), %rdx
movq 0x18(%r10), %rcx
movq 0x20(%r10), %r8
movq 0x28(%r10), %r9
movl 0xb0(%r10), %eax
testl %eax, %eax
jnz .Lload_sse
.Lret_from_load_sse:

leaq 0xb8(%r10), %rsp
popq %r10

call *%r11

leaq 24(%rbp), %rsp

movq 0(%rbp), %rcx
movq 8(%rbp), %rdi
movq 16(%rbp), %rbp
.LUW2:

cmpb $UNIX64_RET_LAST, %cl
movzbl %cl, %r10d
leaq .Lstore_table(%rip), %r11
ja .Lsa

leaq (%r11, %r10, 8), %r10

leaq -20(%rsp), %rsi
jmp *%r10

.balign 8
.Lstore_table:
.balign 8

ret
.balign 8

movzbl %al, %eax
movq %rax, (%rdi)

@thanm
Copy link
Member

@thanm thanm commented Oct 22, 2020

Well, I'm stumped then. What you are telling me is that when you rerun the offending command by hand, it works. But when ninja runs it, you get the

home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/unix64.S:36:2: error: expected identifier or '('

errors. I don't have an explanation for that.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 22, 2020

@thanm ,
here are my compressed llmv-project + build_release folders

@thanm
Copy link
Member

@thanm thanm commented Oct 22, 2020

OK, I should have picked up on this before, but the command that's being used to assemble the libffi files includes these options mixed in with all the others:

-x c

That tells clang that in spite of the ".S" extension on the file, the input language is C, not assembly.

So the next question is how that "-x c" got in there. I looked for it in the LLVM sources-- don't see it anywhere there. How exactly are you running cmake, e.g. exact cmake invocation?

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 22, 2020

I have pulled the source tarballs of all four dependencies - and configured/built/installed those, in external/separate folders.
You can check the proof (compressed build folders here) .

It still does not explain how to avoid locking Ninja's (or make's) targets - I can't compile/link the rest, cause of this (and I can't re-use pre-installed decencies - headers and libs are available from system folders).
Patching CMake's config. files would be required.

As for your question: I didn't experiment with libc++, this time - so I tried such configurations:

-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/gollvm_dist -G Ninja ../llvm-project/llvm

-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/gollvm_dist -DLLVM_TARGETS_TO_BUILD=X86 -G Ninja ../llvm-project/llvm

Maybe -DLLVM_TARGETS_TO_BUILD=X86 triggers something - but it was just to limit against non-desired back-ends.

Let me know what else should I check.

@thanm
Copy link
Member

@thanm thanm commented Oct 22, 2020

You might try adding -DCMAKE_ASM_COMPILER=clang to your cmake invocation. Shot in the dark, but it might help.

-DLLVM_TARGETS_TO_BUILD=X86 should be fine, I use that routinely.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 23, 2020

@thanm ,
it didn't work.

$ make -j 4 gollvm
[ 0%] Built target GoDumpSpecMacroParser
[ 0%] Built target LLVMDemangle
[ 0%] Built target llvm_vcsrevision_h
[ 0%] Built target obj.llvm-tblgen
[ 0%] Built target libgmp
[ 0%] Built target GoDumpSpecMacroTokenizer
[ 0%] Building C object tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/sysv.S.o
[ 0%] Built target libbacktrace_piclib
[ 0%] Built target libbacktrace_nonpiclib
[ 0%] Building C object tools/gollvm/libgo/CMakeFiles/libffi_nonpiclib.dir/libffi/src/x86/sysv.S.o
Scanning dependencies of target LLVMSupport
Scanning dependencies of target libmpfr
[ 0%] Creating directories for 'libmpfr'
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/sysv.S:1137:2: error: expected identifier or '('
.section .note.GNU-stack,"",@progbits
^
/home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/libgo/libffi/src/x86/sysv.S:1137:2: error: 1 error generated.
expected identifier or '('
.section .note.GNU-stack,"",@progbits
^
1 error generated.
make[3]: *** [tools/gollvm/libgo/CMakeFiles/libffi_nonpiclib.dir/build.make:186: tools/gollvm/libgo/CMakeFiles/libffi_nonpiclib.dir/libffi/src/x86/sysv.S.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:31338: tools/gollvm/libgo/CMakeFiles/libffi_nonpiclib.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/build.make:186: tools/gollvm/libgo/CMakeFiles/libffi_piclib.dir/libffi/src/x86/sysv.S.o] Error 1
make[3]: *** Waiting for unfinished jobs....

for

$ cmake -DCMAKE_ASM_COMPILER=clang -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/gollvm_dist ../llvm-project/llvm

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 23, 2020

Here is my compressed build folder

@thanm
Copy link
Member

@thanm thanm commented Oct 23, 2020

make -j4 gollvm

Please add "-G ninja" when invoking cmake. Building with "make" is not something I've ever tried-- please use ninja instead.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 23, 2020

This corresponds to what I got with

$ cmake -DCMAKE_ASM_COMPILER=clang -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/gollvm_dist -G Ninja ../llvm-project/llvm

@thanm
Copy link
Member

@thanm thanm commented Oct 23, 2020

OK, try running cmake with the additional "--trace-expand" option. This will generate huge amounts of trace output, but once you have that you can sift through it and look for the spot where the "-x c" is being introduced.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 23, 2020

My log
Compressed build folder

Log is too big for any gist or download threw Github's UI.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 23, 2020

What should be the next step?

@thanm
Copy link
Member

@thanm thanm commented Oct 23, 2020

OK, I in inspected the cmake error log -- nothing there. That suggests that the bad behavior is being injected by cmake itself.

On that theory I found this commit:

Kitware/CMake@644d3b8

which looks very suspicious. What version of cmake are you runnning? Is it 3.18 or beyond by any chance?

I will try building a tip version of cmake to see if I can reproduce.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 23, 2020

Change https://golang.org/cl/264633 mentions this issue: gollvm: fix libffi compiler config to be compatible with cmake

@thanm
Copy link
Member

@thanm thanm commented Oct 23, 2020

It does indeed reproduce. I am sending a fix.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 23, 2020

Just a note that I fixed the libbacktrace warnings reported above. These are not causing any trouble, but it seemed worth fixing them.

@thanm
Copy link
Member

@thanm thanm commented Oct 24, 2020

https://golang.org/cl/264633 has been submitted.

@advancedwebdeveloper thanks for your patience.

This should be fixed now, let me know if not.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 24, 2020

OK, I in inspected the cmake error log -- nothing there. That suggests that the bad behavior is being injected by cmake itself.

On that theory I found this commit:

Kitware/CMake@644d3b8

which looks very suspicious. What version of cmake are you runnning? Is it 3.18 or beyond by any chance?

I will try building a tip version of cmake to see if I can reproduce.

$ cmake --version
cmake version 3.19.0-rc1

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 24, 2020

@thanm, and what is the problem with upgrading ../llvm-project/llvm/tools/CMakeLists.txt ?
So it would target the latest versions of gmp, mpfr and mpc libraries?
That issue with MD5 becomes really annoying - my build crashes, cause of this. I had to replace those hashes by hand.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 24, 2020

I have compiled gollvm - so this issue could be closed.

But I have another issue, now:
Despite

$ git -C gofrontend log --oneline -1
28f3df46 (HEAD -> master, origin/master, origin/HEAD) net/http/cgi: merge upstream changes to default env vars

and the fact that Golang 1.15.3 was released - I am getting

$ ./go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

.
@ianlancetaylor , it looks like it is untrue cause of two reasons:

  • that's an up-to-date version the front-end (the last commit took place on Fri Oct 23 23:55:09 2020 - and it's Sun Oct 24 20:29:05 2020 now);

  • LLVM's version equals 11.0.0

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 24, 2020

We haven't yet updated the gofrontend code to 1.15.3.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 24, 2020

But what released then?

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 24, 2020

* LLVM's version equals [11.0.0](https://github.com/llvm/llvm-project/releases/tag/llvmorg-11.0.0)

@lattner , could you elaborate regarding this?

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 24, 2020

Please, please, please, do not CC random people to ask questions about GoLLVM. Please be respectful of people's time.

The main Go compiler, the gc compiler, had a 1.15.3 release. That release has not yet been incorporated into the gofrontend code used by GoLLVM.

@advancedwebdeveloper
Copy link
Author

@advancedwebdeveloper advancedwebdeveloper commented Oct 24, 2020

OK, that means that there is no issue.
Probably I would share the "release" build (as also as the "debug" build and other types), during the next two days.
@ianlancetaylor , it would to have a summary of those not-yet-implemented features.

@thanm
Copy link
Member

@thanm thanm commented Oct 26, 2020

$ ./go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

This is expected behavior. When LLVM folks release version X, they then bump the major version of LLVM in trunk to N+1. See for example https://github.com/llvm/llvm-project/blob/7ab7b979d29e/llvm/CMakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.