package/libtomcrypt: add pkgconfig support
PATCH v2 1/2 package/libtomcrypt: add pkgconfig support
---
Changes v1 -> v2:
- use libtomcrypt provided libtomcrypt.pc.in template file
--- package/libtomcrypt/libtomcrypt.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/libtomcrypt/libtomcrypt.mk +4 -0
@@ -27,6 +27,10 @@ define LIBTOMCRYPT_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" \ PREFIX=/usr NODOCS=1 INSTALL_USER=$(shell id -u) \ INSTALL_GROUP=$(shell id -g) install + sed -e 's,^prefix=.*,prefix=/usr,' \ + -e 's,^Version:.*,Version: $(LIBTOMCRYPT_VERSION),' \ + $(@D)/libtomcrypt.pc.in \ + > $(STAGING_DIR)/usr/lib/pkgconfig/libtomcrypt.pc endef $(eval $(generic-package))
Signature · 1 line
2.31.1
PATCH v2 2/2 package/libtomcrypt: compile with -fPIC to enable linking to dynamic libraries/exectuables
Fixes:
.../x86_64-buildroot-linux-gnu/bin/ld: .../host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libtomcrypt.a(md5.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
---
Changes v1 -> v2:
- add -fPIC only for non static builds (suggested by Arnout Vandecappelle)
--- package/libtomcrypt/libtomcrypt.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/libtomcrypt/libtomcrypt.mk +4 -0
@@ -19,6 +19,10 @@ LIBTOMCRYPT_IGNORE_CVES += CVE-2019-17362 LIBTOMCRYPT_CFLAGS = -I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC +ifeq ($(BR2_STATIC_LIBS),) +LIBTOMCRYPT_CFLAGS += -fPIC +endif + define LIBTOMCRYPT_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBTOMCRYPT_CFLAGS)" endef
Signature · 1 line
2.31.1
Arnout Vandecappelle
AppliedPATCH v2 2/2 package/libtomcrypt: compile with -fPIC to enable linking to dynamic libraries/exectuables
Quoted 5 lines · Peter Seiderer
Fixes:
.../x86_64-buildroot-linux-gnu/bin/ld: .../host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libtomcrypt.a(md5.o): relocation
R_X86_64_32against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPICSigned-off-by Peter Seiderer <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 23 lines
---
Changes v1 -> v2:
- add -fPIC only for non static builds (suggested by Arnout Vandecappelle)--- package/libtomcrypt/libtomcrypt.mk | 4 ++++ 1 file changed, 4 insertions(+)package/libtomcrypt/libtomcrypt.mk +4
-0@@ -19,6 +19,10 @@ LIBTOMCRYPT_IGNORE_CVES += CVE-2019-17362 LIBTOMCRYPT_CFLAGS = -I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC +ifeq ($(BR2_STATIC_LIBS),) +LIBTOMCRYPT_CFLAGS += -fPIC +endif + define LIBTOMCRYPT_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBTOMCRYPT_CFLAGS)" endef
PATCH v2 2/2 package/libtomcrypt: compile with -fPIC to enable linking to dynamic libraries/exectuables
In reply to Peter SeidererQuoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
Fixes:
.../x86_64-buildroot-linux-gnu/bin/ld: .../host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libtomcrypt.a(md5.o): relocationR_X86_64_32against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPICSigned-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- add -fPIC only for non static builds (suggested by Arnout Vandecappelle)
Committed to 2021.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/2 package/libtomcrypt: add pkgconfig support
In reply to Peter SeidererQuoted 13 lines · Peter Seiderer
Signed-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- use libtomcrypt provided libtomcrypt.pc.in template file--- package/libtomcrypt/libtomcrypt.mk | 4 ++++ 1 file changed, 4 insertions(+)package/libtomcrypt/libtomcrypt.mk +0
-0
package/libtomcrypt/libtomcrypt.mk define LIBTOMCRYPT_INSTALL_STAGING_CMDS · line 33
Quoted 7 lines
package/libtomcrypt/libtomcrypt.mk +4
-0@@ -27,6 +27,10 @@ define LIBTOMCRYPT_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" \ PREFIX=/usr NODOCS=1 INSTALL_USER=$(shell id -u) \ INSTALL_GROUP=$(shell id -g) install + sed -e 's,^prefix=.*,prefix=/usr,' \ + -e 's,^Version:.*,Version: $(LIBTOMCRYPT_VERSION),' \ + $(@D)/libtomcrypt.pc.in \ + > $(STAGING_DIR)/usr/lib/pkgconfig/libtomcrypt.pc
What about the option of using makefile.unix so we don't have to do this ourselves?
I've kept the patch as New in patchwork in case you don't see that as feasible.
Regards,
Arnout
Quoted 4 lines
package/libtomcrypt/libtomcrypt.mk +0
-0endef $(eval $(generic-package))
PATCH v2 1/2 package/libtomcrypt: add pkgconfig support
Hello Arnout,
Quoted 9 lines · Arnout Vandecappelle
Quoted 8 lines · Peter Seiderer
Signed-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- use libtomcrypt provided libtomcrypt.pc.in template file--- package/libtomcrypt/libtomcrypt.mk | 4 ++++ 1 file changed, 4 insertions(+)
Quoted 15 lines
package/libtomcrypt/libtomcrypt.mk define LIBTOMCRYPT_INSTALL_STAGING_CMDS · line 33
Quoted 12 lines
package/libtomcrypt/libtomcrypt.mk +4
-0@@ -27,6 +27,10 @@ define LIBTOMCRYPT_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" \ PREFIX=/usr NODOCS=1 INSTALL_USER=$(shell id -u) \ INSTALL_GROUP=$(shell id -g) install + sed -e 's,^prefix=.*,prefix=/usr,' \ + -e 's,^Version:.*,Version: $(LIBTOMCRYPT_VERSION),' \ + $(@D)/libtomcrypt.pc.in \ + > $(STAGING_DIR)/usr/lib/pkgconfig/libtomcrypt.pcWhat about the option of using makefile.unix so we don't have to do this ourselves?
Quick compare (with additional line breaks):
- makefile:
.../host/bin/x86_64-buildroot-linux-gnu-gcc
-I./src/headers/
-Wall -Wsign-compare -Wshadow
-DLTC_SOURCE
-Wextra -Wsystem-headers -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wwrite-strings -Wno-type-limits -O3 -funroll-loops -fomit-frame-pointer -DGIT_VERSION=\"1.18.2\" -I./src/headers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -DLTC_SOURCE -DLTM_DESC -fPIC -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes.o
- makefile.unix:
.../host/bin/x86_64-buildroot-linux-gnu-gcc
-Isrc/headers -Itests -DLTC_SOURCE
-I./src/headers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -DLTC_SOURCE -DLTM_DESC -fPIC -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes.o
Seems to cut down a lot of warning flags (and an overwritten optimize flag), but seems to miss the version define...
Quoted 1 line
I've kept the patch as New in patchwork in case you don't see that as feasible.
Will give the makefile.unix a try (and see if the install works as expected)...
Regards,
Peter
Quoted 12 lines
Regards,
Arnoutpackage/libtomcrypt/libtomcrypt.mk define LIBTOMCRYPT_INSTALL_STAGING_CMDS · line 36
Quoted 4 lines
package/libtomcrypt/libtomcrypt.mk +0
-0endef $(eval $(generic-package))_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot