mk: fix bsd module build

When building shared libs (for both GCC and CLANG targets), -fPIC flag
has been added to CFLAGS and leaks to BSD module build system causing
the following error:

fatal error: error in backend: Cannot select: 0x802ad8010: i64 = X86ISD::WrapperRIP 0x802ade110
      [ID=13]
  0x802ade110: i64 = TargetGlobalAddress<i8** @__stack_chk_guard> 0 [TF=5] [ID=10]

Reset CFLAGS to MODULE_CFLAGS before building BSD module.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
Sergio Gonzalez Monroy 2014-10-30 16:58:54 +00:00 committed by Thomas Monjalon
parent 0a88485379
commit 9867fd3261

View File

@ -47,6 +47,7 @@ include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk
# DPDK uses a more up-to-date gcc, so clear the override here.
unexport CC
override CFLAGS = $(MODULE_CFLAGS)
# VPATH contains at least SRCDIR
VPATH += $(SRCDIR)