<p>WORKAROUND_CFLAGS are populated based on the capabilities and properties of the<br>
target compiler. When cross-compiling, the target compiler and the host compiler<br>
are different, so the WORKAROUND_CFLAGS might not be compatible with the host<br>
compiler.</p>
<p>For example, when cross-compiling for arm64, the current build system adds<br>
<code>-mabi=lp64</code> to the WORKAROUND_CFLAGS. Later, when the build system tries to<br>
compile <code>elf2efi64</code> tool, the compilation fails, because x86 gcc does not<br>
understand the <code>-mabi=lp64</code> flag, which is arm64 specific.</p>
<p>Signed-off-by: Ignat Korchagin <a href="mailto:ignat@cloudflare.com">ignat@cloudflare.com</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/ipxe/ipxe/pull/80'>https://github.com/ipxe/ipxe/pull/80</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>[build] Do not use WORKAROUND_CFLAGS with HOST_CC when cross-compiling</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/ipxe/ipxe/pull/80/files#diff-0">src/Makefile.housekeeping</a>
    (5)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/ipxe/ipxe/pull/80.patch'>https://github.com/ipxe/ipxe/pull/80.patch</a></li>
  <li><a href='https://github.com/ipxe/ipxe/pull/80.diff'>https://github.com/ipxe/ipxe/pull/80.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ipxe/ipxe/pull/80">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AArTVFr0G_4IYSodXyk4uqHwnZpr0KD1ks5uj1olgaJpZM4XXr2M">mute the thread</a>.<img src="https://github.com/notifications/beacon/AArTVD4LsZZ1dnM0SV8twetMeVFCMzwCks5uj1olgaJpZM4XXr2M.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/ipxe/ipxe","title":"ipxe/ipxe","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/ipxe/ipxe"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"[build] Do not use WORKAROUND_CFLAGS with HOST_CC when cross-compiling (#80)"}],"action":{"name":"View Pull Request","url":"https://github.com/ipxe/ipxe/pull/80"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ipxe/ipxe/pull/80",
"url": "https://github.com/ipxe/ipxe/pull/80",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "[build] Do not use WORKAROUND_CFLAGS with HOST_CC when cross-compiling (#80)",
"sections": [
{
"text": "",
"activityTitle": "**Ignat Korchagin**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@secumod",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "71a1a80",
"value": "[build] Do not use WORKAROUND_CFLAGS with HOST_CC when cross-compiling"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[src/Makefile.housekeeping](https://github.com/ipxe/ipxe/pull/80/files#diff-0) (5 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"ipxe/ipxe\",\n\"issueId\": 80,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"ipxe/ipxe\",\n\"pullRequestId\": 80\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/ipxe/ipxe/pull/80"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/ipxe/ipxe/pull/80.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/ipxe/ipxe/pull/80.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 392084876\n}"
}
],
"themeColor": "26292E"
}
]</script>