[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-04 Thread Jannick
Follow-up Comment #8, sr #110360 (project autoconf):

[comment #7 comment #7:]
> The CPU names never contain underscores, do they? 
No, there are CPUs containing an underscore. 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110312] 2.69b: broken AC_PROG_LEX macro

2020-11-04 Thread Jannick
Follow-up Comment #10, sr #110312 (project autoconf):

@Zack: I cannot reproduce the issue either. For both autoconf 2.69 and 2.69b
the tiny configure.ac below yields (wih flex 2.6.4): 

checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... -lfl
checking whether yytext is a pointer... yes


For autoconf 2.69d:

checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking for library containing yywrap... -lfl
checking whether yytext is a pointer... yes

Anything I can do? I guess it would be best to get the config.logs from
Tomasz's runs for autoconf 2.69 and 2.69b to see what was happening. 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-04 Thread Jannick
Follow-up Comment #3, sr #110360 (project autoconf):

As of now AC_CANONICAL_HOST, AC_CANONICAL_BUILD and AC_CANONICAL_TARGET expect
pure triplets.  The latest config.sub might return a triplet or a quadruplet
(see the header of config.sub).  It appears unlikely that a cpu having a dash
can meet the 3/4-plet nomenclature requirements in any way. 

Victor, this *evil* hackery might do the job in your case:  Add in
configure.ac (right below AC_CANONICAL_HOST)

# override host_cpu in in special case (having dash)
AS_IF([test "x$host_cpu" = 'xcortex_a53'],[host_cpu=cortex-a53])
AC_SUBST([host_cpu])

and smuggle the artificial triplet 'cortex_a53--' (with _vendor_
and _os_ set appropriately) into autoconf like so

./configure --build=cortex_a53--   


@Zack:  Not sure if AC_CONONICAL_HOST and cousins should be prepared to be
able to digest also quadruplets config.sub might generate?

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110312] 2.69b: broken AC_PROG_LEX macro

2020-11-03 Thread Jannick
Follow-up Comment #8, sr #110312 (project autoconf):

In order to mimic flex's '%option noyywrap', the generated scanner code
(inserted between the first and second %%) needs a declaration (or definition)
of yywrap _before_ the first %%:

Applying

 
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index e289a018..b352ce24 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -746,6 +746,9 @@ fi])])
 # declares yytext as a char * by default.
 AC_DEFUN([_AC_PROG_LEX_YYTEXT_DECL],
 [cat >conftest.l <<_ACEOF[
+%{
+int yywrap(void);
+%}
 %%
 a { ECHO; }
 b { REJECT; }

to

$ git describe
v2.69c-18-gf1047b2e 

(NB: this excludes the commit 46f384f850, 'Revert to 2.69-compatible behavior
in AC_PROG_LEX') 

makes configure print (for Zack's test configure.ac below)

checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[PATCH] bug fix - AS_IF with blank false branch

2019-12-25 Thread Jannick
Please find attached suggested patches for your consideration and review.

Bug fix for

AS_IF([false],[echo OK],[[]])

yielding the syntactically incorrect shell code:

if false; then :
  echo OK
else

fi


I hope that sending patches to the list as attachments is OK and they will
come through to the list.

Thanks,
J.
>From f38a8134c63a6bf5fbd1d7a33f85387e0864b188 Mon Sep 17 00:00:00 2001
From: Jannick 
Date: Thu, 26 Dec 2019 03:06:29 +0100
Subject: [PATCH 2/2] m4sh/AS_IF: bug fix of previous buggy test case

* lib/m4sugar/m4sh.m4: replace `else' by `else :' in `_AS_IF_ELSE'.
---
 lib/m4sugar/m4sh.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index d7e41673..4d357107 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -637,7 +637,7 @@ then :
 ])
 m4_define([_AS_IF_ELSE],
 [m4_ifnblank([$1],
-[else
+[else :
   $1
 ])])
 
-- 
2.24.1.windows.2

>From 4e55d3bfe31c4f869b2fb110140b379fe803c5ec Mon Sep 17 00:00:00 2001
From: Jannick 
Date: Thu, 26 Dec 2019 02:53:01 +0100
Subject: [PATCH 1/2] m4sh/AS_IF: add a buggy test for AS_IF with blank false
 branch

The test

make check TESTSUITEFLAGS='-e -k m4sh,m4_map_args_pair'

fails, since m4sh generates from

AS_IF([false], [echo OK], [[]])

the syntactically incorrect shell code

if false; then :
  echo OK
else

fi

* tests/m4sh.at: add test `AS_IF([false], [:], [[]])'
---
 tests/m4sh.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/m4sh.at b/tests/m4sh.at
index cbdfcb62..e7d3c1ee 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -1240,7 +1240,7 @@ AS_CASE([`touch file; false`]) && test -f file && echo 
fifteen
 dnl The next line is badly underquoted; don't intentionally copy this style.
 AS_CASE([foo], [foo], m4_do(AS_CASE([bar], [bar], [echo sixteen])))
 dnl Handle blank arguments.
-AS_IF([false], [:], [ ]) && AS_CASE([foo], [foo], []
+AS_IF([false], [:], [ ]) && AS_IF([false], [:], [[]]) && AS_CASE([foo], [foo], 
[]
 ) && echo seventeen
 m4_define([empty])AS_IF([:], [empty]
 ) && AS_CASE([foo], [foo], [empty]) && echo eighteen
-- 
2.24.1.windows.2