<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Dec 21, 2015, at 11:00 AM, Jordan Rose &lt;<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 21, 2015, at 10:57 , Pierre Habouzit &lt;<a href="mailto:pierre@habouzit.net" class="">pierre@habouzit.net</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><blockquote type="cite" class="">On Dec 21, 2015, at 9:34 AM, Jordan Rose via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:<br class=""><br class="">Hm. If this is the right setting to set on everybody's system, we could add it as part of Clang initialization (for the Clang inside Swift). Otherwise, you can use "-Xcc" to pass extra flags to Clang, in this case "-Xcc -D_GNU_SOURCE=1”.<br class=""></blockquote><br class="">You definitely want -D_GNU_SOURCE=1 on linux systems, as all the non portable calls (that also are the interesting ones) will be hidden behind this.<br class=""></div></div></blockquote></div><br class=""><div class="">Seems reasonable. If anyone wants to fix this, the relevant function is&nbsp;<a href="https://github.com/apple/swift/blob/master/lib/ClangImporter/ClangImporter.cpp#L265" class="">getNormalInvocationArguments</a>&nbsp;in ClangImporter.cpp; otherwise, please file a bug report at&nbsp;<a href="https://bugs.swift.org/" class="">https://bugs.swift.org</a>.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jordan</div></div></div></blockquote></div><br class=""><div class="">FWIW the effect of _GNU_SOURCE is documented in &lt;features.h&gt; on linux, and that’s also how you get 64bit vfs call (large file support) etc…</div><div class="">autotools give you _GNU_SOURCE by default usually e.g.</div><div class=""><br class=""></div><div class="">I double checked, _GNU_SOURCE is enough to get all the bits and pieces that you care about (at* calls, _BSD_SOURCE, etc…)</div><div class=""><br class=""></div><div class="">-Pierre</div></body></html>