libbpf: Compile in PIC mode only for shared library case
Libbpf compiles .o's for static and shared library modes separately, so no need to specify -fPIC for both. Keep it only for shared library mode. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20200929220604.833631-3-andriin@fb.com
This commit is contained in:
Родитель
0a62291d69
Коммит
b0efc216f5
|
@ -104,13 +104,12 @@ endif
|
|||
# Append required CFLAGS
|
||||
override CFLAGS += $(EXTRA_WARNINGS) -Wno-switch-enum
|
||||
override CFLAGS += -Werror -Wall
|
||||
override CFLAGS += -fPIC
|
||||
override CFLAGS += $(INCLUDES)
|
||||
override CFLAGS += -fvisibility=hidden
|
||||
override CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
|
||||
# flags specific for shared library
|
||||
SHLIB_FLAGS := -DSHARED
|
||||
SHLIB_FLAGS := -DSHARED -fPIC
|
||||
|
||||
ifeq ($(VERBOSE),1)
|
||||
Q =
|
||||
|
|
Загрузка…
Ссылка в новой задаче