From c8ffc3c6e0c4dbb396abf29eb59d8d34d5d38748 Mon Sep 17 00:00:00 2001 From: Ryan Osial Date: Fri, 4 Mar 2016 18:34:06 -0500 Subject: [PATCH 1/2] Rework compiler properties to allow overriding the defaults with debug flags --- src/main/java/org/bytedeco/javacpp/tools/Builder.java | 6 +++--- .../bytedeco/javacpp/properties/android-arm.properties | 6 ++++-- .../bytedeco/javacpp/properties/android-arm64.properties | 6 ++++-- .../bytedeco/javacpp/properties/android-x86.properties | 6 ++++-- .../bytedeco/javacpp/properties/android-x86_64.properties | 6 ++++-- .../org/bytedeco/javacpp/properties/generic.properties | 6 ++++-- .../org/bytedeco/javacpp/properties/ios-arm.properties | 6 ++++-- .../org/bytedeco/javacpp/properties/ios-x86.properties | 6 ++++-- .../org/bytedeco/javacpp/properties/linux-arm.properties | 6 ++++-- .../bytedeco/javacpp/properties/linux-arm64.properties | 6 ++++-- .../bytedeco/javacpp/properties/linux-armhf.properties | 6 ++++-- .../bytedeco/javacpp/properties/linux-x86-cuda.properties | 6 ++++-- .../org/bytedeco/javacpp/properties/linux-x86.properties | 8 +++++--- .../javacpp/properties/linux-x86_64-cuda.properties | 6 ++++-- .../bytedeco/javacpp/properties/linux-x86_64.properties | 6 ++++-- .../javacpp/properties/macosx-x86-cuda.properties | 6 ++++-- .../org/bytedeco/javacpp/properties/macosx-x86.properties | 6 ++++-- .../javacpp/properties/macosx-x86_64-cuda.properties | 6 ++++-- .../bytedeco/javacpp/properties/macosx-x86_64.properties | 6 ++++-- .../javacpp/properties/windows-x86-cuda.properties | 6 ++++-- .../javacpp/properties/windows-x86-mingw.properties | 6 ++++-- .../bytedeco/javacpp/properties/windows-x86.properties | 8 +++++--- .../javacpp/properties/windows-x86_64-cuda.properties | 2 ++ .../javacpp/properties/windows-x86_64-mingw.properties | 6 ++++-- .../bytedeco/javacpp/properties/windows-x86_64.properties | 7 +++++-- 25 files changed, 100 insertions(+), 51 deletions(-) diff --git a/src/main/java/org/bytedeco/javacpp/tools/Builder.java b/src/main/java/org/bytedeco/javacpp/tools/Builder.java index 738886b16..a40804961 100644 --- a/src/main/java/org/bytedeco/javacpp/tools/Builder.java +++ b/src/main/java/org/bytedeco/javacpp/tools/Builder.java @@ -195,9 +195,9 @@ int compile(String sourceFilename, String outputFilename, ClassProperties proper command.add(sourceFilename); Collection allOptions = properties.get("platform.compiler.*"); - if (allOptions.isEmpty()) { - allOptions.add("default"); - } + // Always include the default + allOptions.add("default"); + for (String s : allOptions) { if (s == null || s.length() == 0) { continue; diff --git a/src/main/resources/org/bytedeco/javacpp/properties/android-arm.properties b/src/main/resources/org/bytedeco/javacpp/properties/android-arm.properties index fd090ba61..c4f80881b 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/android-arm.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/android-arm.properties @@ -8,10 +8,12 @@ platform.includepath.prefix=-I platform.includepath=sources/cxx-stl/gnu-libstdc++/4.9/include/:sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include/ platform.compiler=toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default=-march=armv5te -mtune=xscale -msoft-float +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-march=armv5te -mtune=xscale -msoft-float -DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 platform.compiler.fastfpu=-march=armv7-a -mfloat-abi=softfp -mfpu=neon -ffast-math -Wl,--fix-cortex-a8 platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,lib/ -DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,lib/ -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath=sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/ platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/android-arm64.properties b/src/main/resources/org/bytedeco/javacpp/properties/android-arm64.properties index a494fa1fd..6737f1244 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/android-arm64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/android-arm64.properties @@ -8,10 +8,12 @@ platform.includepath.prefix=-I platform.includepath=sources/cxx-stl/gnu-libstdc++/4.9/include/:sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/include/ platform.compiler=toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 platform.compiler.fastfpu=-ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,lib/ -DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,lib/ -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath=sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/ platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/android-x86.properties b/src/main/resources/org/bytedeco/javacpp/properties/android-x86.properties index 720e3a180..013e3bdce 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/android-x86.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/android-x86.properties @@ -8,10 +8,12 @@ platform.includepath.prefix=-I platform.includepath=sources/cxx-stl/gnu-libstdc++/4.9/include/:sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include/ platform.compiler=toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math -mfpmath=sse platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,lib/ -DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,lib/ -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath=sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/ platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/android-x86_64.properties b/src/main/resources/org/bytedeco/javacpp/properties/android-x86_64.properties index ec174a583..02960dd42 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/android-x86_64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/android-x86_64.properties @@ -8,10 +8,12 @@ platform.includepath.prefix=-I platform.includepath=sources/cxx-stl/gnu-libstdc++/4.9/include/:sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/include/ platform.compiler=toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/x86_64-linux-android-g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,lib/ -DANDROID -ffunction-sections -funwind-tables -fstack-protector -funswitch-loops -finline-limit=300 -Wall -O3 -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,lib/ -nodefaultlibs -fPIC -shared -Wl,--no-undefined -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath=sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/ platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/generic.properties b/src/main/resources/org/bytedeco/javacpp/properties/generic.properties index 2b10a96e1..958f78153 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/generic.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/generic.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-Wall -O3 platform.compiler.fastfpu=-ffast-math platform.compiler.nodeprecated= -platform.compiler.output=-Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-R platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/ios-arm.properties b/src/main/resources/org/bytedeco/javacpp/properties/ios-arm.properties index d475790d1..8d502b3c8 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/ios-arm.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/ios-arm.properties @@ -8,10 +8,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=clang++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-arch armv6 -arch armv7 -Wall -O3 platform.compiler.fastfpu=-ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-arch armv6 -arch armv7 -Wall -O3 -fPIC -miphoneos-version-min=5.0 -c -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-fPIC -miphoneos-version-min=5.0 -c -o\u0020 platform.linkpath.prefix=-L platform.linkpath= platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/ios-x86.properties b/src/main/resources/org/bytedeco/javacpp/properties/ios-x86.properties index 96bc57339..611b6d6fd 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/ios-x86.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/ios-x86.properties @@ -8,10 +8,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=clang++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-arch i686 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math -mfpmath=sse platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-arch i686 -Wall -O3 -fPIC -mios-simulator-version-min=5.0 -c -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output= -fPIC -mios-simulator-version-min=5.0 -c -o\u0020 platform.linkpath.prefix=-L platform.linkpath= platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties index 6580495fe..43f2df95c 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-arm.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default=-march=armv5te +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-march=armv5te -Wall -O3 platform.compiler.fastfpu=-march=armv7-a -mfpu=neon -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-arm64.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-arm64.properties index 608ff4cd0..e5f66ca01 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-arm64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-arm64.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-Wall -O3 platform.compiler.fastfpu=-ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-armhf.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-armhf.properties index 1467ed184..0a1b06adc 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-armhf.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-armhf.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default=-march=armv7 +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-march=armv7 -Wall -O3 platform.compiler.fastfpu=-march=armv7-a -mfpu=neon -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86-cuda.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86-cuda.properties index 97e4e580f..362c5c8d8 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86-cuda.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86-cuda.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=nvcc platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-Xcompiler=-march=i686,-m32,-Wall,-O3 platform.compiler.fastfpu=-Xcompiler=-msse3,-ffast-math,-mfpmath=sse platform.compiler.nodeprecated=-Xcompiler=-Wno-deprecated-declarations -platform.compiler.output=-Xlinker,-rpath,$ORIGIN/ -Xptxas=-v -Xcompiler=-march=i686,-m32,-Wall,-O3,-fPIC -Xlinker=-s -shared -o\u0020 +platform.compiler.noexceptions=-Xcompiler=-fno-exceptions,-fno-rtti +platform.compiler.output=-Xlinker,-rpath,$ORIGIN/ -Xptxas=-v -Xcompiler=-fPIC -Xlinker=-s -shared -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Xlinker=-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties index c64a97178..785c16581 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= -platform.compiler.fastfpu=-msse3 -ffast-math -mfpmath=sse +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-march=i686 -m32 -Wall -O3 +platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -march=i686 -m32 -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64-cuda.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64-cuda.properties index d4fc0b3c8..9a634083b 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64-cuda.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64-cuda.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=nvcc platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-Xcompiler=-march=x86-64,-m64,-Wall,-O3 platform.compiler.fastfpu=-Xcompiler=-msse3,-ffast-math platform.compiler.nodeprecated=-Xcompiler=-Wno-deprecated-declarations -platform.compiler.output=-Xlinker=-rpath,$ORIGIN/ -Xptxas=-v -Xcompiler=-march=x86-64,-m64,-Wall,-O3,-fPIC -Xlinker=-s -shared -o\u0020 +platform.compiler.noexceptions=-Xcompiler=-fno-exceptions,-fno-rtti +platform.compiler.output=-Xlinker=-rpath,$ORIGIN/ -Xptxas=-v -Xcompiler=-fPIC -Xlinker=-s -shared -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Xlinker=-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties index 563100319..fa1d9174b 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-march=x86-64 -m64 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -march=x86-64 -m64 -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86-cuda.properties b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86-cuda.properties index a74582c94..9e16747b1 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86-cuda.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86-cuda.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=nvcc platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-Xcompiler=-march=i686,-m32,-Wall,-O3 platform.compiler.fastfpu=-Xcompiler=-msse3,-ffast-math,-mfpmath=sse platform.compiler.nodeprecated=-Xcompiler=-Wno-deprecated-declarations -platform.compiler.output=-Xlinker=-rpath,@loader_path/. -Xptxas=-v -Xcompiler=-march=i686,-m32,-Wall,-O3,-fPIC,-undefined,dynamic_lookup -shared -o\u0020 +platform.compiler.noexceptions=-Xcompiler=-fno-exceptions,-fno-rtti +platform.compiler.output=-Xlinker=-rpath,@loader_path/. -Xptxas=-v -Xcompiler=-fPIC,-undefined,dynamic_lookup -shared -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Xlinker=-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86.properties b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86.properties index b3485eb74..02d1d3597 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=clang++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.debug=-fno-omit-frame-pointer -g +platform.compiler.default=-march=i686 -m32 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math -mfpmath=sse platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,@loader_path/. -march=i686 -m32 -Wall -O3 -fPIC -dynamiclib -undefined dynamic_lookup -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,@loader_path/. -fPIC -dynamiclib -undefined dynamic_lookup -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64-cuda.properties b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64-cuda.properties index bb90a7a15..e36a1ade9 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64-cuda.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64-cuda.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=nvcc platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.default=-Xcompiler=-march=x86-64,-m64,-Wall,-O3 +platform.compiler.debug=-fno-omit-frame-pointer -g platform.compiler.fastfpu=-Xcompiler=-msse3,-ffast-math platform.compiler.nodeprecated=-Xcompiler=-Wno-deprecated-declarations -platform.compiler.output=-Xlinker=-rpath,@loader_path/. -Xptxas=-v -Xcompiler=-march=x86-64,-m64,-Wall,-O3,-fPIC,-undefined,dynamic_lookup -shared -o\u0020 +platform.compiler.noexceptions=-Xcompiler=-fno-exceptions,-fno-rtti +platform.compiler.output=-Xlinker=-rpath,@loader_path/. -Xptxas=-v -Xcompiler=-fPIC,-undefined,dynamic_lookup -shared -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Xlinker=-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64.properties b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64.properties index 6cc880f61..a38b3498b 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/macosx-x86_64.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=clang++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.default=-march=x86-64 -m64 -Wall -O3 +platform.compiler.debug=-fno-omit-frame-pointer -g platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-Wl,-rpath,@loader_path/. -march=x86-64 -m64 -Wall -O3 -fPIC -dynamiclib -undefined dynamic_lookup -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-Wl,-rpath,@loader_path/. -fPIC -dynamiclib -undefined dynamic_lookup -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-cuda.properties b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-cuda.properties index 48fc3b7be..ea22e19da 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-cuda.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-cuda.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=nvcc platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.default=-Xcompiler=/W3,/Oi,/O2,/EHsc,/Gy,/GL,/Gm-,/MP4 +platform.compiler.debug=-Xcompiler=/DEBUG,/Zi,/Oy- platform.compiler.fastfpu=-Xcompiler=/arch:SSE2,/fp:fast platform.compiler.nodeprecated=-Xcompiler=/wd4996 -platform.compiler.output=-Xptxas=-v -Xcompiler=/W3,/Oi,/O2,/EHsc,/Gy,/GL,/MD,/LD -shared -o\u0020 +platform.compiler.noexceptions=-Xcompiler=/GR- +platform.compiler.output=-Xptxas=-v -Xcompiler=/MT,/LD -shared -o\u0020 platform.linkpath.prefix=-L platform.linkpath= platform.link.prefix= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-mingw.properties b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-mingw.properties index a0ae5e006..a9a319a43 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-mingw.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86-mingw.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.default=-march=i686 -m32 -Wall -O3 +platform.compiler.debug=-fno-omit-frame-pointer -g platform.compiler.fastfpu=-msse3 -ffast-math -mfpmath=sse platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-D_JNI_IMPLEMENTATION_ -Wl,--kill-at -march=i686 -m32 -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-D_JNI_IMPLEMENTATION_ -Wl,--kill-at -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath= platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86.properties b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86.properties index cd1ba67b2..59da75b92 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=/I platform.includepath= platform.compiler=cl platform.compiler.cpp11= -platform.compiler.default= -platform.compiler.fastfpu=/arch:SSE2 /fp:fast +platform.compiler.debug=/DEBUG /Zi /Oy- +platform.compiler.default=/nologo /W3 /Oi /O2 /EHsc /Gy /GL /Gm- /MP4 +platform.compiler.fastfpu=/fp:fast platform.compiler.nodeprecated=/wd4996 -platform.compiler.output=/W3 /Oi /O2 /EHsc /Gy /GL /MD /LD /link /OUT: +platform.compiler.noexceptions=/GR- +platform.compiler.output=/MT /LD /link /INCREMENTAL:NO /OUT: platform.linkpath.prefix=/LIBPATH: platform.linkpath= platform.link.prefix= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-cuda.properties b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-cuda.properties index 986f93926..180adc50a 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-cuda.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-cuda.properties @@ -6,8 +6,10 @@ platform.includepath= platform.compiler=nvcc platform.compiler.cpp11=-std=c++11 platform.compiler.default= +platform.compiler.debug=-Xcompiler=/DEBUG,/Zi,/Oy- platform.compiler.fastfpu=-Xcompiler=/fp:fast platform.compiler.nodeprecated=-Xcompiler=/wd4996 +platform.compiler.noexceptions=-Xcompiler=/GR- platform.compiler.output=-Xptxas=-v -Xcompiler=/W3,/Oi,/O2,/EHsc,/Gy,/GL,/MD,/LD -shared -o\u0020 platform.linkpath.prefix=-L platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-mingw.properties b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-mingw.properties index 19330dbe0..cdf94f70e 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-mingw.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64-mingw.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=-I platform.includepath= platform.compiler=g++ platform.compiler.cpp11=-std=c++11 -platform.compiler.default= +platform.compiler.default=-march=x86-64 -m64 -Wall -O3 +platform.compiler.debug=-fno-omit-frame-pointer -g platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations -platform.compiler.output=-D_JNI_IMPLEMENTATION_ -Wl,--kill-at -march=x86-64 -m64 -Wall -O3 -fPIC -shared -s -o\u0020 +platform.compiler.noexceptions=-fno-exceptions -fno-rtti +platform.compiler.output=-D_JNI_IMPLEMENTATION_ -Wl,--kill-at -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath= platform.link.prefix=-l diff --git a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64.properties b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64.properties index c4b7d1f4d..242eaba03 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/windows-x86_64.properties @@ -5,10 +5,12 @@ platform.includepath.prefix=/I platform.includepath= platform.compiler=cl platform.compiler.cpp11= -platform.compiler.default= +platform.compiler.debug=/DEBUG /Zi /Oy- +platform.compiler.default=/nologo /W3 /Oi /O2 /EHsc /Gy /GL /Gm- /MP4 platform.compiler.fastfpu=/fp:fast platform.compiler.nodeprecated=/wd4996 -platform.compiler.output=/W3 /Oi /O2 /EHsc /Gy /GL /MD /LD /link /OUT: +platform.compiler.noexceptions=/GR- +platform.compiler.output=/MT /LD /link /INCREMENTAL:NO /OUT: platform.linkpath.prefix=/LIBPATH: platform.linkpath= platform.link.prefix= @@ -16,3 +18,4 @@ platform.link.suffix=.lib platform.link= platform.library.prefix= platform.library.suffix=.dll + From 51688f46b7a3156db1a0d50a4898ec61cb2135b6 Mon Sep 17 00:00:00 2001 From: Ryan Osial Date: Fri, 11 Mar 2016 14:40:38 -0500 Subject: [PATCH 2/2] Add noexec flag to jni libraries. JVM complained with "Java HotSpot(TM) Server VM warning: You have loaded library XXX which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'" --- .../org/bytedeco/javacpp/properties/linux-x86.properties | 2 +- .../org/bytedeco/javacpp/properties/linux-x86_64.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties index 785c16581..e05bd7b20 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86.properties @@ -10,7 +10,7 @@ platform.compiler.default=-march=i686 -m32 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations platform.compiler.noexceptions=-fno-exceptions -fno-rtti -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -Wl,-z,noexecstack -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath= diff --git a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties index fa1d9174b..80ef2c4c5 100644 --- a/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties +++ b/src/main/resources/org/bytedeco/javacpp/properties/linux-x86_64.properties @@ -10,7 +10,7 @@ platform.compiler.default=-march=x86-64 -m64 -Wall -O3 platform.compiler.fastfpu=-msse3 -ffast-math platform.compiler.nodeprecated=-Wno-deprecated-declarations platform.compiler.noexceptions=-fno-exceptions -fno-rtti -platform.compiler.output=-Wl,-rpath,$ORIGIN/ -fPIC -shared -s -o\u0020 +platform.compiler.output=-Wl,-rpath,$ORIGIN/ -Wl,-z,noexecstack -fPIC -shared -s -o\u0020 platform.linkpath.prefix=-L platform.linkpath.prefix2=-Wl,-rpath, platform.linkpath=