Linux cross compiling, linking & x86_64 arch standardization.
This commit is contained in:
parent
a132e03b88
commit
64536f95c0
@ -1,9 +0,0 @@
|
|||||||
FROM i386/debian:stable-slim
|
|
||||||
ENTRYPOINT ["linux32", "--"]
|
|
||||||
|
|
||||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
|
|
||||||
RUN mkdir -p /usr/share/man/man1
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y default-jdk-headless git-core bash libtool automake autoconf make g++
|
|
||||||
RUN git clone --depth=3 $(: --shallow-submodules) --recurse-submodules --branch rewrite https://gitlab.com/MasterPassword/MasterPassword.git /mpw
|
|
||||||
RUN cd /mpw && git log -1 && ./gradlew -i clean build
|
|
@ -16,7 +16,7 @@ artifacts {
|
|||||||
components.withType( ComponentWithRuntimeFile ) {
|
components.withType( ComponentWithRuntimeFile ) {
|
||||||
if (optimized)
|
if (optimized)
|
||||||
from runtimeFile, {
|
from runtimeFile, {
|
||||||
into targetMachine.getOperatingSystemFamily().getName() + '/' + targetMachine.getArchitecture().getName()
|
into targetMachine.getOperatingSystemFamily().getName() + '/' + targetMachine.getArchitecture().getName().replace('-', '_')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,31 +54,30 @@ library {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
components.withType( CppComponent ) {
|
binaries.configureEach( CppBinary ) {
|
||||||
binaries.whenElementFinalized {
|
dependencies {
|
||||||
project.dependencies {
|
def arch = targetMachine.getArchitecture().getName().replace('-', '_')
|
||||||
def system = targetMachine.getOperatingSystemFamily().getName()
|
def system = targetMachine.getOperatingSystemFamily().getName()
|
||||||
|
|
||||||
// libsodium
|
// libsodium
|
||||||
archive.dependsOn project.tasks.maybeCreate( "build_libsodium-${system}", Exec ).configure {
|
archive.dependsOn project.tasks.maybeCreate( "build_libsodium-${system}", Exec ).configure {
|
||||||
commandLine 'bash', "$rootDir/lib/bin/build_libsodium-${system}"
|
commandLine 'bash', "$rootDir/lib/bin/build_libsodium-${system}"
|
||||||
privateHeaders.from "$rootDir/lib/libsodium/build-${system}~/out/include"
|
privateHeaders.from "$rootDir/lib/libsodium/build-${system}~/out/include"
|
||||||
add( linkLibraries.name, fileTree( "$rootDir/lib/libsodium/build-${system}~/out/lib" ) )
|
implementation fileTree( "$rootDir/lib/libsodium/build-${system}~/out/lib/${arch}" )
|
||||||
}
|
|
||||||
clean.dependsOn project.tasks.maybeCreate( "clean_libsodium-${system}", Exec ).configure {
|
|
||||||
commandLine 'bash', "$rootDir/lib/bin/build_libsodium-${system}", 'clean'
|
|
||||||
}
|
|
||||||
|
|
||||||
// libjson-c
|
|
||||||
/*archive.dependsOn project.tasks.maybeCreate( "build_libjson-c-${system}", Exec ).configure {
|
|
||||||
commandLine 'bash', "$rootDir/lib/bin/build_libjson-c-${system}"
|
|
||||||
privateHeaders.from "$rootDir/lib/libjson-c/build-${system}~/out/include"
|
|
||||||
add( linkLibraries.name, fileTree( "$rootDir/lib/libjson-c/build-${system}~/out/lib" ) )
|
|
||||||
}
|
|
||||||
clean.dependsOn project.tasks.maybeCreate( "clean_libjson-c-${system}", Exec ).configure {
|
|
||||||
commandLine 'bash', "$rootDir/lib/bin/build_libjson-c-${system}", 'clean'
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
clean.dependsOn project.tasks.maybeCreate( "clean_libsodium-${system}", Exec ).configure {
|
||||||
|
commandLine 'bash', "$rootDir/lib/bin/build_libsodium-${system}", 'clean'
|
||||||
|
}
|
||||||
|
|
||||||
|
// libjson-c
|
||||||
|
/*archive.dependsOn project.tasks.maybeCreate( "build_libjson-c-${system}", Exec ).configure {
|
||||||
|
commandLine 'bash', "$rootDir/lib/bin/build_libjson-c-${system}"
|
||||||
|
privateHeaders.from "$rootDir/lib/libjson-c/build-${system}~/out/include"
|
||||||
|
add( linkLibraries.name, fileTree( "$rootDir/lib/libjson-c/build-${system}~/out/lib" ) )
|
||||||
|
}
|
||||||
|
clean.dependsOn project.tasks.maybeCreate( "clean_libjson-c-${system}", Exec ).configure {
|
||||||
|
commandLine 'bash', "$rootDir/lib/bin/build_libjson-c-${system}", 'clean'
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -201,11 +201,5 @@ public final class Native {
|
|||||||
|
|
||||||
return x86;
|
return x86;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return name().replace('_', '-' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user