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

    <tr>
        <th>Summary</th>
        <td>
            Flang does not support -isystem flag
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

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

<pre>
    When running the autotools configuration stage of the https://github.com/pmodels/mpich project I noticed that one check fails due to `-isystem` ending up in the command line:

```
configure:44671: checking whether Fortran 77 compiler processes .F files with C preprocessor
configure:44692: flang21 -c    -isystem /usr/local/include -I/wrkdirs/usr/ports/net/mpich/work/include -DNETMOD_INLINE=__netmod_inline_ofi__ -I/wrkdirs/usr/ports/net/mpich/work/mpich-4.3.1/src/mpl/include -I/wrkdirs/usr/ports/net/mpich/work/mpich-4.3.1/modules/j
flang-21: error: unknown argument '-isystem'; did you mean '-Xclang -isystem'?
flang-21: warning: /usr/local/include: 'linker' input unused [-Wunused-command-line-argument]
configure:44692: $? = 1   
configure: failed program was:
|
|
|         program main   
| #define ASIZE 10
| integer a(ASIZE)
|         end
|
|
```

While I certainly can patch the check to not have the `-isystem` flag in the command line, it feels natural if Flang supports it? It does not bark on `-I` after all.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVM1u6zYTfRp6M5BBUZJlL7Rw4ggw8H3pogVSdGPQ5EjiNUUK_ImRty8oy7m5bm8XrSFYFGc4Z2Z4znDvVW8QG1I9keqw4jEM1jXcOXuVq7OVH83bgAZcNEaZHsKAwGOwwVrtQVjTqT46HpQ14APvEWw3Ow0hTJ4Ue8JawtpehSGe18KOhLXTaCVqT1g7TkoMMDn7DUWAIxgblEAJYeABrEEQA4oLdFxpDzIiBAtkQzPlP3zAkWwooJEprziBMjOwsOPIjQStDCZ8Oj8bujx0f086WctyU-ek2N-AUqDrgGFAB611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