forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For building v8 using gn on aix_ppc64, linux_s390x and linux_ppc64(bo…
…th LE and BE). Also add support for host_byteorder logic which is used in the following v8 and icu issues respectively - https://codereview.chromium.org/2809963004/ https://codereview.chromium.org/2812173002/ R=machenbach@chromium.org, dpranke@chromium.org, adamk@chromium.org BUG=706728 Review-Url: https://codereview.chromium.org/2815453004 Cr-Commit-Position: refs/heads/master@{#470463}
- Loading branch information
rayb
authored and
Commit bot
committed
May 10, 2017
1 parent
e69195a
commit 367a042
Showing
13 changed files
with
226 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/config/sanitizers/sanitizers.gni") | ||
import("//build/toolchain/toolchain.gni") | ||
|
||
# This is included by reference in the //build/config/compiler config that | ||
# is applied to all targets. It is here to separate out the logic. | ||
|
||
config("compiler") { | ||
# These flags are shared between the C compiler and linker. | ||
defines = [ | ||
"_LINUX_SOURCE_COMPAT=1", | ||
"__STDC_FORMAT_MACROS", | ||
"_ALL_SOURCE=1", | ||
] | ||
|
||
cflags = [ | ||
"-Wall", | ||
"-Wno-unused-parameter", | ||
"-pthread", | ||
"-Wmissing-field-initializers", | ||
"-Wno-uninitialized", | ||
"-mcpu=power5+", | ||
"-mfprnd", | ||
"-mno-popcntb", | ||
"-maix64", | ||
"-fdata-sections", | ||
"-ffunction-sections", | ||
"-O3", | ||
|
||
# "-Werror" | ||
# We need to find a way to fix the TOC warnings if we want to enable this. | ||
] | ||
|
||
cflags_cc = [ | ||
"-std=gnu++11", | ||
"-fno-rtti", | ||
"-fno-exceptions", | ||
"-Wno-narrowing", | ||
"-Wnon-virtual-dtor", | ||
] | ||
|
||
ldflags = [ | ||
"-pthread", | ||
"-maix64", | ||
"-Wl,-bbigtoc", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
"""Get Byteorder of host architecture""" | ||
|
||
|
||
import sys | ||
|
||
print sys.byteorder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# This header file defines the "host_byteorder" variable. | ||
# Not that this is currently used only for building v8. | ||
# The chromium code generally assumes little-endianness. | ||
declare_args() { | ||
host_byteorder = "undefined" | ||
} | ||
|
||
# Detect host byteorder | ||
# ppc64 can be either BE or LE | ||
if (host_cpu == "ppc64") { | ||
if (current_os == "aix") { | ||
host_byteorder = "big" | ||
} else { | ||
# Only use the script when absolutely necessary | ||
host_byteorder = | ||
exec_script("//build/config/get_host_byteorder.py", [], "trim string") | ||
} | ||
} else if (host_cpu == "ppc" || host_cpu == "s390" || host_cpu == "s390x" || | ||
host_cpu == "mips" || host_cpu == "mips64") { | ||
host_byteorder = "big" | ||
} else { | ||
host_byteorder = "little" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2017 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import("//build/toolchain/gcc_toolchain.gni") | ||
|
||
gcc_toolchain("ppc64") { | ||
cc = "gcc" | ||
cxx = "g++" | ||
|
||
readelf = "readelf" | ||
nm = "nm" | ||
ar = "ar" | ||
ld = cxx | ||
|
||
toolchain_args = { | ||
current_cpu = "ppc64" | ||
current_os = "aix" | ||
is_clang = false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.