summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch')
-rw-r--r--meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch160
1 files changed, 160 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch
new file mode 100644
index 0000000000..beea56d2ae
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch
@@ -0,0 +1,160 @@
1From 15c6ef6a827d3681ad06e862d27ab3dfb84cb687 Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Wed, 27 May 2015 14:30:28 +0800
4Subject: [PATCH] fix the gcc version check
5
6Upstream-Status: pending
7
8"GCC diagnostic push" is gcc 4.6 feature, gcc 4.4.7 on centos did not know it
9
10Signed-off-by: Roy Li <rongqing.li@windriver.com>
11---
12 apt-pkg/cacheset.h | 4 ++--
13 apt-pkg/deb/debsrcrecords.cc | 12 ++++++------
14 apt-pkg/srcrecords.cc | 4 ++--
15 apt-pkg/srcrecords.h | 4 ++--
16 apt-pkg/vendorlist.cc | 4 ++--
17 5 files changed, 14 insertions(+), 14 deletions(-)
18
19diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
20index b7229bc..8cc2917 100644
21--- a/apt-pkg/cacheset.h
22+++ b/apt-pkg/cacheset.h
23@@ -119,12 +119,12 @@ public:
24 inline std::string FullName(bool const Pretty) const { return getPkg().FullName(Pretty); }
25 inline std::string FullName() const { return getPkg().FullName(); }
26 APT_DEPRECATED inline const char *Section() const {
27-#if __GNUC__ >= 4
28+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
29 #pragma GCC diagnostic push
30 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
31 #endif
32 return getPkg().Section();
33-#if __GNUC__ >= 4
34+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
35 #pragma GCC diagnostic pop
36 #endif
37 }
38diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
39index 49a348d..4bc9dcf 100644
40--- a/apt-pkg/deb/debsrcrecords.cc
41+++ b/apt-pkg/deb/debsrcrecords.cc
42@@ -126,13 +126,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
43 for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
44 {
45 pkgSrcRecords::File2 f;
46-#if __GNUC__ >= 4
47+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
48 #pragma GCC diagnostic push
49 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
50 #endif
51 f.MD5Hash = f2->MD5Hash;
52 f.Size = f2->Size;
53-#if __GNUC__ >= 4
54+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
55 #pragma GCC diagnostic pop
56 #endif
57 f.Path = f2->Path;
58@@ -190,14 +190,14 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
59 // we have it already, store the new hash and be done
60 if (file != List.end())
61 {
62-#if __GNUC__ >= 4
63+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
64 // set for compatibility only, so warn users not us
65 #pragma GCC diagnostic push
66 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
67 #endif
68 if (checksumField == "Files")
69 file->MD5Hash = hash;
70-#if __GNUC__ >= 4
71+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
72 #pragma GCC diagnostic pop
73 #endif
74 // an error here indicates that we have two different hashes for the same file
75@@ -212,7 +212,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
76 F.FileSize = strtoull(size.c_str(), NULL, 10);
77 F.Hashes.push_back(hashString);
78
79-#if __GNUC__ >= 4
80+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
81 // set for compatibility only, so warn users not us
82 #pragma GCC diagnostic push
83 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
84@@ -220,7 +220,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
85 F.Size = F.FileSize;
86 if (checksumField == "Files")
87 F.MD5Hash = hash;
88-#if __GNUC__ >= 4
89+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
90 #pragma GCC diagnostic pop
91 #endif
92
93diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
94index 3175ee7..340e796 100644
95--- a/apt-pkg/srcrecords.cc
96+++ b/apt-pkg/srcrecords.cc
97@@ -160,7 +160,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
98 for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f)
99 {
100 pkgSrcRecords::File2 f2;
101-#if __GNUC__ >= 4
102+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
103 #pragma GCC diagnostic push
104 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
105 #endif
106@@ -168,7 +168,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
107 f2.Size = f->Size;
108 f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash));
109 f2.FileSize = f->Size;
110-#if __GNUC__ >= 4
111+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
112 #pragma GCC diagnostic pop
113 #endif
114 f2.Path = f->Path;
115diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h
116index dde22bd..91f8061 100644
117--- a/apt-pkg/srcrecords.h
118+++ b/apt-pkg/srcrecords.h
119@@ -30,7 +30,7 @@ class pkgSrcRecords
120 {
121 public:
122
123-#if __GNUC__ >= 4
124+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
125 // ensure that con- & de-structor don't trigger this warning
126 #pragma GCC diagnostic push
127 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
128@@ -48,7 +48,7 @@ class pkgSrcRecords
129 unsigned long long FileSize;
130 HashStringList Hashes;
131 };
132-#if __GNUC__ >= 4
133+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
134 #pragma GCC diagnostic pop
135 #endif
136
137diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc
138index fb33ff1..ba1d3c3 100644
139--- a/apt-pkg/vendorlist.cc
140+++ b/apt-pkg/vendorlist.cc
141@@ -11,7 +11,7 @@
142
143 #include <apti18n.h>
144
145-#if __GNUC__ >= 4
146+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
147 #pragma GCC diagnostic push
148 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
149 #endif
150@@ -163,6 +163,6 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput) /*
151 }
152 /*}}}*/
153
154-#if __GNUC__ >= 4
155+#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
156 #pragma GCC diagnostic pop
157 #endif
158--
1591.9.1
160