Skip to content

Commit d8a79ce

Browse files
committed
Adding -fPIC flag for builds on Rocky.
1 parent 3956816 commit d8a79ce

File tree

1 file changed

+2
-2
lines changed
  • hdk/cl/examples/cl_sde/software/runtime

1 file changed

+2
-2
lines changed

hdk/cl/examples/cl_sde/software/runtime/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GLOBAL_SDE_OFFSET := -DGLOBAL_SDE_OFFSET=0x0
3838
GLOBAL_ATG_OFFSET := -DGLOBAL_ATG_OFFSET=0x0
3939

4040
OPT := -DFPGA_ALLOW_NON_ROOT -DCONFIG_LOGLEVEL=1 $(GLOBAL_SDE_OFFSET) $(GLOBAL_ATG_OFFSET)
41-
LIB_CFLAGS := $(OPT) -g -Wall -Werror -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes $(INCLUDES) -fvisibility=hidden -mavx2 -MMD -MP
41+
LIB_CFLAGS := $(OPT) -g -Wall -Werror -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes $(INCLUDES) -fvisibility=hidden -mavx2 -MMD -MP -fPIC
4242
EXAMPLE_CFLAGS := $(OPT) -g -Wall -Werror -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes $(INCLUDES)
4343
SRCS := $(wildcard $(SDE_SRC_DIR)/*.c)
4444
SDE_EXAMPLES := sde_c2h_perf_test sde_h2c_perf_test sde_c2h_simple sde_h2c_simple sde_loopback_simple sde_c2h_user_buffers sde_loopback_perf_test
@@ -86,7 +86,7 @@ install_sde_lib: $(SDELIB_SO)
8686

8787
$(SDELIB_SO): $(OBJS)
8888
mkdir -p $(SDE_LIB_SO_DIR)
89-
$(CC) -o $(SDELIB_SO) $(LIBCFLAGS) -shared $(OBJS) -Wl,-soname,libsde.so.1
89+
$(CC) -o $(SDELIB_SO) $(LIB_CFLAGS) -shared $(OBJS) -Wl,-soname,libsde.so.1
9090

9191
$(SDE_SRC_DIR)/%.o: $(SDE_SRC_DIR)/%.c
9292
$(CC) $(LIB_CFLAGS) -c $< -o $@

0 commit comments

Comments
 (0)