<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - use of MAP_ANONYMOUS blocks build on OS X 10.10 and earlier"
   href="https://bugs.llvm.org/show_bug.cgi?id=38958">38958</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>use of MAP_ANONYMOUS blocks build on OS X 10.10 and earlier
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>xray
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ken.cunningham.webuse@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20884" name="attach_20884" title="instances of MAP_ANONYMOUS in compiler-rt/* as of 20180915">attachment 20884</a> <a href="attachment.cgi?id=20884&action=edit" title="instances of MAP_ANONYMOUS in compiler-rt/* as of 20180915">[details]</a></span>
instances of MAP_ANONYMOUS in compiler-rt/* as of 20180915

A number of uses of MAP_ANONYMOUS have crept into the compiler-rt codebase, and
causes build failures on systems that only define MAP_ANON and not
MAP_ANONYMOUS (including macOS 10.10 and earlier).

Previously <<a href="https://reviews.llvm.org/D15180">https://reviews.llvm.org/D15180</a>> it was decided to use MAP_ANON
instead for this reason.

This could possibly be fixed in compiler-rt/CMakeLists.txt with a simple
blanket change: 

IF (APPLE)
  add_definitions(-DMAP_ANONYMOUS=MAP_ANON)
ENDIF

Or more elegantly the define could be tested for and added only if missing.

Or the instances of MAP_ANONYMOUS in the compiler-rt codebase could be
individually changed to MAP_ANON.

(I note tsan has done it's own version of managing this mapping with
TSAN_MAP_ANON in compiler-rt/test/tsan/ignore_lib5.cc)

A present list of involved files is attached.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>