*-symbol-check: use correct `nm` path when cross-compiling
[mesa.git] / src / mapi / es1api / ABI-check
1 #!/bin/sh
2 set -eu
3
4 # Print defined gl.* functions not in GL ES 1.1 or in
5 # (FIXME, none of these should be part of the ABI)
6 # GL_EXT_multi_draw_arrays
7 # GL_OES_EGL_image
8
9 # or in extensions that are part of the ES 1.1 extension pack.
10 # (see http://www.khronos.org/registry/gles/specs/1.1/opengles_spec_1_1_extension_pack.pdf)
11
12 case "$(uname)" in
13 Darwin)
14 LIB=${1-es1api/.libs/libGLESv1_CM.dylib}
15 ;;
16 CYGWIN*)
17 LIB=${1-es1api/.libs/cygGLESv1_CM-1.dll}
18 ;;
19 *)
20 LIB=${1-es1api/.libs/libGLESv1_CM.so.1}
21 ;;
22 esac
23
24 if ! [ -f "$LIB" ]
25 then
26 exit 1
27 fi
28
29 FUNCS=$($NM -D --defined-only $LIB | grep -o 'T gl.*' | cut -c 3- | while read func; do
30 ( grep -q "^$func$" || echo $func ) <<EOF
31 glActiveTexture
32 glAlphaFunc
33 glAlphaFuncx
34 glBindBuffer
35 glBindTexture
36 glBlendFunc
37 glBufferData
38 glBufferSubData
39 glClear
40 glClearColor
41 glClearColorx
42 glClearDepthf
43 glClearDepthx
44 glClearStencil
45 glClientActiveTexture
46 glClipPlanef
47 glClipPlanex
48 glColor4f
49 glColor4ub
50 glColor4x
51 glColorMask
52 glColorPointer
53 glCompressedTexImage2D
54 glCompressedTexSubImage2D
55 glCopyTexImage2D
56 glCopyTexSubImage2D
57 glCullFace
58 glDeleteBuffers
59 glDeleteTextures
60 glDepthFunc
61 glDepthMask
62 glDepthRangef
63 glDepthRangex
64 glDisable
65 glDisableClientState
66 glDrawArrays
67 glDrawElements
68 glEGLImageTargetRenderbufferStorageOES
69 glEGLImageTargetTexture2DOES
70 glEnable
71 glEnableClientState
72 glFinish
73 glFlush
74 glFogf
75 glFogfv
76 glFogx
77 glFogxv
78 glFrontFace
79 glFrustumf
80 glFrustumx
81 glGenBuffers
82 glGenTextures
83 glGetBooleanv
84 glGetBufferParameteriv
85 glGetClipPlanef
86 glGetClipPlanex
87 glGetError
88 glGetFixedv
89 glGetFloatv
90 glGetIntegerv
91 glGetLightfv
92 glGetLightxv
93 glGetMaterialfv
94 glGetMaterialxv
95 glGetPointerv
96 glGetString
97 glGetTexEnvfv
98 glGetTexEnviv
99 glGetTexEnvxv
100 glGetTexParameterfv
101 glGetTexParameteriv
102 glGetTexParameterxv
103 glHint
104 glIsBuffer
105 glIsEnabled
106 glIsTexture
107 glLightf
108 glLightfv
109 glLightModelf
110 glLightModelfv
111 glLightModelx
112 glLightModelxv
113 glLightx
114 glLightxv
115 glLineWidth
116 glLineWidthx
117 glLoadIdentity
118 glLoadMatrixf
119 glLoadMatrixx
120 glLogicOp
121 glMaterialf
122 glMaterialfv
123 glMaterialx
124 glMaterialxv
125 glMatrixMode
126 glMultiDrawArraysEXT
127 glMultiDrawElementsEXT
128 glMultiTexCoord4f
129 glMultiTexCoord4x
130 glMultMatrixf
131 glMultMatrixx
132 glNormal3f
133 glNormal3x
134 glNormalPointer
135 glOrthof
136 glOrthox
137 glPixelStorei
138 glPointParameterf
139 glPointParameterfv
140 glPointParameterx
141 glPointParameterxv
142 glPointSize
143 glPointSizePointerOES
144 glPointSizex
145 glPolygonOffset
146 glPolygonOffsetx
147 glPopMatrix
148 glPushMatrix
149 glReadPixels
150 glRotatef
151 glRotatex
152 glSampleCoverage
153 glSampleCoveragex
154 glScalef
155 glScalex
156 glScissor
157 glShadeModel
158 glStencilFunc
159 glStencilMask
160 glStencilOp
161 glTexCoordPointer
162 glTexEnvf
163 glTexEnvfv
164 glTexEnvi
165 glTexEnviv
166 glTexEnvx
167 glTexEnvxv
168 glTexImage2D
169 glTexParameterf
170 glTexParameterfv
171 glTexParameteri
172 glTexParameteriv
173 glTexParameterx
174 glTexParameterxv
175 glTexSubImage2D
176 glTranslatef
177 glTranslatex
178 glVertexPointer
179 glViewport
180 EOF
181 done)
182
183 test ! -n "$FUNCS" || echo $FUNCS
184 test ! -n "$FUNCS"