summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/soong/files/soong-no-sysroot.patch')
-rw-r--r--dev-util/soong/files/soong-no-sysroot.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/dev-util/soong/files/soong-no-sysroot.patch b/dev-util/soong/files/soong-no-sysroot.patch
new file mode 100644
index 0000000..6b8a5d2
--- /dev/null
+++ b/dev-util/soong/files/soong-no-sysroot.patch
@@ -0,0 +1,73 @@
+Index: soong-9999/build/soong/cc/compiler.go
+===================================================================
+--- soong-9999.orig/build/soong/cc/compiler.go
++++ soong-9999/build/soong/cc/compiler.go
+@@ -301,11 +301,10 @@ func (compiler *baseCompiler) compilerFl
+ flags.LdFlags = config.ClangFilterUnknownCflags(flags.LdFlags)
+
+ target := "-target " + tc.ClangTriple()
+- gccPrefix := "-B" + config.ToolPath(tc)
+
+- flags.CFlags = append(flags.CFlags, target, gccPrefix)
+- flags.AsFlags = append(flags.AsFlags, target, gccPrefix)
+- flags.LdFlags = append(flags.LdFlags, target, gccPrefix)
++ flags.CFlags = append(flags.CFlags, target)
++ flags.AsFlags = append(flags.AsFlags, target)
++ flags.LdFlags = append(flags.LdFlags, target)
+ }
+
+ hod := "Host"
+Index: soong-9999/build/soong/cc/config/x86_linux_host.go
+===================================================================
+--- soong-9999.orig/build/soong/cc/config/x86_linux_host.go
++++ soong-9999/build/soong/cc/config/x86_linux_host.go
+@@ -77,39 +77,25 @@ var (
+ }
+
+ linuxClangCflags = append(ClangFilterUnknownCflags(linuxCflags), []string{
+- "--gcc-toolchain=${LinuxGccRoot}",
+- "--sysroot ${LinuxGccRoot}/sysroot",
+ "-fstack-protector-strong",
+ }...)
+
+ linuxClangLdflags = append(ClangFilterUnknownCflags(linuxLdflags), []string{
+- "--gcc-toolchain=${LinuxGccRoot}",
+- "--sysroot ${LinuxGccRoot}/sysroot",
+ }...)
+
+ linuxX86ClangLdflags = append(ClangFilterUnknownCflags(linuxX86Ldflags), []string{
+- "-B${LinuxGccRoot}/lib/gcc/${LinuxGccTriple}/${LinuxGccVersion}/32",
+- "-L${LinuxGccRoot}/lib/gcc/${LinuxGccTriple}/${LinuxGccVersion}/32",
+- "-L${LinuxGccRoot}/${LinuxGccTriple}/lib32",
+ }...)
+
+ linuxX8664ClangLdflags = append(ClangFilterUnknownCflags(linuxX8664Ldflags), []string{
+- "-B${LinuxGccRoot}/lib/gcc/${LinuxGccTriple}/${LinuxGccVersion}",
+- "-L${LinuxGccRoot}/lib/gcc/${LinuxGccTriple}/${LinuxGccVersion}",
+- "-L${LinuxGccRoot}/${LinuxGccTriple}/lib64",
+ }...)
+
+ linuxClangCppflags = []string{
+- "-isystem ${LinuxGccRoot}/${LinuxGccTriple}/include/c++/${LinuxGccVersion}",
+- "-isystem ${LinuxGccRoot}/${LinuxGccTriple}/include/c++/${LinuxGccVersion}/backward",
+ }
+
+ linuxX86ClangCppflags = []string{
+- "-isystem ${LinuxGccRoot}/${LinuxGccTriple}/include/c++/${LinuxGccVersion}/${LinuxGccTriple}/32",
+ }
+
+ linuxX8664ClangCppflags = []string{
+- "-isystem ${LinuxGccRoot}/${LinuxGccTriple}/include/c++/${LinuxGccVersion}/${LinuxGccTriple}",
+ }
+
+ linuxAvailableLibraries = addPrefix([]string{
+@@ -134,9 +120,6 @@ const (
+ func init() {
+ pctx.StaticVariable("LinuxGccVersion", linuxGccVersion)
+
+- pctx.SourcePathVariable("LinuxGccRoot",
+- "prebuilts/gcc/${HostPrebuiltTag}/host/x86_64-linux-glibc2.15-${LinuxGccVersion}")
+-
+ pctx.StaticVariable("LinuxGccTriple", "x86_64-linux")
+
+ pctx.StaticVariable("LinuxCflags", strings.Join(linuxCflags, " "))