Skip to content

Commit cd591a4

Browse files
shinae-woomelvinw
authored andcommitted
Do not build dpdk with fPIC options
- This option added before to resolve the issues from older version of gcc (gcc-5, gcc-6), which defaultly enable pie mode. This bug had been fixed on the newer version of gcc. - If stack protector option enabled on kernel (CC_STACKPROTECTOR_STRONG, or STACKPROTECTOR_STRONG), pie is not allowed. This is defaultly enabled on many of recent Debian-family distros, so The option `-fPIC` triggers an build error for some driver modules (e.g., kmoe, igb_uio) - To support default kernel option for stack protector, and as a fact that PIE is not default for recent version of gcc anymore, we can remove fPIC from the option. - Still build with old gcc versions on newer kernel have a chance to failure, in that case, multiple options may available (though, I didn't test those options by myself) 1) upgrade gcc to newer version 2) override DPDK_CFLAGS to set -fPIC 3) disable STACKPROTECTOR_STRONG from kernel config 4) disable PIE option on KBUILD_CFLAGS (--no-pie)
1 parent ea848dd commit cd591a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def cmd(cmd, quiet=False, shell=False):
9595
kernel_release = cmd('uname -r', quiet=True).strip()
9696

9797
DPDK_DIR = '%s/%s' % (DEPS_DIR, DPDK_VER)
98-
DPDK_CFLAGS = '"-g -w -fPIC"'
98+
DPDK_CFLAGS = '"-g -w"'
9999
DPDK_CONFIG = '%s/build/.config' % DPDK_DIR
100100

101101
extra_libs = set()

0 commit comments

Comments
 (0)