summarylogtreecommitdiffstats
path: root/chromium-73-gcc-0.patch
blob: 5a50700fd936c6484a78a19d2a18db02183cd178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
From 2c3b57cafbbb38c13a519c9d2fda8b65691d9564 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Thu, 7 Feb 2019 22:55:37 +0000
Subject: [PATCH] allocator shim: Swap ALIGN_LINKAGE and SHIM_ALWAYS_EXPORT's
 positions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This fixes the GCC build. GCC seems to be stricter with the position of the
linkage specification, so just swap the terms to prevent an error that looks
like:

In file included from ../../base/allocator/allocator_shim.cc:333:
../../base/allocator/allocator_shim_override_cpp_symbols.h:39:30: error: expected unqualified-id before string constant
 #define ALIGN_LINKAGE extern "C"
                              ^~~
../../base/allocator/allocator_shim_override_cpp_symbols.h:99:20: note: in expansion of macro ‘ALIGN_LINKAGE’
 SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW(std::size_t size,
                    ^~~~~~~~~~~~~

Bug: 819294
Change-Id: I0aa16ea88cead42e83796a1c86afad8b447ddc50
Reviewed-on: https://chromium-review.googlesource.com/c/1458256
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#630084}
---
 .../allocator_shim_override_cpp_symbols.h     | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/base/allocator/allocator_shim_override_cpp_symbols.h b/base/allocator/allocator_shim_override_cpp_symbols.h
index 1228f5e33d28..01d25b7f6437 100644
--- a/base/allocator/allocator_shim_override_cpp_symbols.h
+++ b/base/allocator/allocator_shim_override_cpp_symbols.h
@@ -96,57 +96,57 @@ SHIM_ALWAYS_EXPORT void operator delete[](void* p, size_t) __THROW {
   ShimCppDelete(p);
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW(std::size_t size,
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW(std::size_t size,
                                                  ALIGN_VAL_T alignment) {
   return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_NOTHROW(
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW_NOTHROW(
     std::size_t size,
     ALIGN_VAL_T alignment,
     const std::nothrow_t&) __THROW {
   return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL(void* p, ALIGN_VAL_T) __THROW {
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL(void* p, ALIGN_VAL_T) __THROW {
   ShimCppDelete(p);
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL_SIZED(void* p,
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL_SIZED(void* p,
                                                       std::size_t size,
                                                       ALIGN_VAL_T) __THROW {
   ShimCppDelete(p);
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void
 ALIGN_DEL_NOTHROW(void* p, ALIGN_VAL_T, const std::nothrow_t&) __THROW {
   ShimCppDelete(p);
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_ARR(std::size_t size,
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW_ARR(std::size_t size,
                                                      ALIGN_VAL_T alignment) {
   return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void* ALIGN_NEW_ARR_NOTHROW(
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void* ALIGN_NEW_ARR_NOTHROW(
     std::size_t size,
     ALIGN_VAL_T alignment,
     const std::nothrow_t&) __THROW {
   return ShimCppAlignedNew(size, static_cast<size_t>(alignment));
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL_ARR(void* p,
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL_ARR(void* p,
                                                     ALIGN_VAL_T) __THROW {
   ShimCppDelete(p);
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void ALIGN_DEL_ARR_SIZED(void* p,
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void ALIGN_DEL_ARR_SIZED(void* p,
                                                           std::size_t size,
                                                           ALIGN_VAL_T) __THROW {
   ShimCppDelete(p);
 }
 
-SHIM_ALWAYS_EXPORT ALIGN_LINKAGE void
+ALIGN_LINKAGE SHIM_ALWAYS_EXPORT void
 ALIGN_DEL_ARR_NOTHROW(void* p, ALIGN_VAL_T, const std::nothrow_t&) __THROW {
   ShimCppDelete(p);
 }
-- 
2.20.1