Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 490516 Details for
Bug 628888
dev-lang/rust-1.19.0 fails to build when CFLAGS contains any flag not supported by C++ compiler
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
rust-1.19.0-CXXFLAGS.patch
rust-1.19.0-CXXFLAGS.patch (text/plain), 1.99 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2017-08-25 08:28:23 UTC
(
hide
)
Description:
rust-1.19.0-CXXFLAGS.patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2017-08-25 08:28:23 UTC
Size:
1.99 KB
patch
obsolete
>--- /src/bootstrap/lib.rs >+++ /src/bootstrap/lib.rs >@@ -863,6 +863,33 @@ > } > } > >+ /// Returns a list of flags to pass to the C++ compiler for the target >+ /// specified. >+ fn cxxflags(&self, target: &str) -> Vec<String> { >+ // Filter out -O and /O (the optimization flags) that we picked up from >+ // gcc-rs because the build scripts will determine that for themselves. >+ let mut base = self.cxx[target].args().iter() >+ .map(|s| s.to_string_lossy().into_owned()) >+ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O")) >+ .collect::<Vec<_>>(); >+ >+ // If we're compiling on macOS then we add a few unconditional flags >+ // indicating that we want libc++ (more filled out than libstdc++) and >+ // we want to compile for 10.7. This way we can ensure that >+ // LLVM/jemalloc/etc are all properly compiled. >+ if target.contains("apple-darwin") { >+ base.push("-stdlib=libc++".into()); >+ } >+ >+ // Work around an apparently bad MinGW / GCC optimization, >+ // See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html >+ // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78936 >+ if target == "i686-pc-windows-gnu" { >+ base.push("-fno-omit-frame-pointer".into()); >+ } >+ return base >+ } >+ > /// Returns flags to pass to the compiler to generate code for `target`. > fn rustc_flags(&self, target: &str) -> Vec<String> { > // New flags should be added here with great caution! >--- /src/bootstrap/native.rs >+++ /src/bootstrap/native.rs >@@ -178,7 +178,7 @@ > > cfg.build_arg("-j").build_arg(build.jobs().to_string()); > cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" ")); >- cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" ")); >+ cfg.define("CMAKE_CXX_FLAGS", build.cxxflags(target).join(" ")); > }; > > configure_compilers(&mut cfg);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 628888
:
490514
| 490516