• 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
xxxxxxxxxx
diff --git a/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c
 
From 44bce1b66c1cdd5308ac3ac773ea0a53d83790fd Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Tue, 24 Nov 2015 21:16:39 +0100
Subject: [PATCH] LibWebP: fix compilation issue with GCC 5.x / C++11
​
GCC 5.1 / C++11 gets confused about the "#<TEXT>" in the inline assembly
code, and dies with errors like:
​
Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.c:37:34: error: invalid
character ' ' in raw string delimiter
​
Fix it by introducting white space around the string literals like it has
been done in upstream webp:
​
https://chromium.googlesource.com/webm/libwebp/+/eebaf97f5a1cb713d81d311308d8a48c124e5aef
​
Discussed upstream:
http://sourceforge.net/p/freeimage/discussion/36110/thread/605ef8e4/
​
[Scripted by sed -i 's/"\(#[A-Z0-9]*\)"/" \1 "/g' *.c]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c       |  28 +-
 Source/LibWebP/src/dsp/dsp.enc_mips32.c            | 314 ++++++++++-----------
 Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c       | 288 +++++++++----------
 Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c   |  10 +-
 Source/LibWebP/src/dsp/dsp.lossless_mips32.c       |  34 +--
 Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c  |   8 +-
 .../LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c   |  18 +-
 Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c       |  10 +-
 8 files changed, 355 insertions(+), 355 deletions(-)
​
diff --git a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c
index dac2c93..aaa8111 100644
--- a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c
+++ b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c
@@ -548,10 +548,10 @@ static void SimpleVFilter16(uint8_t* p, int stride, int thresh) {
 // TEMP3 = SRC[D + D1 * BPS]
 #define LOAD_4_BYTES(TEMP0, TEMP1, TEMP2, TEMP3,                               \
                      A, A1, B, B1, C, C1, D, D1, SRC)                          \
-  "lbu          %["#TEMP0"],   "#A"+"#A1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
-  "lbu          %["#TEMP1"],   "#B"+"#B1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
-  "lbu          %["#TEMP2"],   "#C"+"#C1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
-  "lbu          %["#TEMP3"],   "#D"+"#D1"*"XSTR(BPS)"(%["#SRC"])     \n\t"     \
+  "lbu          %[" #TEMP0 "],   " #A "+" #A1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
+  "lbu          %[" #TEMP1 "],   " #B "+" #B1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
+  "lbu          %[" #TEMP2 "],   " #C "+" #C1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
+  "lbu          %[" #TEMP3 "],   " #D "+" #D1 "*"XSTR(BPS)"(%[" #SRC "])     \n\t"     \
 
 static void SimpleHFilter16(uint8_t* p, int stride, int thresh) {
   int i;
@@ -623,8 +623,8 @@ static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) {
 // DST[A * BPS]     = TEMP0
 // DST[B + C * BPS] = TEMP1
 #define STORE_8_BYTES(TEMP0, TEMP1, A, B, C, DST)                              \
-  "usw          %["#TEMP0"],   "#A"*"XSTR(BPS)"(%["#DST"])         \n\t"       \
-  "usw          %["#TEMP1"],   "#B"+"#C"*"XSTR(BPS)"(%["#DST"])    \n\t"
+  "usw          %[" #TEMP0 "],   " #A "*"XSTR(BPS)"(%[" #DST "])         \n\t"       \
+  "usw          %[" #TEMP1 "],   " #B "+" #C "*"XSTR(BPS)"(%[" #DST "])    \n\t"
 
 static void VE4(uint8_t* dst) {    // vertical
   const uint8_t* top = dst - BPS;
@@ -725,8 +725,8 @@ static void RD4(uint8_t* dst) {   // Down-right
 // TEMP0 = SRC[A * BPS]
 // TEMP1 = SRC[B + C * BPS]
 #define LOAD_8_BYTES(TEMP0, TEMP1, A, B, C, SRC)                               \
-  "ulw          %["#TEMP0"],   "#A"*"XSTR(BPS)"(%["#SRC"])         \n\t"       \
-  "ulw          %["#TEMP1"],   "#B"+"#C"*"XSTR(BPS)"(%["#SRC"])    \n\t"
+  "ulw          %[" #TEMP0 "],   " #A "*"XSTR(BPS)"(%[" #SRC "])         \n\t"       \
+  "ulw          %[" #TEMP1 "],   " #B "+" #C "*"XSTR(BPS)"(%[" #SRC "])    \n\t"
 
 static void LD4(uint8_t* dst) {   // Down-Left
   int temp0, temp1, temp2, temp3, temp4;
@@ -873,24 +873,24 @@ static void DC8uvNoTop(uint8_t* dst) {  // DC with no top samples
 #define CLIPPING(SIZE)                                                         \
   "preceu.ph.qbl   %[temp2],   %[temp0]                  \n\t"                 \
   "preceu.ph.qbr   %[temp0],   %[temp0]                  \n\t"                 \
-".if "#SIZE" == 8                                        \n\t"                 \
+".if " #SIZE " == 8                                        \n\t"                 \
   "preceu.ph.qbl   %[temp3],   %[temp1]                  \n\t"                 \
   "preceu.ph.qbr   %[temp1],   %[temp1]                  \n\t"                 \
 ".endif                                                  \n\t"                 \
   "addu.ph         %[temp2],   %[temp2],   %[dst_1]      \n\t"                 \
   "addu.ph         %[temp0],   %[temp0],   %[dst_1]      \n\t"                 \
-".if "#SIZE" == 8                                        \n\t"                 \
+".if " #SIZE " == 8                                        \n\t"                 \
   "addu.ph         %[temp3],   %[temp3],   %[dst_1]      \n\t"                 \
   "addu.ph         %[temp1],   %[temp1],   %[dst_1]      \n\t"                 \
 ".endif                                                  \n\t"                 \
   "shll_s.ph       %[temp2],   %[temp2],   7             \n\t"                 \
   "shll_s.ph       %[temp0],   %[temp0],   7             \n\t"                 \
-".if "#SIZE" == 8                                        \n\t"                 \
  • 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.