• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libfreeimage/0003-LibWebP-fix-compilation-issue-with-GCC-5.x-C-11.patch
Peter KorsgaardPeter Korsgaard committed c626998d47e24 Nov 2015
Raw file
Source viewDiff to previous
diff --git a/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c
 
1
From 44bce1b66c1cdd5308ac3ac773ea0a53d83790fd Mon Sep 17 00:00:00 2001
2
From: Peter Korsgaard <peter@korsgaard.com>
3
Date: Tue, 24 Nov 2015 21:16:39 +0100
4
Subject: [PATCH] LibWebP: fix compilation issue with GCC 5.x / C++11
5
​
6
GCC 5.1 / C++11 gets confused about the "#<TEXT>" in the inline assembly
7
code, and dies with errors like:
8
​
9
Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.c:37:34: error: invalid
10
character ' ' in raw string delimiter
11
​
12
Fix it by introducting white space around the string literals like it has
13
been done in upstream webp:
14
​
15
https://chromium.googlesource.com/webm/libwebp/+/eebaf97f5a1cb713d81d311308d8a48c124e5aef
16
​
17
Discussed upstream:
18
http://sourceforge.net/p/freeimage/discussion/36110/thread/605ef8e4/
19
​
20
[Scripted by sed -i 's/"\(#[A-Z0-9]*\)"/" \1 "/g' *.c]
21
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
22
---
23
 Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c       |  28 +-
24
 Source/LibWebP/src/dsp/dsp.enc_mips32.c            | 314 ++++++++++-----------
25
 Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c       | 288 +++++++++----------
26
 Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c   |  10 +-
27
 Source/LibWebP/src/dsp/dsp.lossless_mips32.c       |  34 +--
28
 Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c  |   8 +-
29
 .../LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c   |  18 +-
30
 Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c       |  10 +-
31
 8 files changed, 355 insertions(+), 355 deletions(-)
32
​
33
diff --git a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c
34
index dac2c93..aaa8111 100644
35
--- a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c
36
+++ b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c
37
@@ -548,10 +548,10 @@ static void SimpleVFilter16(uint8_t* p, int stride, int thresh) {
38
 // TEMP3 = SRC[D + D1 * BPS]
39
 #define LOAD_4_BYTES(TEMP0, TEMP1, TEMP2, TEMP3,                               \
40
                      A, A1, B, B1, C, C1, D, D1, SRC)                          \
41
-  "lbu          %["#TEMP0"],   "#A"+"#A1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
42
-  "lbu          %["#TEMP1"],   "#B"+"#B1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
43
-  "lbu          %["#TEMP2"],   "#C"+"#C1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
44
-  "lbu          %["#TEMP3"],   "#D"+"#D1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
45
+  "lbu          %[" #TEMP0 "],   " #A "+" #A1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
46
+  "lbu          %[" #TEMP1 "],   " #B "+" #B1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
47
+  "lbu          %[" #TEMP2 "],   " #C "+" #C1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
48
+  "lbu          %[" #TEMP3 "],   " #D "+" #D1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
49
 
50
 static void SimpleHFilter16(uint8_t* p, int stride, int thresh) {
51
   int i;
52
@@ -623,8 +623,8 @@ static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) {
53
 // DST[A * BPS]     = TEMP0
54
 // DST[B + C * BPS] = TEMP1
55
 #define STORE_8_BYTES(TEMP0, TEMP1, A, B, C, DST)                              \
56
-  "usw          %["#TEMP0"],   "#A"*"XSTR(BPS)"(%["#DST"])         \n\t"       \
57
-  "usw          %["#TEMP1"],   "#B"+"#C"*"XSTR(BPS)"(%["#DST"])    \n\t"
58
+  "usw          %[" #TEMP0 "],   " #A "*"XSTR(BPS)"(%[" #DST "])         \n\t"       \
59
+  "usw          %[" #TEMP1 "],   " #B "+" #C "*"XSTR(BPS)"(%[" #DST "])    \n\t"
60
 
61
 static void VE4(uint8_t* dst) {    // vertical
62
   const uint8_t* top = dst - BPS;
63
@@ -725,8 +725,8 @@ static void RD4(uint8_t* dst) {   // Down-right
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.