diff mbox series

pkgconf: disable building shared libraries

Message ID 20201225010126.25296-1-rosenp@gmail.com
State Rejected, archived
Headers show
Series pkgconf: disable building shared libraries | expand

Commit Message

Rosen Penev Dec. 25, 2020, 1:01 a.m. UTC
pkgconf uses libpkgconf. disabling shared libraries makes it be linked
statically. Helps to avoid issues regarding finding the library with a
wrong rpath. Nothing uses libpkgconf anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 tools/pkgconf/Makefile | 3 +++
 1 file changed, 3 insertions(+)

Comments

Hauke Mehrtens Dec. 28, 2020, 9:49 p.m. UTC | #1
On 12/25/20 2:01 AM, Rosen Penev wrote:
> pkgconf uses libpkgconf. disabling shared libraries makes it be linked
> statically. Helps to avoid issues regarding finding the library with a
> wrong rpath. Nothing uses libpkgconf anyway.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Should this fix the build problem with the glibc SDK on ARC HS CPUs?
https://downloads.openwrt.org/snapshots/faillogs/arc_archs/base/libubox/host-compile.txt

Your change look more like a workaround to me, I would prefer if we find 
the root cause and fix that. I tried to reproduce this locally, but for 
me it worked, but I do not know exactly how the build bot uses the SDK.

Hauke
Rosen Penev Dec. 28, 2020, 11:34 p.m. UTC | #2
On Mon, Dec 28, 2020 at 1:49 PM Hauke Mehrtens <hauke@hauke-m.de> wrote:
>
> On 12/25/20 2:01 AM, Rosen Penev wrote:
> > pkgconf uses libpkgconf. disabling shared libraries makes it be linked
> > statically. Helps to avoid issues regarding finding the library with a
> > wrong rpath. Nothing uses libpkgconf anyway.
> >
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
>
> Should this fix the build problem with the glibc SDK on ARC HS CPUs?
> https://downloads.openwrt.org/snapshots/faillogs/arc_archs/base/libubox/host-compile.txt
Yes. Although only one of them.
>
> Your change look more like a workaround to me, I would prefer if we find
> the root cause and fix that. I tried to reproduce this locally, but for
> me it worked, but I do not know exactly how the build bot uses the SDK.
Root cause seems to be bundle-libraries.sh.

I still think this change is correct. Less linking is always good.
>
> Hauke
>
diff mbox series

Patch

diff --git a/tools/pkgconf/Makefile b/tools/pkgconf/Makefile
index 0f56de0e29..23e6fdf5f3 100644
--- a/tools/pkgconf/Makefile
+++ b/tools/pkgconf/Makefile
@@ -21,6 +21,9 @@  unexport PKG_CONFIG
 
 HOSTCC := $(HOSTCC_NOCACHE)
 
+HOST_CONFIGURE_ARGS += \
+	--disable-shared
+
 define Host/Install
 	$(MAKE) -C $(HOST_BUILD_DIR) install
 	mv $(STAGING_DIR_HOST)/bin/pkgconf $(STAGING_DIR_HOST)/bin/pkg-config.real