Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/lz4: fix static build
@ 2022-10-28 16:48 Fabrice Fontaine
  2022-10-30 11:09 ` Thomas Petazzoni via buildroot
  2022-11-08 19:56 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-10-28 16:48 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following static build failure raised since bump to version
1.9.4 in commit 1f54af8c4f814bfc0993756b82575ad581ce5318:

compiling dynamic library 1.9.4
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/m68k-buildroot-uclinux-uclibc/bin/ld.real: /home/giuliobenetti/autobuild/run/instance-0/output-1/host/m68k-buildroot-uclinux-uclibc/sysroot/usr/lib/crt1.o: in function `_start':
(.text+0x1c): undefined reference to `main'

Fixes:
 - http://autobuild.buildroot.org/results/9187852fb7a869bf5595275d47929632659a4407

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-build-Support-BUILD_SHARED-no.patch  | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/lz4/0001-build-Support-BUILD_SHARED-no.patch

diff --git a/package/lz4/0001-build-Support-BUILD_SHARED-no.patch b/package/lz4/0001-build-Support-BUILD_SHARED-no.patch
new file mode 100644
index 0000000000..d2d8639a3b
--- /dev/null
+++ b/package/lz4/0001-build-Support-BUILD_SHARED-no.patch
@@ -0,0 +1,42 @@
+From 5ccbd38277989ae6a728171d59ae03bad6f2f4d5 Mon Sep 17 00:00:00 2001
+From: Fotis Xenakis <foxen@windowslive.com>
+Date: Tue, 13 Sep 2022 20:09:36 +0300
+Subject: [PATCH] build: Support BUILD_SHARED=no
+
+Since e585a438c714652e866a59371b287f52aa4d2dc3, the BUILD_SHARED
+Makefile variable only takes effect for the install target (i.e. the
+shared libraries always built). This restores the original behaviour.
+
+[Retrieved from:
+https://github.com/lz4/lz4/commit/5ccbd38277989ae6a728171d59ae03bad6f2f4d5]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ lib/Makefile | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 06503cb2a..ee262c0df 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -112,17 +112,21 @@ liblz4-dll.o: liblz4-dll.rc
+ 	$(WINDRES) -i liblz4-dll.rc -o liblz4-dll.o
+ 
+ $(LIBLZ4): $(SRCFILES) liblz4-dll.o
++ifeq ($(BUILD_SHARED),yes)
+ 	@echo compiling dynamic library $(LIBVER)
+ 	$(CC) $(FLAGS) -DLZ4_DLL_EXPORT=1 -shared $^ -o dll/$@.dll -Wl,--out-implib,dll/$(LIBLZ4_EXP)
++endif
+ 
+ else   # not windows
+ 
+ $(LIBLZ4): $(SRCFILES)
++ifeq ($(BUILD_SHARED),yes)
+ 	@echo compiling dynamic library $(LIBVER)
+ 	$(CC) $(FLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@
+ 	@echo creating versioned links
+ 	$(LN_SF) $@ liblz4.$(SHARED_EXT_MAJOR)
+ 	$(LN_SF) $@ liblz4.$(SHARED_EXT)
++endif
+ 
+ endif
+ 
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/lz4: fix static build
  2022-10-28 16:48 [Buildroot] [PATCH 1/1] package/lz4: fix static build Fabrice Fontaine
@ 2022-10-30 11:09 ` Thomas Petazzoni via buildroot
  2022-11-08 19:56 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-30 11:09 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

On Fri, 28 Oct 2022 18:48:00 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following static build failure raised since bump to version
> 1.9.4 in commit 1f54af8c4f814bfc0993756b82575ad581ce5318:
> 
> compiling dynamic library 1.9.4
> /home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/m68k-buildroot-uclinux-uclibc/bin/ld.real: /home/giuliobenetti/autobuild/run/instance-0/output-1/host/m68k-buildroot-uclinux-uclibc/sysroot/usr/lib/crt1.o: in function `_start':
> (.text+0x1c): undefined reference to `main'
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/9187852fb7a869bf5595275d47929632659a4407
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../0001-build-Support-BUILD_SHARED-no.patch  | 42 +++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 package/lz4/0001-build-Support-BUILD_SHARED-no.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/lz4: fix static build
  2022-10-28 16:48 [Buildroot] [PATCH 1/1] package/lz4: fix static build Fabrice Fontaine
  2022-10-30 11:09 ` Thomas Petazzoni via buildroot
@ 2022-11-08 19:56 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-11-08 19:56 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following static build failure raised since bump to version
 > 1.9.4 in commit 1f54af8c4f814bfc0993756b82575ad581ce5318:

 > compiling dynamic library 1.9.4
 > /home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/m68k-buildroot-uclinux-uclibc/bin/ld.real:
 > /home/giuliobenetti/autobuild/run/instance-0/output-1/host/m68k-buildroot-uclinux-uclibc/sysroot/usr/lib/crt1.o:
 > in function `_start':
 > (.text+0x1c): undefined reference to `main'

 > Fixes:
 >  - http://autobuild.buildroot.org/results/9187852fb7a869bf5595275d47929632659a4407

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.08.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-08 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-28 16:48 [Buildroot] [PATCH 1/1] package/lz4: fix static build Fabrice Fontaine
2022-10-30 11:09 ` Thomas Petazzoni via buildroot
2022-11-08 19:56 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox