Bug#801311: gradle hard-codes -m32 / -m64 for building binaries

Matthias Klose doko at ubuntu.com
Thu Oct 8 13:38:59 UTC 2015


Package: src:gradle
Version: 2.5-1
Severity: important

seen when building openjfx on armhf; the openjfx build.gradle file uses:

         task compileLinuxLauncher(type: CCTask, group: "Build") {
             description = "Compiles native sources for the application 
co-bundle launcher"
             matches = ".*\\.cpp"
             source file("src/main/native/launcher/linux")
             params.addAll(LINUX.launcher.ccFlags)
             compiler = LINUX.launcher.compiler
             output(file("$buildDir/native/linuxlauncher/launcherobj"))
         }
         task linkLinuxLauncher(type: LinkTask, dependsOn: compileLinuxLauncher, 
group: "Build") {
             description = "Links native dynamic library for the application 
co-bundle launcher"
             objectDir = file("$buildDir/native/linuxlauncher/launcherobj")
             linkParams.addAll(LINUX.launcher.linkFlags)
             linker = LINUX.launcher.linker
             lib = 
file("$buildDir/classes/main/com/oracle/tools/packager/linux/JavaAppLauncher")
         }

looking into gradle ...

$ grep -rl -- '-m[36][24]' .
./subprojects/docs/src/samples/native-binaries/target-platforms/build.gradle
./subprojects/platform-native/src/integTest/groovy/org/gradle/nativeplatform/NativePlatformSamplesIntegrationTest.groovy
./subprojects/platform-native/src/integTest/groovy/org/gradle/nativeplatform/toolchain/GccToolChainCustomisationIntegrationTest.groovy
./subprojects/platform-native/src/test/groovy/org/gradle/nativeplatform/toolchain/internal/gcc/AbstractGccCompatibleToolChainTest.groovy
./subprojects/platform-native/src/test/groovy/org/gradle/nativeplatform/toolchain/internal/gcc/GccOptionsFileArgsWriterTest.groovy
./subprojects/platform-native/src/main/groovy/org/gradle/nativeplatform/toolchain/internal/gcc/AbstractGccCompatibleToolChain.java
./subprojects/platform-native/src/main/groovy/org/gradle/nativeplatform/toolchain/internal/gcc/GccOptionsFileArgsWriter.java

subprojects/docs/src/samples/native-binaries/target-platforms/build.gradle:

     toolChains {
         gcc(Gcc) {
             target("arm"){
                 cppCompiler.withArguments { args ->
                     args << "-m32"
                 }
                 linker.withArguments { args ->
                     args << "-m32"
                 }
             }
             target("sparc")
         }
     }

I have no idea if every platform has to be mentioned, isn't there a default?

All this -m32/-m64 bogus should be removed, I think we don't care about "cross 
compiling".

Even for the Intel architectures this will break building things on x32.



More information about the pkg-java-maintainers mailing list