libwd/0002-uadk-fix-static-build-error.patch
Zhangfei Gao 783b00bebc libwd: update to 2.6.0
use openssl 1.1

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
2024-02-01 07:45:21 +00:00

37 lines
1.4 KiB
Diff

From e50c7b8ab28696c904afa86741a4b6951c90b0b3 Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@linaro.org>
Date: Wed, 10 Jan 2024 13:33:18 +0000
Subject: [PATCH 2/8] uadk: fix static build error
static build fail on both ubuntu and openEuler
/usr/bin/ld: ../.libs/libwd_comp.a(wd_comp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../.libs/libwd_comp.a(wd_comp.o)(.text+0x84): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
Solved by adding -fPIC
The -fPIC option in GCC stands for "Position Independent Code."
When this option is used, the generated machine code is not dependent
on being located at a specific address in order to work
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index a369b7e..51691cb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,7 +86,7 @@ libhisi_sec_la_SOURCES=drv/hisi_sec.c drv/hisi_qm_udrv.c \
libhisi_hpre_la_SOURCES=drv/hisi_hpre.c drv/hisi_qm_udrv.c \
hisi_qm_udrv.h wd_hpre_drv.h
if WD_STATIC_DRV
-AM_CFLAGS += -DWD_STATIC_DRV
+AM_CFLAGS += -DWD_STATIC_DRV -fPIC
AM_CFLAGS += -DWD_NO_LOG
libwd_la_LIBADD = $(libwd_la_OBJECTS) -ldl -lnuma
--
2.25.1