forked from ColinIanKing/stress-ng
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.config
2230 lines (1581 loc) · 61.1 KB
/
Makefile.config
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
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# Copyright (C) 2013-2021 Canonical, Ltd.
# Copyright (C) 2021-2022 Colin Ian King
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
CONFIGS=configs
CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 -std=gnu99 -I.
APPARMOR_PARSER=/sbin/apparmor_parser
LIB_APPARMOR := -lapparmor
KERNEL=$(shell uname -s)
ifeq (,$(findstring $(KERNEL),Darwin DragonFly FreeBSD NetBSD OpenBSD))
LIB_BSD := -lbsd
endif
LIB_Z := -lz
LIB_CRYPT := -lcrypt
LIB_RT := -lrt
LIB_PTHREAD := -pthread
LIB_AIO := -laio
LIB_SCTP := -lsctp
LIB_DL := -ldl
LIB_IPSEC_MB := -lIPSec_MB
LIB_JPEG := -ljpeg
LIB_JUDY := -lJudy
LIB_KMOD := -lkmod
LIB_ATOMIC := -latomic
LIB_MATH := -lm
LIB_XXHASH := -lxxhash
LIB_EGL := -lEGL
LIB_GLES2 := -lGLESv2
LIB_GBM := -lgbm
DIR=test
.SUFFIXES: .c .o
LDFLAGS += $(CONFIG_LDFLAGS)
#
# Static flags, only to be used when using GCC
#
ifeq ($(STATIC),1)
LDFLAGS += -static
CFLAGS += -DBUILD_STATIC
endif
ifeq ($(shell uname -s),SunOS)
CONFIG_LDFLAGS += -lsocket -lnsl
endif
#
# This must always come after -pthread so that static linking works
#
ifeq ($(shell uname -s),Haiku)
CONFIG_LDFLAGS += -lnetwork
else
CONFIG_LDFLAGS += -lc
endif
MAKE_OPTS=CC="$(CC)" -f Makefile.config --no-print-directory
comma = ,
#
# $1 = test program
# $2 = HAVE config name
# $3 = "using" message
# $4 = libraries required
# $5 = cflags required for test
# $6 = target clone settings
# $7 = cflags to be added to CONFIG_CFLAGS and test
# $8 = temp name
#
define check_tmp
@if [ ! -f $(CONFIGS)/$2 ]; then \
rm -f $8.o; \
$(CC) $(CFLAGS) $(CPPFLAGS) -Itest $5 $7 -DTARGET_CLONE=$6 $(DIR)/$1.c $4 -o $8.o $(LDFLAGS) 2> /dev/null || true ; \
if [ -f $8.o ]; then \
echo "using $3 ... yes"; \
echo "# using $2" >> $(CONFIGS)/$2; \
if [ -n "$7" ]; then \
echo "CONFIG_CFLAGS += $7" >> $(CONFIGS)/$2; \
fi; \
if [ -n "$4" ]; then \
for I in $(4); do \
echo "CONFIG_LDFLAGS += $$I" >> $(CONFIGS)/$2; \
done; \
fi; \
else \
echo "using $3 ... no"; \
fi; \
touch $(CONFIGS)/$2; \
fi
@rm -f $8.o
endef
define check
$(call check_tmp,$1,$2,$3,$4,$5,$6,$7,$(shell mktemp))
endef
#
# $1 = float type
# $2 = HAVE config name
# $3 = message
# $4 = temp name
#
define check_float_tmp
@if [ ! -f $(CONFIGS)/$2 ]; then \
rm -rf $4; \
$(CC) $(CFLAGS) $(CPPFLAGS) -DFLOAT=$1 -o $4 $(DIR)/test-float.c -lm 2> /dev/null || true; \
if [ -f $4 ]; then \
echo "using $3 ... yes"; \
echo "" >> $(CONFIGS)/$2; \
else \
echo "using $3 ... no"; \
fi; \
fi
@touch $(CONFIGS)/$2
@rm -rf $4
endef
define check_float
$(call check_float_tmp,$1,$2,$3,$(shell mktemp))
endef
#
# $1 = test program
# $2 = HAVE config name
# $3 = message
# $4 = temp name
#
define check_vecmath_tmp
@if [ ! -f $(CONFIGS)/$2 ]; then \
$(CC) $(CFLAGS) $(CPPFLAGS) -Itest -DHAVE_VECMATH -c -o $4.o $1.c 2> /dev/null || true; \
if [ -f $4.o ]; then \
echo "using $3 ... yes"; \
echo "" >> $(CONFIGS)/$2; \
else \
echo "using $3 ... no"; \
fi; \
fi
@touch $(CONFIGS)/$2
@rm -rf $4.o
endef
define check_vecmath
$(call check_vecmath_tmp,$1,$2,$3,$(shell mktemp))
endef
#
# $1 = test program
# $2 = HAVE config name
# $3 = message
# $4 = libs
#
define check_apparmor
@if [ ! -f $(CONFIGS)/$2 ]; then \
$(CC) $(CFLAGS) $(CPPFLAGS) $(DIR)/$1.c $4 -o $(DIR)/$1 2> /dev/null || true; \
if [ -f $(DIR)/$1 ]; then \
$(APPARMOR_PARSER) -Q usr.bin.pulseaudio.eg -o apparmor-data.bin 2> /dev/null; \
if [ $$? -eq 0 ] && [ -x "$(APPARMOR_PARSER)" ] && [ -f apparmor-data.bin ]; then \
echo "using $3 ... yes"; \
echo "CONFIG_OBJS += apparmor-data.o" > $(CONFIGS)/$2; \
echo "# using $2" >> $(CONFIGS)/$2; \
echo "CONFIG_LDFLAGS += $4" >> $(CONFIGS)/$2; \
else \
echo "using $3 ... no"; \
fi; \
else \
echo "using $3 ... no"; \
fi; \
touch $(CONFIGS)/$2; \
fi
@rm -f $(DIR)/test-apparmor apparmor-data.bin
endef
#
# $1 = header file
# $2 = HAVE config name
# $3 = tmp name
#
define check_header_tmp
@if [ ! -f $(CONFIGS)/$2 ]; then \
echo "#include <stdio.h>" > $(3).c; \
echo "#include <sys/types.h>" >> $(3).c; \
for I in $(1); do \
echo "#include <$$I>" >> $(3).c; \
done; \
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $(3).o $(3).c 2> /dev/null || true; \
if [ -f $(3).o ]; then \
echo "using $1 ... yes"; \
echo "" >> $(CONFIGS)/$2; \
else \
echo "using $1 ... no"; \
fi; \
rm -f $(3).o $(3).c; \
touch $(CONFIGS)/$2; \
fi
endef
define check_header
$(call check_header_tmp,$1,$2,$(shell mktemp))
endef
all: libraries headers cpufeatures types functions
@for I in $$(ls $(CONFIGS)); do \
if [ -s $(CONFIGS)/$$I ]; then \
echo "#define $$I"; \
else \
echo "/* #define $$I */"; \
fi; \
done | sort | uniq > config.h
@echo CONFIG_LDFLAGS += $(CONFIG_LDFLAGS) > $(CONFIGS)/HAVE_LDFLAGS_TMP
@cat $(CONFIGS)/* | grep -v "#" | sed '/^$$/d' | sort | uniq > config
@rm -f $(CONFIGS)/HAVE_LDFLAGS_TMP
configdir:
@mkdir -p $(CONFIGS)
#.NOTPARALLEL:
clean:
@rm -rf $(CONFIGS) config config.h
libraries: \
configdir \
LIB_AIO LIB_BSD LIB_CRYPT LIB_RT LIB_SCTP LIB_Z LIB_DL \
LIB_JPEG LIB_JUDY LIB_PTHREAD LIB_PTHREAD_SPINLOCK \
LIB_IPSEC_MB LIB_KMOD LIB_XXHASH LIB_APPARMOR \
LIB_EGL LIB_GBM LIB_GLES2
LIB_AIO:
$(call check,test-libaio,HAVE_LIB_AIO,$(LIB_AIO),$(LIB_AIO))
LIB_BSD:
$(call check,test-libbsd,HAVE_LIB_BSD,$(LIB_BSD),$(LIB_BSD))
LIB_CRYPT:
$(call check,test-libcrypt,HAVE_LIB_CRYPT,$(LIB_CRYPT),$(LIB_CRYPT))
LIB_RT:
$(call check,test-librt,HAVE_LIB_RT,$(LIB_RT),$(LIB_RT))
LIB_SCTP:
$(call check,test-libsctp,HAVE_LIB_SCTP,$(LIB_SCTP),$(LIB_SCTP))
LIB_Z:
$(call check,test-libz,HAVE_LIB_Z,$(LIB_Z),$(LIB_Z))
LIB_DL:
$(call check,test-libdl,HAVE_LIB_DL,$(LIB_DL),$(LIB_DL))
LIB_JPEG:
$(call check,test-libjpeg,HAVE_LIB_JPEG,$(LIB_JPEG),$(LIB_JPEG))
LIB_JUDY:
$(call check,test-judy,HAVE_LIB_JUDY,$(LIB_JUDY),$(LIB_JUDY))
LIB_PTHREAD:
$(call check,test-libpthread,HAVE_LIB_PTHREAD,$(LIB_PTHREAD),$(LIB_PTHREAD))
LIB_PTHREAD_SPINLOCK:
$(call check,test-libpthread-spinlock,HAVE_LIB_PTHREAD_SPINLOCK,$(LIB_PTHREAD) spinlock,$(LIB_PTHREAD))
LIB_IPSEC_MB:
$(call check,test-libipsec-mb,HAVE_LIB_IPSEC_MB,$(LIB_IPSEC_MB),$(LIB_IPSEC_MB))
LIB_KMOD:
$(call check,test-libkmod,HAVE_LIB_KMOD,$(LIB_KMOD),$(LIB_KMOD))
LIB_EGL:
$(call check,test-libegl,HAVE_LIB_EGL,$(LIB_EGL),$(LIB_EGL))
LIB_GBM:
$(call check,test-libgbm,HAVE_LIB_GBM,$(LIB_GBM),$(LIB_GBM))
LIB_GLES2:
$(call check,test-libgles,HAVE_LIB_GLES2,$(LIB_GLES2),$(LIB_GLES2))
LIB_XXHASH:
$(call check,test-libxxhash,HAVE_LIB_XXHASH,$(LIB_XXHASH),$(LIB_XXHASH))
LIB_APPARMOR:
$(call check_apparmor,test-apparmor,HAVE_APPARMOR,$(LIB_APPARMOR),$(LIB_APPARMOR))
headers: \
configdir \
AIO_H ASM_CACHECTL_H ASM_LDT_H ASM_MTRR_H ASM_PRCTL_H ATTR_XATTR_H \
BSD_STDLIB_H BSD_STRING_H BSD_SYS_TREE_H BSD_UNISTD_H BSD_WCHAR \
COMPLEX_H WCHAR CRYPT_H EGL_H EGL_EXT_H FEATURES_H FENV_H FLOAT_H GBM_H \
GLES2_H GRP_H IFADDRS_H INTEL_IPSEC_MB_H JPEG_H JUDY_H KEYUTILS_H LIBAIO_H \
LIBGEN_H LIBKMOD_H LINK_H LINUX_ANDROID_BINDER_H LINUX_ANDROID_BINDERFS_H \
LINUX_AUDIT_H LINUX_BLKZONED_H LINUX_CDROM_H LINUX_CN_PROC_H \
LINUX_CONNECTOR_H LINUX_DM_IOCTL_H LINUX_FD_H LINUX_FIEMAP_H \
LINUX_FILTER_H LINUX_FSVERITY_H LINUX_FUTEX_H LINUX_FS_H \
LINUX_GENETLINK_H LINUX_HDREG_H LINUX_HPET_H LINUX_IF_ALG_H \
LINUX_IF_PACKET_H LINUX_IF_TUN_H LINUX_IO_URING_H LINUX_KD_H \
LINUX_KVM_H LINUX_LANDLOCK_H LINUX_LOOP_H LINUX_MEDIA_H \
LINUX_MEMBARRIER_H LINUX_MEMPOLICY_H LINUX_NETLINK_H \
LINUX_OPENAT2_H LINUX_PCI_H LINUX_PERF_EVENT_H LINUX_POSIX_TYPES_H \
LINUX_PPDEV_H LINUX_PTP_CLOCK_H LINUX_RANDOM_H LINUX_RSEQ_H \
LINUX_RTC_H LINUX_RTNETLINK_H LINUX_SECCOMP_H LINUX_SERIAL_H \
LINUX_SOCK_DIAG_H LINUX_SOCKET_H LINUX_SOCKIOS_H LINUX_SYSCTL_H \
LINUX_TASKSTATS_H LINUX_UDP_H LINUX_UNIX_DIAG_H LINUX_USBDEVICE_FS_H \
LINUX_USERFAULTFD_H LINUX_VERSION_H LINUX_VIDEODEV2_H LINUX_VT_H \
LINUX_WATCHDOG_H LOCALE_H MALLOC_H MNTENT_H MQUEUE_H POLL_H \
PTHREAD_NP_H SCSI_SCSI_H SCSI_SCSI_IOCTL_H SCSI_SG_H SEMAPHORE_H \
STRINGS_H SOUND_ASOUND_H SPAWN_H SYSLOG_H SYS_APPARMOR_H SYS_AUXV_H \
SYS_CAPABILITY_H SYS_EPOLL_H SYS_EVENTFD_H SYS_FANOTIFY_H SYS_FSUID_H \
SYS_INOTIFY_H SYS_IO_H SYS_IPC_H SYS_LOADAVG_H SYS_MOUNT_H SYS_MSG_H \
SYS_PARAM_H SYS_PERSONALITY_H SYS_PLATFORM_PPC_H SYS_PRCTL_H \
SYS_RANDOM_H SYS_SYSCTL_H SYS_TREE_H SYS_QUEUE_H SYS_QUOTA_H \
SYS_SELECT_H SYS_SENDFILE_H SYS_SHM_H SYS_SIGNALFD_H SYS_STATFS_H \
SYS_STATVFS_H SYS_SWAP_H SYSCALL_H SYS_SYSINFO_H SYS_SYSMACROS_H \
SYS_TIMERFD_H SYS_TIMEX_H SYS_UIO_H SYS_UCRED_H SYS_UN_H SYS_UTSNAME_H \
SYS_VFS_H SYS_VMMETER_H SYS_XATTR_H TERMIO_H TERMIOS_H NET_IF_H \
NETINET_IP_H NETINET_IP_ICMP_H NETINET_SCTP_H NETINET_TCP_H UCONTEXT_H \
USTAT_H UTIME_H XMMINTRIN_H XXHASH_H
AIO_H:
$(call check_header,aio.h,HAVE_AIO_H)
ASM_CACHECTL_H:
$(call check_header,asm/cachectl.h,HAVE_ASM_CACHECTL_H)
ASM_LDT_H:
$(call check_header,asm/ldt.h,HAVE_ASM_LDT_H)
ASM_MTRR_H:
$(call check_header,asm/mtrr.h,HAVE_ASM_MTRR_H)
ASM_PRCTL_H:
$(call check_header,asm/prctl.h,HAVE_ASM_PRCTL_H)
ATTR_XATTR_H:
$(call check_header,attr/xattr.h,HAVE_ATTR_XATTR_H)
BSD_STDLIB_H:
$(call check_header,bsd/stdlib.h,HAVE_BSD_STDLIB_H)
BSD_STRING_H:
$(call check_header,bsd/string.h,HAVE_BSD_STRING_H)
BSD_SYS_TREE_H:
$(call check_header,bsd/sys/tree.h,HAVE_BSD_SYS_TREE_H)
BSD_UNISTD_H:
$(call check_header,bsd/unistd.h,HAVE_BSD_UNISTD_H)
BSD_WCHAR:
$(call check_header,bsd/wchar.h,HAVE_BSD_WCHAR)
COMPLEX_H:
$(call check_header,complex.h,HAVE_COMPLEX_H)
WCHAR:
$(call check_header,wchar.h,HAVE_WCHAR)
CRYPT_H:
$(call check_header,crypt.h,HAVE_CRYPT_H)
FEATURES_H:
$(call check_header,features.h,HAVE_FEATURES_H)
FENV_H:
$(call check_header,fenv.h,HAVE_FENV_H)
EGL_H:
$(call check_header,EGL/egl.h,HAVE_EGL_H)
EGL_EXT_H:
$(call check_header,EGL/egl.h EGL/eglext.h,HAVE_EGL_EXT_H)
FLOAT_H:
$(call check_header,float.h,HAVE_FLOAT_H)
GBM_H:
$(call check_header,gbm.h,HAVE_GBM_H)
GLES2_H:
$(call check_header,GLES2/gl2.h,HAVE_GLES2_H)
GRP_H:
$(call check_header,grp.h,HAVE_GRP_H)
IFADDRS_H:
$(call check_header,ifaddrs.h,HAVE_IFADDRS_H)
INTEL_IPSEC_MB_H:
$(call check_header,intel-ipsec-mb.h,HAVE_INTEL_IPSEC_MB_H)
JPEG_H:
$(call check_header,jpeglib.h,HAVE_LIBJPEG_H)
JUDY_H:
$(call check_header,Judy.h,HAVE_JUDY_H)
KEYUTILS_H:
$(call check_header,keyutils.h,HAVE_KEYUTILS_H)
LIBAIO_H:
$(call check_header,libaio.h,HAVE_LIBAIO_H)
LIBGEN_H:
$(call check_header,libgen.h,HAVE_LIBGEN_H)
LIBKMOD_H:
$(call check_header,libkmod.h,HAVE_LIBKMOD_H)
LINK_H:
$(call check_header,link.h,HAVE_LINK_H)
LINUX_ANDROID_BINDER_H:
$(call check_header,linux/android/binder.h,HAVE_LINUX_ANDROID_BINDER_H)
LINUX_ANDROID_BINDERFS_H:
$(call check_header,linux/android/binderfs.h,HAVE_LINUX_ANDROID_BINDERFS_H)
LINUX_AUDIT_H:
$(call check_header,linux/audit.h,HAVE_LINUX_AUDIT_H)
LINUX_BLKZONED_H:
$(call check_header,linux/blkzoned.h,HAVE_LINUX_BLKZONED_H)
LINUX_CDROM_H:
$(call check_header,linux/cdrom.h,HAVE_LINUX_CDROM_H)
LINUX_CN_PROC_H:
$(call check_header,linux/cn_proc.h,HAVE_LINUX_CN_PROC_H)
LINUX_CONNECTOR_H:
$(call check_header,linux/connector.h,HAVE_LINUX_CONNECTOR_H)
LINUX_DM_IOCTL_H:
$(call check_header,linux/dm-ioctl.h,HAVE_LINUX_DM_IOCTL_H)
LINUX_FD_H:
$(call check_header,linux/fd.h,HAVE_LINUX_FD_H)
LINUX_FIEMAP_H:
$(call check_header,linux/fiemap.h,HAVE_LINUX_FIEMAP_H)
LINUX_FILTER_H:
$(call check_header,linux/filter.h,HAVE_LINUX_FILTER_H)
LINUX_FSVERITY_H:
$(call check_header,linux/fsverity.h,HAVE_LINUX_FSVERITY_H)
LINUX_FUTEX_H:
$(call check_header,linux/futex.h,HAVE_LINUX_FUTEX_H)
LINUX_FS_H:
$(call check_header,linux/fs.h,HAVE_LINUX_FS_H)
LINUX_GENETLINK_H:
$(call check_header,linux/genetlink.h,HAVE_LINUX_GENETLINK_H)
LINUX_HDREG_H:
$(call check_header,linux/hdreg.h,HAVE_LINUX_HDREG_H)
LINUX_HPET_H:
$(call check_header,linux/hpet.h,HAVE_LINUX_HPET_H)
LINUX_IF_ALG_H:
$(call check_header,linux/if_alg.h,HAVE_LINUX_IF_ALG_H)
LINUX_IF_PACKET_H:
$(call check_header,linux/if_packet.h,HAVE_LINUX_IF_PACKET_H)
LINUX_IF_TUN_H:
$(call check_header,linux/if_tun.h,HAVE_LINUX_IF_TUN_H)
LINUX_IO_URING_H:
$(call check_header,linux/io_uring.h,HAVE_LINUX_IO_URING_H)
LINUX_KD_H:
$(call check_header,linux/kd.h,HAVE_LINUX_KD_H)
LINUX_KVM_H:
$(call check_header,linux/kvm.h,HAVE_LINUX_KVM_H)
LINUX_LANDLOCK_H:
$(call check_header,linux/landlock.h,HAVE_LINUX_LANDLOCK_H)
LINUX_LOOP_H:
$(call check_header,linux/loop.h,HAVE_LINUX_LOOP_H)
LINUX_MEDIA_H:
$(call check_header,linux/media.h,HAVE_LINUX_MEDIA_H)
LINUX_MEMBARRIER_H:
$(call check_header,linux/membarrier.h,HAVE_LINUX_MEMBARRIER_H)
LINUX_MEMPOLICY_H:
$(call check_header,linux/mempolicy.h,HAVE_LINUX_MEMPOLICY_H)
LINUX_NETLINK_H:
$(call check_header,linux/netlink.h,HAVE_LINUX_NETLINK_H)
LINUX_OPENAT2_H:
$(call check_header,linux/openat2.h,HAVE_LINUX_OPENAT2_H)
LINUX_PCI_H:
$(call check_header,linux/pci.h,HAVE_LINUX_PCI_H)
LINUX_PERF_EVENT_H:
$(call check_header,linux/perf_event.h,HAVE_LINUX_PERF_EVENT_H)
LINUX_POSIX_TYPES_H:
$(call check_header,linux/posix_types.h,HAVE_LINUX_POSIX_TYPES_H)
LINUX_PPDEV_H:
$(call check_header,linux/ppdev.h,HAVE_LINUX_PPDEV_H)
LINUX_PTP_CLOCK_H:
$(call check_header,linux/ptp_clock.h,HAVE_LINUX_PTP_CLOCK_H)
LINUX_RANDOM_H:
$(call check_header,linux/random.h,HAVE_LINUX_RANDOM_H)
LINUX_RSEQ_H:
$(call check_header,linux/rseq.h,HAVE_LINUX_RSEQ_H)
LINUX_RTC_H:
$(call check_header,linux/rtc.h,HAVE_LINUX_RTC_H)
LINUX_RTNETLINK_H:
$(call check_header,linux/rtnetlink.h,HAVE_LINUX_RTNETLINK_H)
LINUX_SECCOMP_H:
$(call check_header,linux/seccomp.h,HAVE_LINUX_SECCOMP_H)
LINUX_SERIAL_H:
$(call check_header,linux/serial.h,HAVE_LINUX_SERIAL_H)
LINUX_SOCK_DIAG_H:
$(call check,test-sock-diag,HAVE_LINUX_SOCK_DIAG_H,linux/sockdiag.h)
LINUX_SOCKET_H:
$(call check_header,linux/socket.h,HAVE_LINUX_SOCKET_H)
LINUX_SOCKIOS_H:
$(call check_header,linux/sockios.h,HAVE_LINUX_SOCKIOS_H)
LINUX_SYSCTL_H:
$(call check_header,linux/sysctl.h,HAVE_LINUX_SYSCTL_H)
LINUX_TASKSTATS_H:
$(call check_header,linux/taskstats.h,HAVE_LINUX_TASKSTATS_H)
LINUX_UDP_H:
$(call check_header,linux/udp.h,HAVE_LINUX_UDP_H)
LINUX_UNIX_DIAG_H:
$(call check_header,linux/unix_diag.h,HAVE_LINUX_UNIX_DIAG_H)
LINUX_USBDEVICE_FS_H:
$(call check_header,linux/usbdevice_fs.h,HAVE_LINUX_USBDEVICE_FS_H)
LINUX_USERFAULTFD_H:
$(call check_header,linux/userfaultfd.h,HAVE_LINUX_USERFAULTFD_H)
LINUX_VERSION_H:
$(call check_header,linux/version.h,HAVE_LINUX_VERSION_H)
LINUX_VIDEODEV2_H:
$(call check_header,linux/videodev2.h,HAVE_LINUX_VIDEODEV2_H)
LINUX_VT_H:
$(call check_header,linux/vt.h,HAVE_LINUX_VT_H)
LINUX_WATCHDOG_H:
$(call check_header,linux/watchdog.h,HAVE_LINUX_WATCHDOG_H)
LOCALE_H:
$(call check_header,locale.h,HAVE_LOCALE_H)
MALLOC_H:
$(call check_header,malloc.h,HAVE_MALLOC_H)
MNTENT_H:
$(call check_header,mntent.h,HAVE_MNTENT_H)
MQUEUE_H:
$(call check_header,mqueue.h,HAVE_MQUEUE_H)
POLL_H:
$(call check_header,poll.h,HAVE_POLL_H)
PTHREAD_NP_H:
$(call check_header,pthread_np.h,HAVE_PTHREAD_NP_H)
SCSI_SCSI_H:
$(call check_header,scsi/scsi.h,HAVE_SCSI_SCSI_H)
SCSI_SCSI_IOCTL_H:
$(call check_header,scsi/scsi_ioctl.h,HAVE_SCSI_SCSI_IOCTL_H)
SCSI_SG_H:
$(call check_header,scsi/sg.h,HAVE_SCSI_SG_H)
SEMAPHORE_H:
$(call check_header,semaphore.h,HAVE_SEMAPHORE_H)
STRINGS_H:
$(call check_header,strings.h,HAVE_STRINGS_H)
SOUND_ASOUND_H:
$(call check_header,sound/asound.h,HAVE_SOUND_ASOUND_H)
SPAWN_H:
$(call check_header,spawn.h,HAVE_SPAWN_H)
SYSLOG_H:
$(call check_header,syslog.h,HAVE_SYSLOG_H)
SYS_APPARMOR_H:
$(call check_header,sys/apparmor.h,HAVE_SYS_APPARMOR_H)
SYS_AUXV_H:
$(call check_header,sys/auxv.h,HAVE_SYS_AUXV_H)
SYS_CAPABILITY_H:
$(call check,test-cap,HAVE_SYS_CAPABILITY_H,sys/capability.h)
SYS_EPOLL_H:
$(call check_header,sys/epoll.h,HAVE_SYS_EPOLL_H)
SYS_EVENTFD_H:
$(call check_header,sys/eventfd.h,HAVE_SYS_EVENTFD_H)
SYS_FANOTIFY_H:
$(call check_header,sys/fanotify.h,HAVE_SYS_FANOTIFY_H)
SYS_FSUID_H:
$(call check_header,sys/fsuid.h,HAVE_SYS_FSUID_H)
SYS_INOTIFY_H:
$(call check_header,sys/inotify.h,HAVE_SYS_INOTIFY_H)
SYS_IO_H:
$(call check_header,sys/io.h,HAVE_SYS_IO_H)
SYS_IPC_H:
$(call check_header,sys/ipc.h,HAVE_SYS_IPC_H)
SYS_LOADAVG_H:
$(call check_header,sys/loadavg.h,HAVE_SYS_LOADAVG_H)
SYS_MOUNT_H:
$(call check_header,sys/mount.h,HAVE_SYS_MOUNT_H)
SYS_MSG_H:
$(call check_header,sys/msg.h,HAVE_SYS_MSG_H)
SYS_PARAM_H:
$(call check_header,sys/param.h,HAVE_SYS_PARAM_H)
SYS_PERSONALITY_H:
$(call check_header,sys/personality.h,HAVE_SYS_PERSONALITY_H)
SYS_PLATFORM_PPC_H:
$(call check_header,sys/platform/ppc.h,HAVE_SYS_PLATFORM_PPC_H)
SYS_PRCTL_H:
$(call check_header,sys/prctl.h,HAVE_SYS_PRCTL_H)
SYS_RANDOM_H:
$(call check_header,sys/random.h,HAVE_SYS_RANDOM_H)
SYS_SYSCTL_H:
$(call check_header,sys/sysctl.h,HAVE_SYS_SYSCTL_H)
SYS_TREE_H:
$(call check_header,sys/tree.h,HAVE_SYS_TREE_H)
SYS_QUEUE_H:
$(call check_header,sys/queue.h,HAVE_SYS_QUEUE_H)
SYS_QUOTA_H:
$(call check_header,sys/quota.h,HAVE_SYS_QUOTA_H)
SYS_SELECT_H:
$(call check_header,sys/select.h,HAVE_SYS_SELECT_H)
SYS_SENDFILE_H:
$(call check_header,sys/sendfile.h,HAVE_SYS_SENDFILE_H)
SYS_SHM_H:
$(call check_header,sys/shm.h,HAVE_SYS_SHM_H)
SYS_SIGNALFD_H:
$(call check_header,sys/signalfd.h,HAVE_SYS_SIGNALFD_H)
SYS_STATFS_H:
$(call check_header,sys/statfs.h,HAVE_SYS_STATFS_H)
SYS_STATVFS_H:
$(call check_header,sys/statvfs.h,HAVE_SYS_STATVFS_H)
SYS_SWAP_H:
$(call check_header,sys/swap.h,HAVE_SYS_SWAP_H)
SYSCALL_H:
$(call check_header,sys/syscall.h,HAVE_SYSCALL_H)
SYS_SYSINFO_H:
$(call check_header,sys/sysinfo.h,HAVE_SYS_SYSINFO_H)
SYS_SYSMACROS_H:
$(call check_header,sys/sysmacros.h,HAVE_SYS_SYSMACROS_H)
SYS_TIMERFD_H:
$(call check_header,sys/timerfd.h,HAVE_SYS_TIMERFD_H)
SYS_TIMEX_H:
$(call check_header,sys/timex.h,HAVE_SYS_TIMEX_H)
SYS_UIO_H:
$(call check_header,sys/uio.h,HAVE_SYS_UIO_H)
SYS_UCRED_H:
$(call check_header,sys/ucred.h,HAVE_SYS_UCRED_H)
SYS_UN_H:
$(call check_header,sys/un.h,HAVE_SYS_UN_H)
SYS_UTSNAME_H:
$(call check_header,sys/utsname.h,HAVE_SYS_UTSNAME_H)
SYS_VFS_H:
$(call check_header,sys/vfs.h,HAVE_SYS_VFS_H)
SYS_VMMETER_H:
$(call check_header,sys/vmmeter.h,HAVE_SYS_VMMETER_H)
SYS_XATTR_H:
$(call check_header,sys/xattr.h,HAVE_SYS_XATTR_H)
TERMIO_H:
$(call check_header,termio.h,HAVE_TERMIO_H)
TERMIOS_H:
$(call check_header,termios.h,HAVE_TERMIOS_H)
NET_IF_H:
$(call check_header,net/if.h,HAVE_NET_IF_H)
NETINET_IP_H:
$(call check_header,netinet/ip.h,HAVE_NETINET_IP_H)
NETINET_IP_ICMP_H:
$(call check_header,netinet/ip_icmp.h,HAVE_NETINET_IP_ICMP_H)
NETINET_SCTP_H:
$(call check_header,netinet/sctp.h,HAVE_NETINET_SCTP_H)
NETINET_TCP_H:
$(call check_header,netinet/tcp.h,HAVE_NETINET_TCP_H)
UCONTEXT_H:
$(call check_header,ucontext.h,HAVE_UCONTEXT_H)
USTAT_H:
$(call check_header,ustat.h,HAVE_USTAT_H)
UTIME_H:
$(call check_header,utime.h,HAVE_UTIME_H)
XMMINTRIN_H:
$(call check_header,xmmintrin.h,HAVE_XMMINTRIN_H)
XXHASH_H:
$(call check_header,xxhash.h,HAVE_XXHASH_H)
cpufeatures: \
configdir \
ALIGNED_64 ALIGNED_128 ALIGNED_64K ATTRIBUTE_FALLTHROUGH ASM_MB ASM_X86_CLDEMOTE \
ASM_X86_CLFLUSH ASM_X86_CLFLUSHOPT ASM_X86_CLWB ASM_PPC64_DARN ASM_RISCV_FENCE \
LABEL_AS_VALUE ASM_NOP ASM_NOTHING ASM_X86_PAUSE ASM_X86_TPAUSE PRAGMA \
PRAGMA_INSIDE ASM_X86_RDRAND ASM_X86_RDSEED RESTRICT ASM_ARM_YIELD \
TARGET_CLONES TARGET_CLONES_MMX TARGET_CLONES_AVX TARGET_CLONES_AVX2 \
TARGET_CLONES_SSE TARGET_CLONES_SSE2 TARGET_CLONES_SSE3 TARGET_CLONES_SSSE3 \
TARGET_CLONES_SSE4_1 TARGET_CLONES_SSE4_2 TARGET_CLONES_SKYLAKE_AVX512 \
TARGET_CLONES_TIGERLAKE TARGET_CLONES_SAPPHIRERAPIDS TARGET_CLONES_ALDERLAKE \
TARGET_CLONES_ROCKETLAKE TARGET_CLONES_POWER9 VLA_ARG VECMATH
ALIGNED_64:
$(call check,test-aligned-64,HAVE_ALIGNED_64,64 byte alignment attribute)
ALIGNED_128:
$(call check,test-aligned-128,HAVE_ALIGNED_128,128 byte alignment attribute)
ALIGNED_64K:
$(call check,test-aligned-64K,HAVE_ALIGNED_64K,64K byte alignment attribute)
ATTRIBUTE_FALLTHROUGH:
$(call check,test-attr-fallthrough,HAVE_ATTRIBUTE_FALLTHROUGH,__attribute__((fallthrough)))
ASM_MB:
$(call check,test-asm-mb,HAVE_ASM_MB,memory barrier)
ASM_X86_CLDEMOTE:
$(call check,test-asm-x86-cldemote,HAVE_ASM_X86_CLDEMOTE,cldemote instruction (x86))
ASM_X86_CLFLUSH:
$(call check,test-asm-x86-clflush,HAVE_ASM_X86_CLFLUSH,clflush instruction (x86))
ASM_X86_CLFLUSHOPT:
$(call check,test-asm-x86-clflushopt,HAVE_ASM_X86_CLFLUSHOPT,clflushopt instruction (x86))
ASM_X86_CLWB:
$(call check,test-asm-x86-clwb,HAVE_ASM_X86_CLWB,clwb instruction (x86))
ASM_PPC64_DARN:
$(call check,test-asm-ppc64-darn,HAVE_ASM_PPC64_DARN,darn instruction (power9))
ASM_RISCV_FENCE:
$(call check,test-asm-riscv-fence,HAVE_ASM_RISCV_FENCE,fence instruction (RISC-V))
LABEL_AS_VALUE:
$(call check,test-label-as-value,HAVE_LABEL_AS_VALUE,label as value feature)
ASM_NOP:
$(call check,test-asm-nop,HAVE_ASM_NOP,nop instruction)
ASM_NOTHING:
$(call check,test-asm-nothing,HAVE_ASM_NOTHING,asm(\"\"))
ASM_X86_PAUSE:
$(call check,test-asm-x86-pause,HAVE_ASM_X86_PAUSE,pause instruction (x86))
ASM_X86_TPAUSE:
$(call check,test-asm-x86-tpause,HAVE_ASM_X86_TPAUSE,tpause instruction (x86))
FAST_MATH:
$(call check,test-mathfunc,HAVE_FAST_MATH,-ffast-math,-lm,-DMATHFUNC=sin,,-ffast-math)
PRAGMA:
$(call check,test-pragma,HAVE_PRAGMA,pragma push/pop)
PRAGMA_INSIDE:
$(call check,test-pragma,HAVE_PRAGMA_INSIDE,pragma inside functions)
ASM_X86_RDRAND:
$(call check,test-asm-x86-rdrand,HAVE_ASM_X86_RDRAND,rdrand instruction (x86))
ASM_X86_RDSEED:
$(call check,test-asm-x86-rdseed,HAVE_ASM_X86_RDSEED,rdseed instruction (x86))
RESTRICT:
$(call check,test-__restrict,HAVE___RESTRICT,__restrict keyword)
ASM_ARM_YIELD:
$(call check,test-asm-arm-yield,HAVE_ASM_ARM_YIELD,yield instruction (ARM))
TARGET_CLONES:
$(call check,test-target-clones,HAVE_TARGET_CLONES,target_clones attribute,,,'"default"')
TARGET_CLONES_MMX:
$(call check,test-target-clones,HAVE_TARGET_CLONES_MMX,target_clones mmx attribute (x86),,,'"default$(comma)mmx"')
TARGET_CLONES_AVX:
$(call check,test-target-clones,HAVE_TARGET_CLONES_AVX,target_clones avx attribute (x86),,,'"default$(comma)avx"')
TARGET_CLONES_AVX2:
$(call check,test-target-clones,HAVE_TARGET_CLONES_AVX2,target_clones avx2 attribute (x86),,,'"default$(comma)avx2"')
TARGET_CLONES_SSE:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SSE,target_clones sse attribute (x86),,,'"default$(comma)sse"')
TARGET_CLONES_SSE2:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SSE2,target_clones sse2 attribute (x86),,,'"default$(comma)sse2"')
TARGET_CLONES_SSE3:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SSE3,target_clones sse3 attribute (x86),,,'"default$(comma)sse3"')
TARGET_CLONES_SSSE3:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SSSE3,target_clones ssse3 attribute (x86),,,'"default$(comma)ssse3"')
TARGET_CLONES_SSE4_1:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SSE4_1,target_clones sse4_1 attribute (x86),,,'"default$(comma)sse4.1"')
TARGET_CLONES_SSE4_2:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SSE4_2,target_clones sse4_2 attribute (x86),,,'"default$(comma)sse4.2"')
TARGET_CLONES_SKYLAKE_AVX512:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SKYLAKE_AVX512,target_clones arch=skylake-avx512 attribute (x86),,,'"default$(comma)arch=skylake-avx512"')
TARGET_CLONES_TIGERLAKE:
$(call check,test-target-clones,HAVE_TARGET_CLONES_TIGERLAKE,target_clones arch=tigerlake attribute (x86),,,'"default$(comma)arch=tigerlake"')
TARGET_CLONES_SAPPHIRERAPIDS:
$(call check,test-target-clones,HAVE_TARGET_CLONES_SAPPHIRERAPIDS,target_clones arch=sapphirerapids attribute (x86),,,'"default$(comma)arch=sapphirerapids"')
TARGET_CLONES_ALDERLAKE:
$(call check,test-target-clones,HAVE_TARGET_CLONES_ALDERLAKE,target_clones arch=alderlake attribute (x86),,,'"default$(comma)arch=alderlake"')
TARGET_CLONES_ROCKETLAKE:
$(call check,test-target-clones,HAVE_TARGET_CLONES_ROCKETLAKE,target_clones arch=rocketlake attribute (x86),,,'"default$(comma)arch=rocketlake"')
TARGET_CLONES_POWER9:
$(call check,test-target-clones,HAVE_TARGET_CLONES_POWER9,target_clones cpu=power9 attribute (power9),,,'"default$(comma)cpu=power9"')
VECMATH:
$(call check_vecmath,stress-vecmath,HAVE_VECMATH,vector math)
VLA_ARG:
$(call check,test-vla-arg,HAVE_VLA_ARG,variable length array function args)
types: \
configdir \
COMPLEX DATTR_T DVD_AUTHINFO DVD_STRUCT FLOAT_DECIMAL32 FLOAT_DECIMAL64 \
FLOAT_DECIMAL128 FLOAT16 FLOAT32 FLOAT64 FLOAT80 FLOAT128 ITIMER_WHICH_T \
INO64_T INT128_T KERNEL_LONG_T KERNEL_ULONG_T LANDLOCK_RULE_TYPE LOFF_T \
MODE_T OFF_T OFF64_T PID_TYPE PRIORITY_WHICH_T PTHREAD_MUTEX_T \
PTHREAD_MUTEXATTR_T PTRACE_REQUEST RLIMIT_RESOURCE_T RUSAGE_WHO CDROM_BLK \
CDROM_MCN CDROM_MSF CDROM_READ_AUDIO CDROM_SUBCHNL CDROM_TI CDROM_TOCENTRY \
CDROM_TOCHDR CDROM_VOLCTRL CONSOLEFONTDESC DM_IOCTL FLOPPY_FDC_STATE \
FLOPPY_DRIVE_STRUCT FLOPPY_STRUCT FSVERITY_DIGEST FSVERITY_ENABLE_ARG \
FSXATTR_STRUCT IFCONF ICMPHDR KBDIACRS KBENTRY KBKEYCODE KBSENTRY \
LANDLOCK_RULESET_ATTR MEDIA_DEVICE_INFO MSGINFO MTRR_GENTRY MTRR_SENTRY \
OPEN_HOW RTC_PARAM RUSAGE_RU_MINFLT RUSAGE_RU_NVCSW \
SECCOMP_NOTIF_SIZES SERIAL_ICOUNTER SERIAL_STRUCT SHMID_DS SHMINFO \
SND_CTL_CARD_INFO SND_CTL_TLV SOCKADDR_UN TERMIOS UNIMAPDESC \
USBDEVFS_GETDRIVER USER_DESC UTIMBUF VT_CONSIZE VT_MODE VT_SIZES \
VT_STAT V4L2_AUDIO V4L2_AUDIOOUT V4L2_CAPABILITY V4L2_DV_TIMINGS \
V4L2_ENC_IDX V4L2_FRAMEBUFFER V4L2_JPEGCOMPRESSION V4L2_STD_ID V2DI \
WINSIZE
COMPLEX:
$(call check,test-complex,HAVE_COMPLEX,complex)
DATTR_T:
$(call check,test-daddr_t,HAVE_DADDR_T,daddr_t)
DVD_AUTHINFO:
$(call check,test-dvd_authinfo,HAVE_DVD_AUTHINFO,dvd_authinfo)
DVD_STRUCT:
$(call check,test-dvd_struct,HAVE_DVD_STRUCT,dvd_struct)
FLOAT_DECIMAL32:
$(call check_float,_Decimal32,HAVE_FLOAT_DECIMAL32,float decimal32)
FLOAT_DECIMAL64:
$(call check_float,_Decimal64,HAVE_FLOAT_DECIMAL64,float decimal64)
FLOAT_DECIMAL128:
$(call check_float,_Decimal128,HAVE_FLOAT_DECIMAL128,float decimal128)
FLOAT16:
$(call check_float,__fp16,HAVE_FLOAT16,float16)
FLOAT32:
$(call check_float,_Float32,HAVE_FLOAT32,float32)
FLOAT64:
$(call check_float,_Float64,HAVE_FLOAT64,float64)
FLOAT80:
$(call check_float,__float80,HAVE_FLOAT80,float80)
FLOAT128:
$(call check_float,__float128,HAVE_FLOAT128,float128)
ITIMER_WHICH_T:
$(call check,test-itimer_which_t,HAVE_ITIMER_WHICH_T,__itimer_which_t)
INO64_T:
$(call check,test-ino64_t,HAVE_INO64_T,ino64_t)
INT128_T:
$(call check,test-int128_t,HAVE_INT128_T,int128_t)
KERNEL_LONG_T:
$(call check,test-kernel_long_t,HAVE_KERNEL_LONG_T,__kernel_long_t)
KERNEL_ULONG_T:
$(call check,test-kernel_ulong_t,HAVE_KERNEL_ULONG_T,__kernel_ulong_t)
LANDLOCK_RULE_TYPE:
$(call check,test-landlock_rule_type,HAVE_LANDLOCK_RULE_TYPE,landlock_rule_type)