lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

001-gcc5.patch (2029B)


      1 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
      2 Date: Mon, 16 Mar 2015 17:40:12 +0000 (-0400)
      3 Subject: Avoid breakage with gcc 5
      4 X-Git-Tag: libgpg-error-1.19~7
      5 X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff_plain;h=c01c8f0c4f55d76b037c7f6aa44ad25ede18d38a
      6 
      7 Avoid breakage with gcc 5
      8 
      9 * src/Makefile.am: Add -P to the C preprocessor when building
     10 mkerrcodes.h, to avoid a noisy intermediate pipeline.
     11 
     12 --
     13 
     14 With gcc 5 without this patch, we see many errors like the following:
     15 
     16 gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
     17 In file included from ./mkerrcodes.c:26:0:
     18 ./mkerrcodes.h:9:5: error: expected expression before ‘,’ token
     19    { , "GPG_ERR_E2BIG" },
     20      ^
     21 ./mkerrcodes.h:10:5: error: expected expression before ‘,’ token
     22    { , "GPG_ERR_EACCES" },
     23      ^
     24 
     25 This patch cleans up the generated mkerrcodes.h by making the
     26 intermediate stage clean for all the versions of gcc i tested (4.x and
     27 5).
     28 
     29 Debian-Bug-Id: 777374
     30 Signed-Off-By: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
     31 ---
     32 
     33 --- a/src/Makefile.am
     34 +++ b/src/Makefile.am
     35 @@ -140,7 +140,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
     36  # It is correct to use $(CPP).  We want the host's idea of the error codes.
     37  mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
     38  	$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
     39 -	$(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
     40 +	$(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
     41                 $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
     42  	-rm _$@
     43  
     44 --- a/src/Makefile.in
     45 +++ b/src/Makefile.in
     46 @@ -979,7 +979,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
     47  # It is correct to use $(CPP).  We want the host's idea of the error codes.
     48  mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
     49  	$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
     50 -	$(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
     51 +	$(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
     52                 $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
     53  	-rm _$@
     54