Link with gcc -shared, not ld; don't explicitly link with libc.
(Closes: #894063)
- Thank you to Matthias Klose for the patch.
tony mancill
6 years ago
119 | 119 | + </exec> |
120 | 120 | + |
121 | 121 | + <!-- Create the library file--> |
122 | + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> | |
123 | + <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o -G -z defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -lc -L${java.home}/lib/${os.arch} -L${java.home}/lib -ljawt -L${java.home}/lib/${os.arch}/server -L${java.home}/lib/${os.arch}/client -L${java.home}/lib/server -L${java.home}/lib/client -ljvm -o libj3dcore-ogl.so"/> | |
122 | + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> | |
123 | + <arg line="-shared DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o -Wl,-z,defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -L${java.home}/lib/${os.arch} -L${java.home}/lib -ljawt -L${java.home}/lib/${os.arch}/server -L${java.home}/lib/${os.arch}/client -L${java.home}/lib/server -L${java.home}/lib/client -ljvm -o libj3dcore-ogl.so"/> | |
124 | 124 | + </exec> |
125 | 125 | + |
126 | 126 | + </target> |
132 | 132 | + </exec> |
133 | 133 | + |
134 | 134 | + <!-- Create the wrapper library --> |
135 | + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> | |
136 | + <arg line="CgWrapper.o -G -z defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -lc -o libj3dcore-ogl-cg.so"/> | |
135 | + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> | |
136 | + <arg line="CgWrapper.o -Wl,-z,defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -o libj3dcore-ogl-cg.so"/> | |
137 | 137 | + </exec> |
138 | 138 | + |
139 | 139 | + </target> |