Merge pull request #10110 from heitbaum/flex2

flex: use flex:host stage1flex when building scan.c from scan.l
This commit is contained in:
Christian Hewitt 2025-06-02 18:38:13 +04:00 committed by GitHub
commit e178658249
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View File

@ -9,13 +9,14 @@ PKG_LICENSE="GPL"
PKG_SITE="https://github.com/westes/flex" PKG_SITE="https://github.com/westes/flex"
PKG_URL="https://github.com/westes/flex/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_URL="https://github.com/westes/flex/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="ccache:host m4:host autotools:host bison:host" PKG_DEPENDS_HOST="ccache:host m4:host autotools:host bison:host"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain flex:host"
PKG_LONGDESC="A tool for generating programs that perform pattern-matching on text." PKG_LONGDESC="A tool for generating programs that perform pattern-matching on text."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
PKG_CONFIGURE_OPTS_HOST="--enable-static --disable-shared --disable-rpath --with-gnu-ld" PKG_CONFIGURE_OPTS_HOST="--enable-static --disable-shared --disable-rpath --with-gnu-ld"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_realloc_0_nonnull=yes \ PKG_CONFIGURE_OPTS_TARGET="--disable-bootstrap \
ac_cv_func_realloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes" ac_cv_func_malloc_0_nonnull=yes"
post_makeinstall_host() { post_makeinstall_host() {

View File

@ -0,0 +1,11 @@
--- a/src/Makefile.am 2025-05-25 13:43:29.363027456 +0000
+++ b/src/Makefile.am 2025-05-25 13:44:38.701129436 +0000
@@ -100,7 +100,7 @@
./stage1flex$(EXEEXT) $(AM_LFLAGS) $(LFLAGS) -o $@ $(srcdir)/scan.l
else
stage1scan.c: scan.c
- sed 's|^\(#line .*\)"'`printf %s $< | sed 's|[][\\\\.*]|\\\\&|g'`'"|\1"$@"|g' $< > $@
+ ../../.$(HOST_NAME)/src/stage1flex$(EXEEXT) $(AM_LFLAGS) $(LFLAGS) -o $@ $(srcdir)/scan.l
endif
dist-hook: scan.l flex$(EXEEXT)