From: jkummerow@chromium.org Date: Tue, 2 Jul 2013 15:03:54 +0000 (+0000) Subject: Introduce -m64 flag for making x64 when the default gcc compiler is for X32 X-Git-Tag: upstream/4.7.83~13569 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afc0724fe699cea7520f27b6de9f71b5d3ff18cb;p=platform%2Fupstream%2Fv8.git Introduce -m64 flag for making x64 when the default gcc compiler is for X32 R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/18211004 Patch from Haitao Feng . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/build/common.gypi b/build/common.gypi index 09abe29..f83a281 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -452,6 +452,26 @@ }], ], }], + ['(OS=="linux") and (v8_target_arch=="x64")', { + # Check whether the host compiler and target compiler support the + # '-m64' option and set it if so. + 'target_conditions': [ + ['_toolset=="host"', { + 'variables': { + 'm64flag': ' /dev/null 2>&1) && echo "-m64" || true)', + }, + 'cflags': [ '<(m64flag)' ], + 'ldflags': [ '<(m64flag)' ], + }], + ['_toolset=="target"', { + 'variables': { + 'm64flag': ' /dev/null 2>&1) && echo "-m64" || true)', + }, + 'cflags': [ '<(m64flag)' ], + 'ldflags': [ '<(m64flag)' ], + }] + ], + }], ['OS=="freebsd" or OS=="openbsd"', { 'cflags': [ '-I/usr/local/include' ], }],