Lines Matching +full:debian +full:- +full:clang
1 # SPDX-License-Identifier: GPL-2.0
8 UNAME_M := $(shell uname -m)
9 CAN_BUILD_I386 := $(shell ./check_cc.sh "$(CC)" trivial_32bit_program.c -m32)
11 CAN_BUILD_WITH_NOPIE := $(shell ./check_cc.sh "$(CC)" trivial_program.c -no-pie)
38 CFLAGS := -O2 -g -std=gnu99 -pthread -Wall $(KHDR_INCLUDES)
42 CFLAGS += -no-pie
45 # clang only wants to see -no-pie during linking. Here, we don't have a separate
48 CFLAGS += -Wno-unused-command-line-argument
52 define gen-target-rule-32
57 define gen-target-rule-64
65 EXTRA_CFLAGS += -DCAN_BUILD_32
66 $(foreach t,$(TARGETS_C_32BIT_ALL),$(eval $(call gen-target-rule-32,$(t))))
72 EXTRA_CFLAGS += -DCAN_BUILD_64
73 $(foreach t,$(TARGETS_C_64BIT_ALL),$(eval $(call gen-target-rule-64,$(t))))
83 $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $< $(EXTRA_FILES) -lrt -ldl -lm
86 $(CC) -m64 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $< $(EXTRA_FILES) -lrt -ldl
88 # x86_64 users should be encouraged to install 32-bit libraries
93 @echo "Warning: you seem to have a broken 32-bit build" 2>&1; \
94 echo "environment. This will reduce test coverage of 64-bit" 2>&1; \
95 echo "kernels. If you are using a Debian-like distribution," 2>&1; \
98 echo " apt-get install gcc-multilib libc6-i386 libc6-dev-i386"; \
100 echo "If you are using a Fedora-like distribution, try:"; \
102 echo " yum install glibc-devel.*i686"; \
104 echo "If you are using a SUSE-like distribution, try:"; \
106 echo " zypper install gcc-32bit glibc-devel-static-32bit"; \
113 # the dependencies ("header3.h"), because clang, unlike gcc, will not accept
115 define extra-files
120 $(eval $(call extra-files,sysret_ss_attrs_64,thunks.S))
121 $(eval $(call extra-files,ptrace_syscall_32,raw_syscall_helper_32.S))
122 $(eval $(call extra-files,test_syscall_vdso_32,thunks_32.S))
123 $(eval $(call extra-files,fsgsbase_restore_64,clang_helpers_64.S))
124 $(eval $(call extra-files,fsgsbase_restore_32,clang_helpers_32.S))
125 $(eval $(call extra-files,sysret_rip_64,clang_helpers_64.S))
130 $(OUTPUT)/check_initial_reg_state_32: CFLAGS += -Wl,-ereal_start -static
131 $(OUTPUT)/check_initial_reg_state_64: CFLAGS += -Wl,-ereal_start -static
133 $(OUTPUT)/nx_stack_32: CFLAGS += -Wl,-z,noexecstack
134 $(OUTPUT)/nx_stack_64: CFLAGS += -Wl,-z,noexecstack
136 $(OUTPUT)/avx_64: CFLAGS += -mno-avx -mno-avx512f