<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/124460>124460</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang's `-falign-*` compilation options are incompatible with gcc's
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          joebonrichie
      </td>
    </tr>
</table>

<pre>
    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.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVcGO4ygQ_RpyKcVywLGTgw_eiXKdw-59hKFs04PBApxO-rDfvgJn02lPT2tXaqkFuOq9evWqwr1XvUGsyf4Psj9t-BwG6-oXi601TolB4aa18lYPIUyesIbQM6HnXoisN3NmXU_ouZ37N6U1J_TsB_v6o537TPSKsLOShJ3KkhY5yRuSN38qIxB6IeDvA4QBgZT5tuNa9WZ7vb2RMgc7BWWNh9cBHQJeAxqJEoIFP0-TdSHFdVZr-6pMD_5mAr8S1sACQcr8_pc3z6k_ntjJfHLDmvE3t6wx9Ksn1ox0BR4_j_WZWJXyibbEjs86QHsLCK2djeTuBmJ2Dk3Qt39LRAntDYTmpgfM-uxZpm42IilE2InRCEW_wTtWZLTgLQKSMk8X1ugbpAw-avng1YEKILiBFoHHdl8WcP9TTVPUl7BvhJ0eeSJz_yD1OSfWlHf93zkllVbEHjdRGo_CGgkd17rl4udKItWtyjOEVuGd8ReEyiIRYs2i1q-sUu_WmtHfiEb_t2op4j_yY03xME8vBKGVB2nFPKIJPAZEn381itZoZVBa4ZcnQs_fp6BG9Ybb78tkZUMYNaFMGYnXX12VsP96jBh0mvceuEPgXYcioIzQH63-SZL7leYt6ueztdPT8WUe03E1NxH-MfnLgH8cjbhBovwLJZjQddaNPC4XMXDHRUCnfFDibtWEFvsSLJTFyludddBiCOg-JGrnkNwYw5IjgwUOfuRao1uliE8Xq-TC2qsLgrASYeJSxnhr4Hoof5RFtpE1k0d25BusdxWrDsf9kVWboT4eK1keqKC7tsJjwaWsqkNL-SGv9kUlyo2qaU73-Y6WO7qnuyrb82Nx4LuiFbtqvztSUuQ4cqUzrS9j9MNGeT9jvaNFUeabpRVp0VOadguhNO58V8eAbTv3nhS5Vj749xRBBY31_fPKP28iQmPfQNhxUjq587G8o12UiS88qFYjvKowwN3Rm9np9e-JCsPcZsKOhJ4j9v3fdnL2BUUg9Jxqia6-l3Op6T8BAAD__2xbJhM">