aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-08-19 16:30:44 -0700
committerTobias Bosch <tbosch@google.com>2019-08-20 15:54:19 +0000
commit36c19215f13c983c2ae0096ed9170fd064744622 (patch)
treefd90fb7bc384a058ef6974487c1066bfa074af75 /compiler_wrapper
parent4529f292ce64293d4650cc2be7caaa7e061196f5 (diff)
downloadtoolchain-utils-36c19215f13c983c2ae0096ed9170fd064744622.tar.gz
Correctly parse eabi compiler names.
BUG=chromium:773875 TEST=unit tests, compile cross-armv7m-cros-eabi/newlib Change-Id: Ia98442a69b01cff87c52b6ac84dc39c47d5e998e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1760465 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper')
-rw-r--r--compiler_wrapper/command.go38
-rw-r--r--compiler_wrapper/cros_hardened_config_test.go6
-rw-r--r--compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json6
-rw-r--r--compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json6
-rw-r--r--compiler_wrapper/testdata/cros_gcc_host_golden/gcc_maincc_target_specific.json12
-rw-r--r--compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json24
-rw-r--r--compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json24
-rw-r--r--compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json24
-rw-r--r--compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json24
-rw-r--r--compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json24
-rw-r--r--compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json24
-rw-r--r--compiler_wrapper/testutil_test.go6
12 files changed, 115 insertions, 103 deletions
diff --git a/compiler_wrapper/command.go b/compiler_wrapper/command.go
index ade12ede..df424ad8 100644
--- a/compiler_wrapper/command.go
+++ b/compiler_wrapper/command.go
@@ -63,18 +63,38 @@ func getAbsCmdPath(env env, cmd *command) string {
func newCommandBuilder(env env, cfg *config, cmd *command) (*commandBuilder, error) {
basename := filepath.Base(cmd.Path)
nameParts := strings.Split(basename, "-")
- if len(nameParts) != 5 {
- return nil, newErrorwithSourceLocf("expected 5 parts in the compiler name. Actual: %s", basename)
+ target := builderTarget{}
+ if len(nameParts) == 4 {
+ // E.g. armv7m-cros-eabi-gcc
+ target = builderTarget{
+ arch: nameParts[0],
+ vendor: nameParts[1],
+ sys: "",
+ abi: nameParts[2],
+ compiler: nameParts[3],
+ }
+ } else if len(nameParts) == 5 {
+ // E.g. x86_64-cros-linux-gnu-gcc
+ target = builderTarget{
+ arch: nameParts[0],
+ vendor: nameParts[1],
+ sys: nameParts[2],
+ abi: nameParts[3],
+ compiler: nameParts[4],
+ }
+ } else {
+ return nil, newErrorwithSourceLocf("unexpected compiler name pattern. Actual: %s", basename)
}
- compiler := nameParts[4]
+ target.target = basename[:strings.LastIndex(basename, "-")]
var compilerType compilerType
switch {
- case strings.HasPrefix(compiler, "clang"):
+ case strings.HasPrefix(target.compiler, "clang"):
compilerType = clangType
default:
compilerType = gccType
}
+ target.compilerType = compilerType
absWrapperPath, err := getAbsWrapperPath(env, cmd)
if err != nil {
return nil, err
@@ -87,15 +107,7 @@ func newCommandBuilder(env env, cfg *config, cmd *command) (*commandBuilder, err
cfg: cfg,
rootPath: rootPath,
absWrapperPath: absWrapperPath,
- target: builderTarget{
- target: strings.Join(nameParts[:4], "-"),
- arch: nameParts[0],
- vendor: nameParts[1],
- sys: nameParts[2],
- abi: nameParts[3],
- compiler: compiler,
- compilerType: compilerType,
- },
+ target: target,
}, nil
}
diff --git a/compiler_wrapper/cros_hardened_config_test.go b/compiler_wrapper/cros_hardened_config_test.go
index f667595e..9374a883 100644
--- a/compiler_wrapper/cros_hardened_config_test.go
+++ b/compiler_wrapper/cros_hardened_config_test.go
@@ -102,7 +102,7 @@ func createGoldenInputsForAllTargets(compiler string, args ...string) goldenFile
Cmds: okResults,
},
{
- WrapperCmd: newGoldenCmd("./x86_64-cros-linux-eabi-"+compiler, args...),
+ WrapperCmd: newGoldenCmd("./x86_64-cros-eabi-"+compiler, args...),
Cmds: okResults,
},
{
@@ -114,7 +114,7 @@ func createGoldenInputsForAllTargets(compiler string, args ...string) goldenFile
Cmds: okResults,
},
{
- WrapperCmd: newGoldenCmd("./armv7m-cros-linux-eabi-"+compiler, args...),
+ WrapperCmd: newGoldenCmd("./armv7m-cros-eabi-"+compiler, args...),
Cmds: okResults,
},
{
@@ -126,7 +126,7 @@ func createGoldenInputsForAllTargets(compiler string, args ...string) goldenFile
Cmds: okResults,
},
{
- WrapperCmd: newGoldenCmd("./armv8m-cros-linux-eabi-"+compiler, args...),
+ WrapperCmd: newGoldenCmd("./armv8m-cros-eabi-"+compiler, args...),
Cmds: okResults,
},
{
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json
index 74f7658d..0741b352 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_ftrapv_maincc_target_specific.json
@@ -33,7 +33,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-clang",
+ "path": "./x86_64-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -123,7 +123,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-clang",
+ "path": "./armv7m-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -213,7 +213,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-clang",
+ "path": "./armv8m-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
diff --git a/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json
index 4f908037..363b610a 100644
--- a/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_clang_host_golden/clang_maincc_target_specific.json
@@ -32,7 +32,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-clang",
+ "path": "./x86_64-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -119,7 +119,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-clang",
+ "path": "./armv7m-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -206,7 +206,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-clang",
+ "path": "./armv8m-cros-eabi-clang",
"args": [
"main.cc"
]
diff --git a/compiler_wrapper/testdata/cros_gcc_host_golden/gcc_maincc_target_specific.json b/compiler_wrapper/testdata/cros_gcc_host_golden/gcc_maincc_target_specific.json
index c0f9ecdb..6c88c344 100644
--- a/compiler_wrapper/testdata/cros_gcc_host_golden/gcc_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_gcc_host_golden/gcc_maincc_target_specific.json
@@ -27,7 +27,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-gcc",
+ "path": "./x86_64-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -36,7 +36,7 @@
"cmds": [
{
"cmd": {
- "path": "./x86_64-cros-linux-eabi-gcc.real",
+ "path": "./x86_64-cros-eabi-gcc.real",
"args": [
"-Wno-maybe-uninitialized",
"-Wno-unused-local-typedefs",
@@ -99,7 +99,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-gcc",
+ "path": "./armv7m-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -108,7 +108,7 @@
"cmds": [
{
"cmd": {
- "path": "./armv7m-cros-linux-eabi-gcc.real",
+ "path": "./armv7m-cros-eabi-gcc.real",
"args": [
"-Wno-maybe-uninitialized",
"-Wno-unused-local-typedefs",
@@ -171,7 +171,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-gcc",
+ "path": "./armv8m-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -180,7 +180,7 @@
"cmds": [
{
"cmd": {
- "path": "./armv8m-cros-linux-eabi-gcc.real",
+ "path": "./armv8m-cros-eabi-gcc.real",
"args": [
"-Wno-maybe-uninitialized",
"-Wno-unused-local-typedefs",
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json
index a6fa699f..e30b4613 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_ftrapv_maincc_target_specific.json
@@ -50,7 +50,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-clang",
+ "path": "./x86_64-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -63,7 +63,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/x86_64-cros-linux-eabi",
+ "--sysroot=/usr/x86_64-cros-eabi",
"-Qunused-arguments",
"-grecord-gcc-switches",
"-fno-addrsig",
@@ -81,10 +81,10 @@
"main.cc",
"-B../../bin",
"-target",
- "x86_64-cros-linux-eabi"
+ "x86_64-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/x86_64-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/x86_64-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -191,7 +191,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-clang",
+ "path": "./armv7m-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -204,7 +204,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv7m-cros-linux-eabi",
+ "--sysroot=/usr/armv7m-cros-eabi",
"-Qunused-arguments",
"-grecord-gcc-switches",
"-fno-addrsig",
@@ -222,10 +222,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv7m-cros-linux-eabi"
+ "armv7m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv7m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv7m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -332,7 +332,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-clang",
+ "path": "./armv8m-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -345,7 +345,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv8m-cros-linux-eabi",
+ "--sysroot=/usr/armv8m-cros-eabi",
"-Qunused-arguments",
"-grecord-gcc-switches",
"-fno-addrsig",
@@ -363,10 +363,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv8m-cros-linux-eabi"
+ "armv8m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv8m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv8m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json
index 3398782e..f605630a 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/clang_maincc_target_specific.json
@@ -48,7 +48,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-clang",
+ "path": "./x86_64-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -60,7 +60,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/x86_64-cros-linux-eabi",
+ "--sysroot=/usr/x86_64-cros-eabi",
"-Qunused-arguments",
"-grecord-gcc-switches",
"-fno-addrsig",
@@ -77,10 +77,10 @@
"main.cc",
"-B../../bin",
"-target",
- "x86_64-cros-linux-eabi"
+ "x86_64-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/x86_64-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/x86_64-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -183,7 +183,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-clang",
+ "path": "./armv7m-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -195,7 +195,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv7m-cros-linux-eabi",
+ "--sysroot=/usr/armv7m-cros-eabi",
"-Qunused-arguments",
"-grecord-gcc-switches",
"-fno-addrsig",
@@ -212,10 +212,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv7m-cros-linux-eabi"
+ "armv7m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv7m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv7m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -318,7 +318,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-clang",
+ "path": "./armv8m-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -330,7 +330,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv8m-cros-linux-eabi",
+ "--sysroot=/usr/armv8m-cros-eabi",
"-Qunused-arguments",
"-grecord-gcc-switches",
"-fno-addrsig",
@@ -347,10 +347,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv8m-cros-linux-eabi"
+ "armv8m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv8m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv8m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json b/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json
index 76d38599..a037dd10 100644
--- a/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_hardened_golden/gcc_maincc_target_specific.json
@@ -40,7 +40,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-gcc",
+ "path": "./x86_64-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -51,8 +51,8 @@
"cmd": {
"path": "/usr/bin/ccache",
"args": [
- "./x86_64-cros-linux-eabi-gcc.real",
- "--sysroot=/usr/x86_64-cros-linux-eabi",
+ "./x86_64-cros-eabi-gcc.real",
+ "--sysroot=/usr/x86_64-cros-eabi",
"-fno-reorder-blocks-and-partition",
"-Wno-unused-local-typedefs",
"-Wno-maybe-uninitialized",
@@ -65,7 +65,7 @@
"-mno-movbe"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/x86_64-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/x86_64-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002"
]
@@ -150,7 +150,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-gcc",
+ "path": "./armv7m-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -161,8 +161,8 @@
"cmd": {
"path": "/usr/bin/ccache",
"args": [
- "./armv7m-cros-linux-eabi-gcc.real",
- "--sysroot=/usr/armv7m-cros-linux-eabi",
+ "./armv7m-cros-eabi-gcc.real",
+ "--sysroot=/usr/armv7m-cros-eabi",
"-fno-reorder-blocks-and-partition",
"-Wno-unused-local-typedefs",
"-Wno-maybe-uninitialized",
@@ -174,7 +174,7 @@
"main.cc"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv7m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv7m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002"
]
@@ -258,7 +258,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-gcc",
+ "path": "./armv8m-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -269,8 +269,8 @@
"cmd": {
"path": "/usr/bin/ccache",
"args": [
- "./armv8m-cros-linux-eabi-gcc.real",
- "--sysroot=/usr/armv8m-cros-linux-eabi",
+ "./armv8m-cros-eabi-gcc.real",
+ "--sysroot=/usr/armv8m-cros-eabi",
"-fno-reorder-blocks-and-partition",
"-Wno-unused-local-typedefs",
"-Wno-maybe-uninitialized",
@@ -282,7 +282,7 @@
"main.cc"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv8m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv8m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002"
]
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json
index a90fd6b4..d7b5258d 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_ftrapv_maincc_target_specific.json
@@ -43,7 +43,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-clang",
+ "path": "./x86_64-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -56,7 +56,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/x86_64-cros-linux-eabi",
+ "--sysroot=/usr/x86_64-cros-eabi",
"-Qunused-arguments",
"-Wno-tautological-constant-compare",
"-Wno-tautological-unsigned-enum-zero-compare",
@@ -67,10 +67,10 @@
"main.cc",
"-B../../bin",
"-target",
- "x86_64-cros-linux-eabi"
+ "x86_64-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/x86_64-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/x86_64-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -164,7 +164,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-clang",
+ "path": "./armv7m-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -177,7 +177,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv7m-cros-linux-eabi",
+ "--sysroot=/usr/armv7m-cros-eabi",
"-Qunused-arguments",
"-Wno-tautological-constant-compare",
"-Wno-tautological-unsigned-enum-zero-compare",
@@ -188,10 +188,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv7m-cros-linux-eabi"
+ "armv7m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv7m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv7m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -286,7 +286,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-clang",
+ "path": "./armv8m-cros-eabi-clang",
"args": [
"-ftrapv",
"main.cc"
@@ -299,7 +299,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv8m-cros-linux-eabi",
+ "--sysroot=/usr/armv8m-cros-eabi",
"-Qunused-arguments",
"-Wno-tautological-constant-compare",
"-Wno-tautological-unsigned-enum-zero-compare",
@@ -310,10 +310,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv8m-cros-linux-eabi"
+ "armv8m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv8m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv8m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json
index cc0a2ee9..e78a420a 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/clang_maincc_target_specific.json
@@ -41,7 +41,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-clang",
+ "path": "./x86_64-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -53,7 +53,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/x86_64-cros-linux-eabi",
+ "--sysroot=/usr/x86_64-cros-eabi",
"-Qunused-arguments",
"-Wno-tautological-constant-compare",
"-Wno-tautological-unsigned-enum-zero-compare",
@@ -63,10 +63,10 @@
"main.cc",
"-B../../bin",
"-target",
- "x86_64-cros-linux-eabi"
+ "x86_64-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/x86_64-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/x86_64-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -156,7 +156,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-clang",
+ "path": "./armv7m-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -168,7 +168,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv7m-cros-linux-eabi",
+ "--sysroot=/usr/armv7m-cros-eabi",
"-Qunused-arguments",
"-Wno-tautological-constant-compare",
"-Wno-tautological-unsigned-enum-zero-compare",
@@ -178,10 +178,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv7m-cros-linux-eabi"
+ "armv7m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv7m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv7m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
@@ -272,7 +272,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-clang",
+ "path": "./armv8m-cros-eabi-clang",
"args": [
"main.cc"
]
@@ -284,7 +284,7 @@
"path": "/usr/bin/ccache",
"args": [
"../../usr/bin/clang",
- "--sysroot=/usr/armv8m-cros-linux-eabi",
+ "--sysroot=/usr/armv8m-cros-eabi",
"-Qunused-arguments",
"-Wno-tautological-constant-compare",
"-Wno-tautological-unsigned-enum-zero-compare",
@@ -294,10 +294,10 @@
"main.cc",
"-B../../bin",
"-target",
- "armv8m-cros-linux-eabi"
+ "armv8m-cros-eabi"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv8m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv8m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002",
"CCACHE_CPP2=yes"
diff --git a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json
index ff281966..5efa5ed6 100644
--- a/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json
+++ b/compiler_wrapper/testdata/cros_nonhardened_golden/gcc_maincc_target_specific.json
@@ -36,7 +36,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./x86_64-cros-linux-eabi-gcc",
+ "path": "./x86_64-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -47,8 +47,8 @@
"cmd": {
"path": "/usr/bin/ccache",
"args": [
- "./x86_64-cros-linux-eabi-gcc.real",
- "--sysroot=/usr/x86_64-cros-linux-eabi",
+ "./x86_64-cros-eabi-gcc.real",
+ "--sysroot=/usr/x86_64-cros-eabi",
"-Wno-maybe-uninitialized",
"-Wno-unused-local-typedefs",
"-Wno-deprecated-declarations",
@@ -57,7 +57,7 @@
"-mno-movbe"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/x86_64-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/x86_64-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002"
]
@@ -135,7 +135,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv7m-cros-linux-eabi-gcc",
+ "path": "./armv7m-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -146,8 +146,8 @@
"cmd": {
"path": "/usr/bin/ccache",
"args": [
- "./armv7m-cros-linux-eabi-gcc.real",
- "--sysroot=/usr/armv7m-cros-linux-eabi",
+ "./armv7m-cros-eabi-gcc.real",
+ "--sysroot=/usr/armv7m-cros-eabi",
"-Wno-maybe-uninitialized",
"-Wno-unused-local-typedefs",
"-Wno-deprecated-declarations",
@@ -155,7 +155,7 @@
"main.cc"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv7m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv7m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002"
]
@@ -233,7 +233,7 @@
"wd": "/tmp/stable",
"wrapper": {
"cmd": {
- "path": "./armv8m-cros-linux-eabi-gcc",
+ "path": "./armv8m-cros-eabi-gcc",
"args": [
"main.cc"
]
@@ -244,8 +244,8 @@
"cmd": {
"path": "/usr/bin/ccache",
"args": [
- "./armv8m-cros-linux-eabi-gcc.real",
- "--sysroot=/usr/armv8m-cros-linux-eabi",
+ "./armv8m-cros-eabi-gcc.real",
+ "--sysroot=/usr/armv8m-cros-eabi",
"-Wno-maybe-uninitialized",
"-Wno-unused-local-typedefs",
"-Wno-deprecated-declarations",
@@ -253,7 +253,7 @@
"main.cc"
],
"env_updates": [
- "CCACHE_BASEDIR=/usr/armv8m-cros-linux-eabi",
+ "CCACHE_BASEDIR=/usr/armv8m-cros-eabi",
"CCACHE_DIR=/var/cache/distfiles/ccache",
"CCACHE_UMASK=002"
]
diff --git a/compiler_wrapper/testutil_test.go b/compiler_wrapper/testutil_test.go
index 0dbf817e..778c4c26 100644
--- a/compiler_wrapper/testutil_test.go
+++ b/compiler_wrapper/testutil_test.go
@@ -23,11 +23,11 @@ var crosRootDirFlag = flag.String("crosroot", "", "root dir of the chrome os too
const mainCc = "main.cc"
const clangX86_64 = "./x86_64-cros-linux-gnu-clang"
const gccX86_64 = "./x86_64-cros-linux-gnu-gcc"
-const gccX86_64Eabi = "./x86_64-cros-linux-eabi-gcc"
+const gccX86_64Eabi = "./x86_64-cros-eabi-gcc"
const gccArmV7 = "./armv7m-cros-linux-gnu-gcc"
-const gccArmV7Eabi = "./armv7m-cros-linux-eabi-gcc"
+const gccArmV7Eabi = "./armv7m-cros-eabi-gcc"
const gccArmV8 = "./armv8m-cros-linux-gnu-gcc"
-const gccArmV8Eabi = "./armv8m-cros-linux-eabi-gcc"
+const gccArmV8Eabi = "./armv8m-cros-eabi-gcc"
type testContext struct {
t *testing.T