Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/flex: really disable flex program
@ 2017-09-29 13:47 Yann E. MORIN
  2017-09-29 13:49 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2017-09-29 13:47 UTC (permalink / raw)
  To: buildroot

Commit c128c5f3c7 (flex: Fix segfault of stage1flex when host has glibc
2.26 or newer) introduced an autoreconf of flex, but forgot to properly
account for the quirky way the flex program is disabled.

So far, we used to sed-out the bin_PROGRAMS from Makefile.in. But now
that we autoreconf, Makefile.in gets regenerated, and this breaks the
build on noMMU systems.

Since we autoreconf, let's add a patch to remove the flex binary
altogether.

Fixes:
    http://autobuild.buildroot.org/results/f70/f70b39632535bb9692d0a032166b2f4104532967/
    http://autobuild.buildroot.org/results/525/52567afdfe7992b3518de0e01227ba14aa300f21/
    [...]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Adrian Perez de Castro <aperez@igalia.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 .../0003-build-never-build-the-flex-program.patch  | 42 ++++++++++++++++++++++
 package/flex/flex.mk                               | 11 ------
 2 files changed, 42 insertions(+), 11 deletions(-)
 create mode 100644 package/flex/0003-build-never-build-the-flex-program.patch

diff --git a/package/flex/0003-build-never-build-the-flex-program.patch b/package/flex/0003-build-never-build-the-flex-program.patch
new file mode 100644
index 0000000000..550df179c9
--- /dev/null
+++ b/package/flex/0003-build-never-build-the-flex-program.patch
@@ -0,0 +1,42 @@
+From 097a4408b83a0bf8c584bbe4fe0239581b183732 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Fri, 29 Sep 2017 15:41:14 +0200
+Subject: [PATCH] build: never build the flex program
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Upstream status: not suitable, only for Buildroot.
+---
+ Makefile.am     | 4 ----
+ src/Makefile.am | 1 -
+ 2 files changed, 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9db3420..3d61159 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -58,8 +58,4 @@ ChangeLog: $(srcdir)/tools/git2cl
+ indent:
+ 	cd src && $(MAKE) $(AM_MAKEFLAGS) indent
+ 
+-install-exec-hook:
+-	cd $(DESTDIR)$(bindir) && \
+-		$(LN_S) -f flex$(EXEEXT) flex++$(EXEEXT)
+-
+ .PHONY: ChangeLog indent
+diff --git a/src/Makefile.am b/src/Makefile.am
+index e379692..29d7560 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -4,7 +4,6 @@ LIBS = @LIBS@
+ 
+ m4 = @M4@
+ 
+-bin_PROGRAMS = flex
+ if ENABLE_BOOTSTRAP
+ noinst_PROGRAMS = stage1flex
+ endif
+-- 
+2.11.0
+
diff --git a/package/flex/flex.mk b/package/flex/flex.mk
index aeac4ada87..f550ce499c 100644
--- a/package/flex/flex.mk
+++ b/package/flex/flex.mk
@@ -20,16 +20,5 @@ FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4 \
 
 HOST_FLEX_DEPENDENCIES = host-m4
 
-define FLEX_DISABLE_PROGRAM
-	$(SED) 's/^bin_PROGRAMS.*//' $(@D)/src/Makefile.in
-endef
-FLEX_POST_PATCH_HOOKS += FLEX_DISABLE_PROGRAM
-
-# flex++ symlink is broken when flex binary is not installed
-define FLEX_REMOVE_BROKEN_SYMLINK
-	rm -f $(TARGET_DIR)/usr/bin/flex++
-endef
-FLEX_POST_INSTALL_TARGET_HOOKS += FLEX_REMOVE_BROKEN_SYMLINK
-
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.11.0

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

* [Buildroot] [PATCH] package/flex: really disable flex program
  2017-09-29 13:47 [Buildroot] [PATCH] package/flex: really disable flex program Yann E. MORIN
@ 2017-09-29 13:49 ` Thomas Petazzoni
  2017-09-29 14:04   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2017-09-29 13:49 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 29 Sep 2017 15:47:09 +0200, Yann E. MORIN wrote:

> diff --git a/package/flex/0003-build-never-build-the-flex-program.patch b/package/flex/0003-build-never-build-the-flex-program.patch
> new file mode 100644
> index 0000000000..550df179c9
> --- /dev/null
> +++ b/package/flex/0003-build-never-build-the-flex-program.patch
> @@ -0,0 +1,42 @@
> +From 097a4408b83a0bf8c584bbe4fe0239581b183732 Mon Sep 17 00:00:00 2001
> +From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +Date: Fri, 29 Sep 2017 15:41:14 +0200
> +Subject: [PATCH] build: never build the flex program

This will also disable the build of flex the program in host-flex,
which is not good: we want host-flex to install the flex program.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/flex: really disable flex program
  2017-09-29 13:49 ` Thomas Petazzoni
@ 2017-09-29 14:04   ` Yann E. MORIN
  2017-09-29 14:15     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2017-09-29 14:04 UTC (permalink / raw)
  To: buildroot

On 2017-09-29 15:49 +0200, Thomas Petazzoni spake thusly:
> Hello,
> 
> On Fri, 29 Sep 2017 15:47:09 +0200, Yann E. MORIN wrote:
> 
> > diff --git a/package/flex/0003-build-never-build-the-flex-program.patch b/package/flex/0003-build-never-build-the-flex-program.patch
> > new file mode 100644
> > index 0000000000..550df179c9
> > --- /dev/null
> > +++ b/package/flex/0003-build-never-build-the-flex-program.patch
> > @@ -0,0 +1,42 @@
> > +From 097a4408b83a0bf8c584bbe4fe0239581b183732 Mon Sep 17 00:00:00 2001
> > +From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > +Date: Fri, 29 Sep 2017 15:41:14 +0200
> > +Subject: [PATCH] build: never build the flex program
> 
> This will also disable the build of flex the program in host-flex,
> which is not good: we want host-flex to install the flex program.

Right, I missed that in turn.

I guess I'll have to early-port your flex patch instead... Sigh...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] package/flex: really disable flex program
  2017-09-29 14:04   ` Yann E. MORIN
@ 2017-09-29 14:15     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-09-29 14:15 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 29 Sep 2017 16:04:05 +0200, Yann E. MORIN wrote:

> > This will also disable the build of flex the program in host-flex,
> > which is not good: we want host-flex to install the flex program.  
> 
> Right, I missed that in turn.
> 
> I guess I'll have to early-port your flex patch instead... Sigh...

There's a reason why I added a --disable-something option in the first
place :)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-09-29 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 13:47 [Buildroot] [PATCH] package/flex: really disable flex program Yann E. MORIN
2017-09-29 13:49 ` Thomas Petazzoni
2017-09-29 14:04   ` Yann E. MORIN
2017-09-29 14:15     ` Thomas Petazzoni

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