< prev index next >
buildSrc/linux.gradle
Print this page
@@ -41,10 +41,11 @@
LINUX.library = { name -> return "lib${name}.so" as String }
// A set of common parameters to use for both compiling and linking
def commonFlags = [
"-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags
+ "-fstack-protector",
"-Wextra", "-Wall", "-Wformat-security", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags
if (!IS_64) {
commonFlags += "-m32"
}
@@ -55,10 +56,11 @@
"-ffunction-sections", "-fdata-sections",
IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
def ccFlagsGTK3 = ccFlags
//ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
def linkFlags = ["-static-libgcc", "-static-libstdc++", "-shared", commonFlags,
+ "-z", "relro",
"-Wl,--gc-sections"].flatten()
if (IS_DEBUG_NATIVE) {
linkFlags += "-g"
}
< prev index next >