mirror of https://github.com/F-Stack/f-stack.git
example: remove pkg-config in Makefile.
Because pkg-config(version before 0.28) reordered -Wl,--whole-archive -Wl,--no-whole-archive not to surround the dpdk libraries, so we remove pkg-config and do it ourselves.
This commit is contained in:
parent
afba4e3b40
commit
8745404160
|
@ -1,8 +1,14 @@
|
||||||
LIBS = $(shell pkg-config --define-variable=TOPDIR=${CURDIR}/.. --libs f-stack.pc)
|
LIBS+= -L${FF_PATH}/lib -L${FF_DPDK}/lib -Wl,--whole-archive,-lfstack,--no-whole-archive
|
||||||
|
LIBS+= -g -Wl,--no-as-needed -fvisibility=default -pthread -lm -lrt
|
||||||
|
LIBS+= -Wl,--whole-archive -lrte_pmd_vmxnet3_uio -lrte_pmd_i40e -lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ring
|
||||||
|
LIBS+= -Wl,--whole-archive -lrte_hash -lrte_kvargs -Wl,-lrte_mbuf -lethdev -lrte_eal -Wl,-lrte_mempool
|
||||||
|
LIBS+= -lrte_ring -lrte_cmdline -lrte_cfgfile -lrte_kni -lrte_timer -Wl,-lrte_pmd_virtio
|
||||||
|
LIBS+= -Wl,--no-whole-archive -lrt -lm -ldl -lm -lcrypto
|
||||||
|
|
||||||
TARGET="helloworld"
|
TARGET="helloworld"
|
||||||
all:
|
all:
|
||||||
cc -O -gdwarf-2 -I../lib -o ${TARGET} main.c ${LIBS}
|
cc -O -gdwarf-2 -I../lib -o ${TARGET} main.c ${LIBS}
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o ${TARGET}
|
rm -f *.o ${TARGET}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
DPDK = ${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
|
|
||||||
|
|
||||||
Name: F-Stack
|
|
||||||
Description: F-Stack pkg-config pc
|
|
||||||
Version: 1.0
|
|
||||||
Libs: -L../lib -Wl,--whole-archive,-lfstack,--no-whole-archive -Wl,--no-as-needed -fvisibility=default -pthread -lm -lrt -L${DPDK}/lib -Wl,--whole-archive -lrte_pmd_vmxnet3_uio -lrte_pmd_i40e -lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ring -Wl,--whole-archive -lrte_hash -lrte_kvargs -Wl,-lrte_mbuf -lethdev -lrte_eal -Wl,-lrte_mempool -lrte_ring -lrte_cmdline -lrte_cfgfile -lrte_kni -lrte_timer -Wl,-lrte_pmd_virtio -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto
|
|
||||||
Cflags: -Wall -Werror -include ${DPDK}/include/rte_config.h -I${DPDK}/include -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
|
|
Loading…
Reference in New Issue