Reviewers: Jakob,

Message:
After I set up a Gentoo X32 environment by following
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml and selecting
stage3-x32-20130627.tar.bz2, I found x64.release could not be built
successfully. The reason is that the default gcc compiler is for X32 in the
stage3-x32-20130627 and we need -m64 to make x64.release.

It is very straightforward to set up a Gentoo X32 environment by following their installation guide. If you want to have a try, make sure "CONFIG_X86_X32=y" and
"CONFIG_DEVTMPFS=y" are set when configuring the Linux kernel.

Description:
Introduce -m64 flag for making x64 when the default gcc compiler is for X32

Please review this at https://codereview.chromium.org/18211004/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     build/common.gypi


Index: build/common.gypi
===================================================================
--- build/common.gypi   (revision 15407)
+++ build/common.gypi   (working copy)
@@ -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': '<!((echo | $(echo ${CXX_host:-$(which g++)}) -m64 -E - > /dev/null 2>&1) && echo "-m64" || true)',
+            },
+            'cflags': [ '<(m64flag)' ],
+            'ldflags': [ '<(m64flag)' ],
+          }],
+          ['_toolset=="target"', {
+            'variables': {
+ 'm64flag': '<!((echo | $(echo ${CXX_target:-<(CXX)}) -m64 -E - > /dev/null 2>&1) && echo "-m64" || true)',
+            },
+            'cflags': [ '<(m64flag)' ],
+            'ldflags': [ '<(m64flag)' ],
+          }]
+        ],
+      }],
       ['OS=="freebsd" or OS=="openbsd"', {
         'cflags': [ '-I/usr/local/include' ],
       }],


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to