| Issue |
56028
|
| Summary |
error: definition of builtin function '__sync_synchronize'
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
sunch20
|
I use Clang 10 to replace GCC to compile C file, but it report error as:
```
../../lib/libc/src/exit/atexit.c:101:6: error: definition of builtin function '__sync_synchronize'
void __sync_synchronize(void)
^
1 error generated.
```
the compile options I used as:
```
-g -gdwarf-2 -O2 -fno-builtin -ffreestanding -fno-pic -funsigned-char -ffunction-sections -fdata-sections -Wall -Wno-pragmas -fstack-protector-strong -Wformat=2 -nostdinc -nostdlib -std=gnu99 -Wpointer-arith -Wstrict-prototypes -fno-exceptions -pipe -fno-omit-frame-pointer -Winvalid-pch -fno-short-enums --target=arm-none-eabi -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -D__LITEOS__ -DSECUREC_IN_KERNEL=0 -D_ALL_SOURCE -DLOSCFG_KERNEL_CPP_EXCEPTIONS_SUPPORT -DTESTSTM32F429IGTX -DSTM32F429xx
```
I understand the option `-fno-builtin` is to disable the builtin function, it should solve my error, but I don't know why it doesn't work?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs