Fedora 20에서는 제조업체에서 제공한 특정 PCI Express 직렬 포트 카드용 Linux 드라이버를 설치해야 합니다. 이를 위해서는 드라이버의 소스 코드를 컴파일해야 합니다. 소스 코드 디렉터리에서 "make" 명령을 실행하면 다음 오류가 발생합니다.
[root@localhost driver]# make
make[1]: Entering directory `/usr/src/kernels/3.16.6-203.fc20.i686+PAE'
Makefile:649: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make[1]: *** No rule to make target `Tech'. Stop.
make[1]: Leaving directory `/usr/src/kernels/3.16.6-203.fc20.i686+PAE'
make: *** [modules] Error 2
"Makefile" 파일은 다음과 같습니다:
# Comment/uncomment the following line to enable/disable debugging
DEBUG = y
KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DSCULLV_DEBUG -DDEBUG # "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif
EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC) -DLINUX
TARGET = cti_serial_core
get_variable = $(strip $(shell grep "^[[:space:]]*$(1)[[:space:]]*=\{1\}[[:space:]]*" $(2) | cut -d= -f2))
# NOTE: In the call there can be *no* whitespace after the comma
VERSION := $(call get_variable,VERSION,$(KERNEL_DIR)/Makefile)
PATCHLEVEL := $(call get_variable,PATCHLEVEL,$(KERNEL_DIR)/Makefile)
SUBLEVEL := $(call get_variable,SUBLEVEL,$(KERNEL_DIR)/Makefile)
EXTRAVERSION := $(call get_variable,EXTRAVERSION,$(KERNEL_DIR)/Makefile)
LOCALVERSION := $(call get_variable,LOCALVERSION,$(KERNEL_DIR)/.config)
KERNELRELEASE := $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
ifneq ($(KERNELRELEASE),)
cti_serial_core-objs := serial_core.o 8250_core.o
cti_8250_pci-objs := 8250_pci.o
obj-m := cti_serial_core.o
obj-m += cti_8250_pci.o
else
KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
endif
all: modules
install: modules_install
#DEPMOD : = depmod
modules modules_install clean::
@$(MAKE) -C $(KERNEL_DIR) M=$(PWD) $@
Linux 커널 버전은 다음과 같습니다.
[root@localhost driver]# uname -r
3.16.6-203.fc20.i686+PAE
gcc 컴파일러 버전은 다음과 같습니다.
[root@localhost driver]# gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.8.3/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-i686-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-i686-redhat-linux/cloog-install --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)
이 드라이버를 컴파일하려면 이 문제를 어떻게 해결해야 합니까?