Commit 90d43dfbfbc2fdaa1d2efe87472bda38a51fd28b

Thomas de Grivel 2024-07-27T22:51:38

config_i386

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
diff --git a/config.subr b/config.subr
index bc337a2..fbb90b2 100644
--- a/config.subr
+++ b/config.subr
@@ -183,6 +183,12 @@ config_gnu() {
     fi
 }
 
+config_i386() {
+    if [ "x$(uname -m)" = "xi386" ]; then
+	CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
+    fi
+}
+
 config_include() {
     OUT=".config_$1"
     OUT_C=".config_$1.c"
diff --git a/ekc3/configure b/ekc3/configure
index a917aaf..a6a5846 100755
--- a/ekc3/configure
+++ b/ekc3/configure
@@ -42,10 +42,10 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="-export-dynamic $LDFLAGS -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 config_define PREFIX "\"${PREFIX}\""
diff --git a/http/configure b/http/configure
index a4c02b1..8abda39 100755
--- a/http/configure
+++ b/http/configure
@@ -42,10 +42,10 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="-export-dynamic $LDFLAGS -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 config_define PREFIX "\"${PREFIX}\""
diff --git a/ikc3/configure b/ikc3/configure
index e6ffb7b..5c08e6e 100755
--- a/ikc3/configure
+++ b/ikc3/configure
@@ -30,10 +30,10 @@ PROG_DEBUG=ikc3_debug
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -fPIC"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="$LDFLAGS -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/kc3c/configure b/kc3c/configure
index 757644c..7b37223 100755
--- a/kc3c/configure
+++ b/kc3c/configure
@@ -15,57 +15,100 @@ set -e
 
 echo "$PWD/configure"
 
+export SRC_TOP="$(dirname "$PWD")"
+
+CONFIG_H_PREFIX=KC3S_
+
 . ../config.subr
 
-PROG=c3c
-LIBRARY=../libkc3/libkc3.la
+PROG=kc3s
+PROG_ASAN=kc3s_asan
+PROG_COV=kc3s_cov
+PROG_DEBUG=kc3s_debug
 
-SOURCES="$(ls *.c | tr '\n' ' ')"
-echo "SOURCES = $SOURCES" >> ${CONFIG_MK}
+. ./sources.sh
 
-OBJECTS="$(c2lo "$SOURCES")"
+OBJECTS="$(c2ext .main.lo "$SOURCES")"
 echo "OBJECTS = $OBJECTS" >> ${CONFIG_MK}
 
-check_libbsd
+OBJECTS_ASAN="$(c2ext .asan.lo "$SOURCES")"
+echo "OBJECTS_ASAN = $OBJECTS_ASAN" >> ${CONFIG_MK}
 
-if pkg-config libbsd-overlay; then
-    CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D__USE_MISC"
+if $HAVE_GCOV; then
+    OBJECTS_COV="$(c2ext .cov.lo "$SOURCES")"
+    echo "OBJECTS_COV = $OBJECTS_COV" >> ${CONFIG_MK}
 fi
 
-if [ x"$DEBUG" = x"yes" ]; then
-    CFLAGS="$CFLAGS -DDEBUG -O0 -ggdb"
-else
-    CFLAGS="$CFLAGS -DNDEBUG -O2"
-fi
-CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
-if pkg-config libbsd-overlay; then
-    CFLAGS="$CFLAGS $(pkg-config --cflags libbsd-overlay)"
-fi
+OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
+echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
+
+# Common config for all targets
+CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
+LDFLAGS="$LDFLAGS -rdynamic"
+config_asan
+config_gnu
+config_i386
+pkg_config libbsd-overlay
+pkg_config libffi
+pkg_config libmd
+config_lib libmd -lmd 2>/dev/null
+config_lib dl -ldl 2>/dev/null
+LIBS="$LIBS -pthread -lm"
+
+# Asan config
+CFLAGS_ASAN="$CFLAGS -DDEBUG -O1 -g"
+CFLAGS_ASAN="$CFLAGS_ASAN -fsanitize=address -fno-omit-frame-pointer"
+LDFLAGS_ASAN="$LDFLAGS"
+LIBKC3_ASAN=../libkc3/libkc3_asan.la
+LOCAL_LIBS_ASAN="$LIBKC3_ASAN"
+LIBS_ASAN="$LOCAL_LIBS_ASAN $LIBS"
+
+# Coverage config
+CFLAGS_COV="$CFLAGS -fprofile-arcs -ftest-coverage"
+LDFLAGS_COV="$LDFLAGS --coverage"
+LIBKC3_COV=../libkc3/libkc3_cov.la
+LOCAL_LIBS_COV="$LIBKC3_COV"
+LIBS_COV="$LOCAL_LIBS_COV $LIBS -lgcov"
 
-LIBS="$LIBS $LIBRARY"
-if pkg-config libbsd-overlay; then
-    LIBS="$LIBS $(pkg-config --libs libbsd-overlay)"
+# Debug config
+CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -ggdb"
+LDFLAGS_DEBUG="$LDFLAGS"
+LIBKC3_DEBUG=../libkc3/libkc3_debug.la
+LOCAL_LIBS_DEBUG="$LIBKC3_DEBUG"
+LIBS_DEBUG="$LOCAL_LIBS_DEBUG $LIBS"
+
+# Main config
+DEFAULT_CFLAGS="-O2 -fPIC"
+if [ "x$ENV_CFLAGS" = "x" ]; then
+    CFLAGS="$CFLAGS $DEFAULT_CFLAGS"
 fi
+CFLAGS="$CFLAGS -DNDEBUG"
+LIBKC3=../libkc3/libkc3.la
+LOCAL_LIBS="$LIBKC3"
+LIBS="$LOCAL_LIBS $LIBS"
 
+echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
 echo "CPPFLAGS = $CPPFLAGS" >> ${CONFIG_MK}
 echo "CFLAGS = $CFLAGS" >> ${CONFIG_MK}
 echo "LDFLAGS = $LDFLAGS" >> ${CONFIG_MK}
 echo "LIBS = $LIBS" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_ASAN = $CFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LDFLAGS_ASAN = $LDFLAGS_ASAN" >> ${CONFIG_MK}
+echo "LIBS_ASAN = $LIBS_ASAN" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_COV = $CFLAGS_COV" >> ${CONFIG_MK}
+echo "LDFLAGS_COV = $LDFLAGS_COV" >> ${CONFIG_MK}
+echo "LIBS_COV = $LIBS_COV" >> ${CONFIG_MK}
+echo >> ${CONFIG_MK}
+echo "CFLAGS_DEBUG = $CFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LDFLAGS_DEBUG = $LDFLAGS_DEBUG" >> ${CONFIG_MK}
+echo "LIBS_DEBUG = $LIBS_DEBUG" >> ${CONFIG_MK}
 
-for SRC in $SOURCES; do
-    SRC_LO=$(c2lo $SRC)
-    echo >> ${CONFIG_MK}
-    lo_rule $SRC >> ${CONFIG_MK}
-    echo "	\${LIBTOOL} --tag CC --mode compile \${CC} \${CPPFLAGS} \${CFLAGS} -c $SRC -o $SRC_LO" >> ${CONFIG_MK}
-done
+update_build
+update_build_prog
 
-echo >> ${CONFIG_MK}
-echo "$PROG: $LIBRARY $OBJECTS" >> ${CONFIG_MK}
-echo "	${LIBTOOL} --tag=CC --mode=link \${CC} \${LDFLAGS} ${OBJECTS} ${LIBRARY} ${LIBS} -o $PROG" >> ${CONFIG_MK}
+build_lo
+build_prog
 
-echo >> ${CONFIG_MK}
-echo "install: $LIBRARY $PROG" >> ${CONFIG_MK}
-echo "	\${INSTALL} -o \${OWNER} -g \${GROUP} -m 0755 -d \${LIBDIR}" >> ${CONFIG_MK}
-echo "	\${LIBTOOL} --tag=CC --mode=install \${INSTALL} -o \${OWNER} -g \${GROUP} -m 0755 $LIBRARY \${LIBDIR}" >> ${CONFIG_MK}
-echo "	\${INSTALL} -o \${OWNER} -g \${GROUP} -m 0755 -d \${BINDIR}" >> ${CONFIG_MK}
-echo "	\${LIBTOOL} --tag=CC --mode=install \${INSTALL} -o \${OWNER} -g \${GROUP} -m 0755 $PROG \${BINDIR}/$PROG" >> ${CONFIG_MK}
+update_config_mk
diff --git a/kc3s/configure b/kc3s/configure
index b0f3c7e..7b37223 100755
--- a/kc3s/configure
+++ b/kc3s/configure
@@ -44,10 +44,10 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="$LDFLAGS -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3/configure b/libkc3/configure
index 842f863..6419637 100755
--- a/libkc3/configure
+++ b/libkc3/configure
@@ -41,10 +41,10 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$LO_SOURCES")"
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="-export-dynamic $LDFLAGS -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3_window/cairo/configure b/libkc3_window/cairo/configure
index 3111f9d..eeaf2da 100755
--- a/libkc3_window/cairo/configure
+++ b/libkc3_window/cairo/configure
@@ -43,11 +43,11 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 CPPFLAGS="-I../.. $CPPFLAGS"
 OBJCFLAGS="$CFLAGS -W -Wall -Werror"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS}"
 LIBS="$LIBS -rpath ${PREFIX}/lib"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3_window/cairo/demo/configure b/libkc3_window/cairo/demo/configure
index 57e779a..682e3dd 100755
--- a/libkc3_window/cairo/demo/configure
+++ b/libkc3_window/cairo/demo/configure
@@ -46,6 +46,7 @@ LDFLAGS="--shared ${LDFLAGS}"
 LIBS="$LIBS -rpath ${PREFIX}/lib"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3_window/cairo/quartz/configure b/libkc3_window/cairo/quartz/configure
index 1696a04..bc1d544 100755
--- a/libkc3_window/cairo/quartz/configure
+++ b/libkc3_window/cairo/quartz/configure
@@ -50,12 +50,12 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 # Common config for all targets
 CPPFLAGS="$CPPFLAGS -I../../.."
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 OBJCFLAGS="$CFLAGS -W -Wall -Werror"
 LDFLAGS="--shared $LDFLAGS"
 LIBS="$LIBS"
 config_asan
 config_gnu
+config_i386
 pkg_config cairo
 pkg_config cairo-ft
 config_lib COCOA -framework Cocoa
diff --git a/libkc3_window/cairo/quartz/demo/configure b/libkc3_window/cairo/quartz/demo/configure
index a41886c..5debc85 100755
--- a/libkc3_window/cairo/quartz/demo/configure
+++ b/libkc3_window/cairo/quartz/demo/configure
@@ -68,12 +68,12 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 # Common config for all targets
 CPPFLAGS="$CPPFLAGS -I../../../.."
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 OBJCFLAGS="$CFLAGS -W -Wall -Werror"
 LDFLAGS="$LDFLAGS -framework Cocoa"
 LIBS="$LIBS"
 config_asan
 config_gnu
+config_i386
 pkg_config cairo
 pkg_config cairo-ft
 pkg_config libffi
diff --git a/libkc3_window/cairo/win32/configure b/libkc3_window/cairo/win32/configure
index 3f6e2a5..885d1d4 100644
--- a/libkc3_window/cairo/win32/configure
+++ b/libkc3_window/cairo/win32/configure
@@ -43,11 +43,11 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I../../../../libffi/include -I../../../.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared $LDFLAGS"
 LIBS="$LIBS -rpath ${PREFIX}/lib"
 config_asan
 config_gnu
+config_i386
 pkg_config xkbcommon
 pkg_config cairo
 pkg_config cairo-win32
diff --git a/libkc3_window/cairo/win32/demo/configure b/libkc3_window/cairo/win32/demo/configure
index e32003b..11b1cb7 100644
--- a/libkc3_window/cairo/win32/demo/configure
+++ b/libkc3_window/cairo/win32/demo/configure
@@ -45,10 +45,10 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 CPPFLAGS="-I../../../../../libffi/include -I../../../../.. $CPPFLAGS"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config cairo
 pkg_config cairo-win32
diff --git a/libkc3_window/cairo/xcb/configure b/libkc3_window/cairo/xcb/configure
index eeff497..8666872 100755
--- a/libkc3_window/cairo/xcb/configure
+++ b/libkc3_window/cairo/xcb/configure
@@ -42,10 +42,10 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="$CPPFLAGS -I../../.."
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS}"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3_window/cairo/xcb/demo/configure b/libkc3_window/cairo/xcb/demo/configure
index 4647975..9e16ca9 100755
--- a/libkc3_window/cairo/xcb/demo/configure
+++ b/libkc3_window/cairo/xcb/demo/configure
@@ -47,10 +47,10 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 CPPFLAGS="$CPPFLAGS -I../../../.."
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3_window/configure b/libkc3_window/configure
index f9f4751..52f09e4 100755
--- a/libkc3_window/configure
+++ b/libkc3_window/configure
@@ -42,10 +42,10 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS} -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/libkc3_window/sdl2/configure b/libkc3_window/sdl2/configure
index 3fe5f6f..c2d1d93 100755
--- a/libkc3_window/sdl2/configure
+++ b/libkc3_window/sdl2/configure
@@ -40,10 +40,10 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$SOURCES")"
 # Common config for all targets
 CPPFLAGS="-I../.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="--shared ${LDFLAGS}"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libmd
 pkg_config freetype2
diff --git a/libkc3_window/sdl2/demo/configure b/libkc3_window/sdl2/demo/configure
index c7a1b23..490f1e9 100755
--- a/libkc3_window/sdl2/demo/configure
+++ b/libkc3_window/sdl2/demo/configure
@@ -49,10 +49,10 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 CPPFLAGS="-I../../.. $CPPFLAGS"
 CFLAGS="$CFLAGS -W -Wall -Werror -Wno-error=unknown-pragmas"
 CFLAGS="$CFLAGS -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LIBS="$LIBS -lm"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libmd
 pkg_config freetype2
diff --git a/libtommath b/libtommath
index d481898..3bd6700 160000
--- a/libtommath
+++ b/libtommath
@@ -1 +1 @@
-Subproject commit d4818983e34f7faf8da74643027dc70e5a1beec7
+Subproject commit 3bd6700b68f2f8ebbc56d8990e5aef0d69b2ad3b
diff --git a/math/configure b/math/configure
index 1ac3c40..c98df39 100755
--- a/math/configure
+++ b/math/configure
@@ -49,6 +49,7 @@ LIBS="${LIBS:=-lm}"
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/test/configure b/test/configure
index 0fe6ef2..9f98f67 100755
--- a/test/configure
+++ b/test/configure
@@ -42,10 +42,10 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c11 -pedantic -pipe"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
 LDFLAGS="$LDFLAGS -rdynamic"
 config_asan
 config_gnu
+config_i386
 pkg_config libbsd-overlay
 pkg_config libffi
 pkg_config libmd
diff --git a/ucd2c/configure b/ucd2c/configure
index cbdea46..1287345 100755
--- a/ucd2c/configure
+++ b/ucd2c/configure
@@ -34,7 +34,7 @@ LIBS="${LIBS:=}"
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic -O2"
-CFLAGS="$CFLAGS -msse2 -mfpmath=sse"
+config_i386
 pkg_config libbsd-overlay
 
 # Main config