<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - llgo from branches/release_40 fails to build"
   href="https://llvm.org/bugs/show_bug.cgi?id=31786">31786</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llgo from branches/release_40 fails to build
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>4.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>bero@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17905" name="attach_17905" title="Don't ignore the return value of write() calls">attachment 17905</a> <a href="attachment.cgi?id=17905&action=edit" title="Don't ignore the return value of write() calls">[details]</a></span>
Don't ignore the return value of write() calls

llgo from branches/release_40 doesn't compile.

At first, building libgo barfs with complaints about return values of
runtime_write being ignored (runtime_write is #defined to write, which in glibc
is marked __attribute__((__warn_unused_result__)) -- and libgo is built with
-Werror, causing the warning to be fatal).

After fixing that (1st attached patch), the build barfs again because compiler
flags passed to clang are also used for llgo, but llgo only understands a
subset of the flags clang understands -- causing "gllgo: error: unrecognized
command line option '-pipe'" and "gllgo: error: unknown command line option:
'--param=ssp-buffer-size=4'".

The second patch I'm attaching fixes the latter (for the moment, by making llgo
accept (and quietly ignore) those flags - but maybe using a separate set of
flags when calling gllgo is a better fix).</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>