diff mbox

update unifdef causing partial header generation and

Message ID CAC1BbcSsQ4yWfCf_SFvO-u1tFSsyYMFdC-zPCLYzdMRR-F+JjA@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Bernhard Reutner-Fischer Jan. 8, 2014, 10 a.m. UTC
On 7 January 2014 20:51, Tony Finch <dot@dotat.at> wrote:
> Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
>
>> >> ./extra/scripts/unifdef -B -t -f .//include/generated/unifdef_config.h -U_LIBC
>> >> -U__UCLIBC_GEN_LOCALE -U__NO_CTYPE include/bits/uClibc_config.h
>
> By the way, why are you using the -t option? It should only be necessary
> if you are using unifdef with languages other than C, e.g. where the
> input files have mismatched quotes. (This is one of the weird features
> unifdef inherited from 1980s pre-standard C...)

Except that not using the -t switch fails to produce correct output for me.
Given the data in the tarball from yesterday if you omit -t i get:
$ ../extra/scripts/unifdef -x 2 -B -d -f ./unifdef_config.h -U_LIBC
-U__UCLIBC_GEN_LOCALE -U__NO_CTYPE features.h -o broken-nontext.h 2>&1
>& broken-nontext.LOG ; echo $?
2
$ ../extra/scripts/unifdef -t -x 2 -B -d -f ./unifdef_config.h -U_LIBC
-U__UCLIBC_GEN_LOCALE -U__NO_CTYPE features.h -o ok-text.h 2>&1 >&
ok-text.LOG ; echo $?
0
$ diff -u ok-text.h broken-nontext.h

and you see the missing/wrong STRING_LITERAL, again:
--- broken-nontext.LOG  2014-01-08 10:52:59.119913165 +0100
+++ ok-text.LOG 2014-01-08 10:53:08.520076936 +0100
[]
 unifdef: #define
-unifdef: addsym __TARGET_ARCH__=
+unifdef: addsym __TARGET_ARCH__="x86_64"
 unifdef: parser line 37 state NO comment START line
 unifdef: #define
 unifdef: addsym __FORCE_OPTIONS_FOR_ARCH__=1
 unifdef: parser line 38 state NO comment START line
 unifdef: #define
-unifdef: addsym __TARGET_SUBARCH__=
+unifdef: addsym __TARGET_SUBARCH__=""
 unifdef: parser line 39 state NO comment START line
 unifdef: parser line 40 state NO comment START line
 unifdef: parser line 41 state NO comment START line

Can you reproduce this?
>
> Also regarding the comment in install_headers.sh about unifdef's exit
> status, you might want to use the -x2 option.

I have changed our invocation to use -x 2 now, yes.
Oh, would you mind to
sed -i -e s/portabiity/portability/g unifdef.h
TIA :)

PS: you are using non-standard err*() and warn*(), see
http://git.uclibc.org/uClibc/tree/extra/scripts/unifdef.h#n37
Just in case you want to do something about this, but i'm fine to keep
these local, of course.

cheers,
>
> Tony.
> --
> f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
> Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
> Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
> occasionally poor at first.
diff mbox

Patch

--- ok-text.h 2014-01-08 10:53:08.520076936 +0100
+++ broken-nontext.h 2014-01-08 10:47:57.898468714 +0100
@@ -415,4 +415,3 @@ 
 # define __USE_EXTERN_INLINES 1
 #endif

-#endif /* features.h  */