summaryrefslogblamecommitdiffstats
path: root/linux/linux-support.mk
blob: 6756e87fbfc502d53542ec4ab456e10e02efd616 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                     





                                                       

                 

                  





                    
             







                         

                  







                         

                

              
                 

                    
             

                  


                          
             



                                                                                                      

                                                              


                         
                         
                        
                        











                                                            












                                                                            
# See LICENSE file for copyright and license details.

LINUX_VERSION = 6.6
# Changing this number can potentially break the build,
# silently or violently, so make sure everything still
# works afterwards

SUPPORTED_LINUX_ARCHES =\
	ALPHA_LE\
	ALPHA_BE\
	AMD64\
	AMD64_X32\
	ARM_OABI_LE\
	ARM_OABI_BE\
	ARM_EABI_LE\
	ARM_EABI_BE\
	IA64_LE\
	IA64_BE\
	M68K\
	MICROBLAZE_32_LE\
	MICROBLAZE_32_BE\
	MIPS_O32_LE\
	MIPS_O32_BE\
	MIPS_N32_LE\
	MIPS_N32_BE\
	MIPS_N64_LE\
	MIPS_N64_BE\
	PARISC_32\
	PARISC_64\
	POWERPC_32_LE\
	POWERPC_32_BE\
	POWERPC_64_LE\
	POWERPC_64_BE\
	POWERPC_NOSPU_LE\
	POWERPC_NOSPU_BE\
	POWERPC_SPU_LE\
	POWERPC_SPU_BE\
	S390_32\
	S390_64\
	SH_LE\
	SH_BE\
	SPARC_32\
	SPARC_64_LE\
	SPARC_64_BE\
	I386\
	XTENSA_LE\
	XTENSA_BE

OPERATING_SYSTEMS += linux
NPARAMS += 8
NFIELDS += 60


SUPPORTED_LINUX_ARCHES != printf '%s\n' $(SUPPORTED_LINUX_ARCHES) $(SUPPORTED_ARCHES) | sort | uniq -d

TEST_ENV += SUPPORTED_LINUX_ARCHES="$(SUPPORTED_LINUX_ARCHES)"


include linux/download.mk
include linux/errors.mk
include linux/integers.mk
include linux/signals.mk
include linux/structs.mk
include linux/syscalls.mk
include linux/syscall-table.mk
include linux/symbols.mk
include linux/types.mk


HDR += generated/linux-arches.h

generated/linux-arches.h: linux/linux-support.mk
	mkdir -p -- generated
	(printf '\43define LIST_LINUX_ARCHES(X, D)\\\n' && \
	 printf '\tX(%s) D\\\n' $(SUPPORTED_LINUX_ARCHES); \
	) | sed '/X()/d' | sed '$$s/\\$$//' | sed '$$s/ D$$//' > $@
	(printf '\43define LIST_LINUX_ARCHES_WITH_BIENDIAN(X, D)\\\n' && \
	 printf '\tX(%s) D\\\n' $(SUPPORTED_LINUX_ARCHES) \
	 | sed -n 's/_LE)/)/p'; \
	) | sed '/X()/d' | sed '$$s/\\$$//' | sed '$$s/ D$$//' >> $@
	(printf '\43define LIST_LINUX_ARCHES_WITH_UNIENDIAN(X, D)\\\n' && \
	 printf '\tX(%s) D\\\n' $(SUPPORTED_LINUX_ARCHES); \
	) | sed '/_[LB]E)/d' \
	| sed '/X()/d' | sed '$$s/\\$$//' | sed '$$s/ D$$//' >> $@
	(printf '\43define LIST_LINUX_ARCHES_WITHOUT_ENDIANS(X, D)\\\n' && \
	 printf '\tX(%s) D\\\n' $(SUPPORTED_LINUX_ARCHES); \
	) | sed 's/_[LB]E)/)/' | uniq \
	| sed '/X()/d' | sed '$$s/\\$$//' | sed '$$s/ D$$//' >> $@