| Issue |
124460
|
| Summary |
clang's `-falign-*` compilation options are incompatible with gcc's
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
joebonrichie
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66240
Since gcc ~8 the `-falign-xyz` options where extended to support the following syntax:
```
-falign-xyz
-falign-xyz=n
-falign-xyz=n:m
-falign-xyz=n:m:n2
-falign-xyz=n:m:n2:m2
```
- `n` is the default byte boundary currently supported by clang e.g. `-falign-functions=32`,
- `n:m` is where `m` only aligns to `n` if it can be achieved by skipping <= `m` bytes e.g. `falign-functions=32:6`
- `n:m:n2` is where `n2` is the second fallback byte boundary if `n:m` isn't achieved e.g. `falign-functions=64:6:32`
- `n:m:n2:m2` is where `m2` only aligns to `n2` if it can be achieved by skipping <= `m2` e.g. `falign-functions=64:6:32:4`
gcc's documentation: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-falign-functions
The follow flags are affected:
```
falign-functions
falign-labels
falign-loops
falign-jumps
```
The extended syntax supported by gcc can affect performance characteristics e.g. aligning to 64 byte boundary for better performance but falling back to a smaller byte boundary to avoid extensive code padding on x86_64.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs