mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-02-07 00:47:39 -08:00
I don't even know where to start with this, so I'll keep it brief before
I pop several veins.
* Filter LTO (bundled gstreamer breaks).
* Waste several hours debugging broken arg handling, despite inventing a DSL
for the build system, making the same errors as CMake. Most of the build
failure bugs linked are actually because of whitespace _somewhere_ within
{C,CXX,LD}FLAGS. Strip it.
* Respect AR, CC, CXX.
* Various Modern C fixes from Fedora (and are upstream).
Bug: https://bugs.gentoo.org/713488
Bug: https://bugs.gentoo.org/857942
Closes: https://bugs.gentoo.org/715092
Closes: https://bugs.gentoo.org/719484
Closes: https://bugs.gentoo.org/799227
Closes: https://bugs.gentoo.org/915727
Closes: https://bugs.gentoo.org/919413
Signed-off-by: Sam James <sam@gentoo.org>
30 lines
1016 B
Diff
30 lines
1016 B
Diff
Without this, you'll get bizarre errors where linking fails because it looks for
|
|
a literal "" arg.
|
|
|
|
https://bugs.gentoo.org/715092
|
|
https://bugs.gentoo.org/719484
|
|
https://bugs.gentoo.org/799227
|
|
https://bugs.gentoo.org/915727
|
|
--- a/buildSrc/linux.gradle
|
|
+++ b/buildSrc/linux.gradle
|
|
@@ -47,7 +47,8 @@ def commonFlags = [
|
|
"-Wno-error=cast-function-type",
|
|
"-Wextra", "-Wall", "-Wformat-security", "-Wno-unused", "-Wno-parentheses", "-Werror=trampolines"] // warning flags
|
|
|
|
-commonFlags.addAll(System.getenv("CFLAGS").trim().split(" "))
|
|
+commonFlags.addAll(System.getenv("CFLAGS").strip().split(" "))
|
|
+commonFlags.removeAll([""])
|
|
|
|
if (!IS_64) {
|
|
commonFlags += "-m32"
|
|
@@ -75,7 +76,8 @@ def staticLinkFlags = [].flatten()
|
|
|
|
def linkFlags = IS_STATIC_BUILD ? staticLinkFlags : dynamicLinkFlags;
|
|
|
|
-linkFlags.addAll(System.getenv("LDFLAGS").trim().split(" "))
|
|
+linkFlags.addAll(System.getenv("LDFLAGS").strip().split(" "))
|
|
+linkFlags.removeAll([""])
|
|
|
|
if (IS_DEBUG_NATIVE) {
|
|
linkFlags += "-g"
|