dist: fix mlnx driver compile error on oc9
When building kernel rpm on oc9, will have error as below: cc1: error: code model kernel does not support PIC mode OFED_topdir/BUILD/mlnx-ofa_kernel-23.10/obj/default/compat/main.o] Error 1 Signed-off-by: Jianping Liu <frankjpliu@tencent.com> Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
parent
63e2660c48
commit
4d78ab6896
|
@ -1215,7 +1215,7 @@ BuildInstMLNXOFED() {
|
|||
|
||||
# We need to jump the root privilege because we'll assign a normal tmpdir
|
||||
sed -i 's/$UID -ne 0/! -z $JUMP_ROOT/g' mlnx_add_kernel_support.sh
|
||||
if [ "${DISTRO}" == "tl4" ]; then
|
||||
if [ "${DISTRO}" != "tl3" ]; then
|
||||
sed -i '/# Check for needed packages by install.pl/a sed -i "s/rpmbuild --rebuild/rpmbuild --define '\''rhel 9'\'' --define '\''_lto_cflags -fno-lto'\'' --define '\''_hardened_cflags -fPIE'\'' --rebuild/g" ${ofed}/install.pl' mlnx_add_kernel_support.sh
|
||||
fi
|
||||
sed -i 's/\(ex ${ofed}\/install\.pl\)/\1 --without-mlnx-nvme/g' mlnx_add_kernel_support.sh
|
||||
|
|
Loading…
Reference in New Issue