diff options
author | Sven Gothel <[email protected]> | 2015-07-14 18:28:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-07-14 18:28:29 +0200 |
commit | f7c50fca34df0b5d393ffab0da09bce19ddfba64 (patch) | |
tree | 5a8031dd5cb9d346e37e8b7e6554e5aa11b19bc1 /make/scripts/make.jocl.all.macosx.sh | |
parent | 263bc4eba018a78f76dcc311c55372697d592627 (diff) |
Include Khronos derived glcorearb.h before cl_gl.h, avoiding typedef mismatch w/ APPLE's GL
LLVM's clang reports a typedef mismatch of GLintptr and GLsizeiptr
between the Khronos derived glcorearb.h (from JOGL) and APPLE's gltypes.h when producing 32bit builds.
+++
In file included from /usr/local/projects/jogamp/jocl/build-macosx-java6/gensrc/native/jocl/CLAbstractImpl_JNI.c:15:
/usr/local/projects/jogamp/jogl/make/stub_includes/opengl/GL/glcorearb.h:604:19: error: typedef redefinition with different types
('ptrdiff_t' (aka 'int') vs 'intptr_t' (aka 'long'))
typedef ptrdiff_t GLintptr;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:51:18: note:
previous definition is here
typedef intptr_t GLintptr;
+++
I.e. Khronos uses ptrdiff_t (aka 'int' on 32bit), where APPLE uses intptr_t (aka 'long' on 32bit).
On OSX 32bit both ('int' and 'long') have the same sizeof value, i.e. 4 bytes,
see below, hence the ABI is compatible!
However, clang produces a typedef mismatch.
Fix includes the Khronos derived (JOGL) glcorearb.h before cl_gl.h,
hence favors the former 'canonical' definition.
+++
OSX 10.10 32bit:
sizeof int: 4
sizeof long: 4
sizeof long long: 8
sizeof intptr_t: 4
sizeof uintptr_t: 4
sizeof ptrdiff_t: 4
sizeof size_t: 4
sizeof float: 4
sizeof double: 8
sizeof long double: 16
OSX 10.10 64bit:
sizeof int: 4
sizeof long: 8
sizeof long long: 8
sizeof intptr_t: 8
sizeof uintptr_t: 8
sizeof ptrdiff_t: 8
sizeof size_t: 8
sizeof float: 4
sizeof double: 8
sizeof long double: 16
Diffstat (limited to 'make/scripts/make.jocl.all.macosx.sh')
-rwxr-xr-x | make/scripts/make.jocl.all.macosx.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/make/scripts/make.jocl.all.macosx.sh b/make/scripts/make.jocl.all.macosx.sh index 20f65b92..88e6bfe2 100755 --- a/make/scripts/make.jocl.all.macosx.sh +++ b/make/scripts/make.jocl.all.macosx.sh @@ -6,7 +6,8 @@ if [ -e /opt-share/etc/profile.ant ] ; then . /opt-share/etc/profile.ant fi -JAVA_HOME=`/usr/libexec/java_home -version 1.7` +JAVA_HOME=`/usr/libexec/java_home -version 1.8` +#JAVA_HOME=`/usr/libexec/java_home -version 1.6` PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME PATH @@ -16,9 +17,6 @@ export SOURCE_LEVEL=1.6 export TARGET_LEVEL=1.6 export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar -export GLUEGEN_PROPERTIES_FILE="../../gluegen/make/lib/gluegen-clang.properties" -# or -Dgcc.compat.compiler=clang - #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org" export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet" |