交叉编译arm架构时出错

时间:2018-04-04 05:23:21

标签: compiler-errors linux-kernel arm driver cross-compiling

我在我的系统上运行Linux操作系统。我已成功交叉编译linux内核4.9.11 for arm arch,现在我正试图在x86平台上交叉编译一个用于arm架构的wifi驱动程序。 我设置了KERNEL DIRECTORY = cross compiled kernel directory和&amp; make ARCH=arm CROSS_COMPILE=~/imx/boot/gcc-linaro-6.4.1-2017.11-i686_arm-linux-gnueabi/bin/arm-linux-gnueabi- KERNELDIR=~/linux-stable/ Build drivers cd /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers && make ARCH=i386 CROSS_COMPILE= make[1]: Entering directory '/home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers' /bin/sh: 1: [: -gt: argument expected make ARCH=i386 CROSS_COMPILE= -C /lib/modules/4.9.11+/build SUBDIRS=/home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new clean make[2]: Entering directory '/home/wlan-3/linux-stable' CLEAN /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/.tmp_versions make[2]: Leaving directory '/home/wlan-3/linux-stable' make ARCH=i386 CROSS_COMPILE= -C /lib/modules/4.9.11+/build SUBDIRS=/home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new KBUILD_EXTRA_SYMBOLS=/Module.symvers modules WLAN_ROOT=/home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/"qcacld-new" MODNAME=wlan CONFIG_QCA_WIFI_ISOC=0 CONFIG_QCA_WIFI_2_0=1 CONFIG_QCA_CLD_WLAN=m WLAN_OPEN_SOURCE=1 CONFIG_CLD_HL_SDIO_CORE=y CONFIG_LINUX_QCMBR=y make[2]: Entering directory '/home/wlan-3/linux-stable' LD /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/built-in.o CC [M] /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.o In file included from ./arch/x86/include/asm/bitops.h:16:0, from ./include/linux/bitops.h:36, from ./include/linux/kernel.h:10, from ./include/linux/list.h:8, from ./include/linux/module.h:9, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight64’: ./arch/x86/include/asm/arch_hweight.h:54:42: error: expected ‘:’ or ‘)’ before ‘POPCNT64’ asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT) ^ ./arch/x86/include/asm/alternative.h:132:28: note: in definition of macro ‘ALTINSTR_REPLACEMENT’ b_replacement(num)":\n\t" newinstr "\n" e_replacement(num) ":\n\t" ^ ./arch/x86/include/asm/arch_hweight.h:54:7: note: in expansion of macro ‘ALTERNATIVE’ asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT) ^ In file included from ./arch/x86/include/asm/atomic.h:268:0, from ./include/linux/atomic.h:4, from ./include/linux/jump_label.h:169, from ./arch/x86/include/asm/string_64.h:5, from ./arch/x86/include/asm/string.h:4, from ./include/linux/string.h:18, from ./arch/x86/include/asm/page_32.h:34, from ./arch/x86/include/asm/page.h:13, from ./arch/x86/include/asm/thread_info.h:11, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/atomic64_64.h: At top level: ./arch/x86/include/asm/atomic64_64.h:19:40: error: unknown type name ‘atomic64_t’ static inline long atomic64_read(const atomic64_t *v) ^ In file included from ./include/uapi/linux/stddef.h:1:0, from ./include/linux/stddef.h:4, from ./include/uapi/linux/posix_types.h:4, from ./include/uapi/linux/types.h:13, from ./include/linux/types.h:5, from ./include/linux/list.h:4, from ./include/linux/module.h:9, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_read’: ./arch/x86/include/asm/atomic64_64.h:21:22: error: request for member ‘counter’ in something not a structure or union return READ_ONCE((v)->counter); ^ ./include/linux/compiler.h:305:17: note: in definition of macro ‘__READ_ONCE’ union { typeof(x) __val; char __c[1]; } __u; \ ^ ./arch/x86/include/asm/atomic64_64.h:21:9: note: in expansion of macro ‘READ_ONCE’ return READ_ONCE((v)->counter); ^ ./arch/x86/include/asm/atomic64_64.h:21:22: error: request for member ‘counter’ in something not a structure or union return READ_ONCE((v)->counter); ^ ./include/linux/compiler.h:307:22: note: in definition of macro ‘__READ_ONCE’ __read_once_size(&(x), __u.__c, sizeof(x)); \ ^ ./arch/x86/include/asm/atomic64_64.h:21:9: note: in expansion of macro ‘READ_ONCE’ return READ_ONCE((v)->counter); ^ ./arch/x86/include/asm/atomic64_64.h:21:22: error: request for member ‘counter’ in something not a structure or union return READ_ONCE((v)->counter); ^ ./include/linux/compiler.h:307:42: note: in definition of macro ‘__READ_ONCE’ __read_once_size(&(x), __u.__c, sizeof(x)); \ ^ ./arch/x86/include/asm/atomic64_64.h:21:9: note: in expansion of macro ‘READ_ONCE’ return READ_ONCE((v)->counter); ^ ./arch/x86/include/asm/atomic64_64.h:21:22: error: request for member ‘counter’ in something not a structure or union return READ_ONCE((v)->counter); ^ ./include/linux/compiler.h:309:30: note: in definition of macro ‘__READ_ONCE’ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ ^ ./arch/x86/include/asm/atomic64_64.h:21:9: note: in expansion of macro ‘READ_ONCE’ return READ_ONCE((v)->counter); ^ ./arch/x86/include/asm/atomic64_64.h:21:22: error: request for member ‘counter’ in something not a structure or union return READ_ONCE((v)->counter); ^ ./include/linux/compiler.h:309:50: note: in definition of macro ‘__READ_ONCE’ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ ^ ./arch/x86/include/asm/atomic64_64.h:21:9: note: in expansion of macro ‘READ_ONCE’ return READ_ONCE((v)->counter); In file included from ./include/linux/jump_label.h:169:0, from ./arch/x86/include/asm/string_64.h:5, from ./arch/x86/include/asm/string.h:4, from ./include/linux/string.h:18, from ./arch/x86/include/asm/page_32.h:34, from ./arch/x86/include/asm/page.h:13, from ./arch/x86/include/asm/thread_info.h:11, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/linux/atomic.h:1000:49: error: unknown type name ‘atomic64_t’ static inline void atomic64_andnot(long long i, atomic64_t *v) ^ ./include/linux/atomic.h:1005:60: error: unknown type name ‘atomic64_t’ static inline long long atomic64_fetch_andnot(long long i, atomic64_t *v) ^ ./include/linux/atomic.h:1010:68: error: unknown type name ‘atomic64_t’ static inline long long atomic64_fetch_andnot_relaxed(long long i, atomic64_t *v) ^ ./include/linux/atomic.h:1015:68: error: unknown type name ‘atomic64_t’ static inline long long atomic64_fetch_andnot_acquire(long long i, atomic64_t *v) ^ ./include/linux/atomic.h:1020:68: error: unknown type name ‘atomic64_t’ static inline long long atomic64_fetch_andnot_release(long long i, atomic64_t *v) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:288:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopud.h:15:0: error: "PUD_SHIFT" redefined [-Werror] #define PUD_SHIFT PGDIR_SHIFT ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:34:0: note: this is the location of the previous definition #define PUD_SHIFT 30 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:288:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopud.h:16:0: error: "PTRS_PER_PUD" redefined [-Werror] #define PTRS_PER_PUD 1 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:35:0: note: this is the location of the previous definition #define PTRS_PER_PUD 512 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:288:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopud.h:17:0: error: "PUD_SIZE" redefined [-Werror] #define PUD_SIZE (1UL << PUD_SHIFT) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:51:0: note: this is the location of the previous definition #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:288:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopud.h:18:0: error: "PUD_MASK" redefined [-Werror] #define PUD_MASK (~(PUD_SIZE-1)) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:52:0: note: this is the location of the previous definition #define PUD_MASK (~(PUD_SIZE - 1)) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:309:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopmd.h:19:0: error: "PMD_SHIFT" redefined [-Werror] #define PMD_SHIFT PUD_SHIFT ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:41:0: note: this is the location of the previous definition #define PMD_SHIFT 21 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:309:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopmd.h:20:0: error: "PTRS_PER_PMD" redefined [-Werror] #define PTRS_PER_PMD 1 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:42:0: note: this is the location of the previous definition #define PTRS_PER_PMD 512 ^ In file included from ./arch/x86/include/asm/pgtable_types.h:309:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./include/asm-generic/pgtable-nopmd.h:21:0: error: "PMD_SIZE" redefined [-Werror] #define PMD_SIZE (1UL << PMD_SHIFT) ^ In file included from ./arch/x86/include/asm/pgtable_types.h:240:0, from ./arch/x86/include/asm/processor.h:18, from ./arch/x86/include/asm/cpufeature.h:4, from ./arch/x86/include/asm/thread_info.h:52, from ./include/linux/thread_info.h:58, from ./arch/x86/include/asm/preempt.h:6, from ./include/linux/preempt.h:59, from ./include/linux/spinlock.h:50, from ./include/linux/seqlock.h:35, from ./include/linux/time.h:5, from ./include/linux/stat.h:18, from ./include/linux/module.h:10, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/drivers/qcacld-new/CORE/HDD/inc/wlan_hdd_includes.h:48, from /home/wlan-3/qca/qca9377-le-2-3-3_qca_oem.git/wlan_host/cnss_proc/fixce/AIO/build/../drivers/qcacld-new/CORE/HDD/src/wlan_hdd_assoc.c:50: ./arch/x86/include/asm/pgtable_64_types.h:49:0: note: this is the location of the previous definition #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) env&amp;通过{{1}}。即使在指定ARCH之后,也会引用x86文件。我收到了以下错误。如果我遗失了什么,有人能指出我吗?由于字符限制,我只更新半日志。

{{1}}

1 个答案:

答案 0 :(得分:1)

以下是我的输出和make文件 那么请你发布Makefile或同样进行更改。

$ make FOO=test
echo test
test
$ cat Makefile 

all:
    echo $(FOO)

或者,如果你不想分享,那么也可以试试这个在makefile中添加新条目说测试 像

test:
    echo $(ARCH) $(CROSS_COMPILE)

然后使用

$ make test ARCH=arm CROSS_COMPILE=/home/test