[SPIN] Hotfix for build with gcc 4.6.3
authorhh4813.kim <hh4813.kim@samsung.com>
Wed, 14 Jan 2015 16:42:07 +0000 (08:42 -0800)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Revert "fixup! [Tizen] Switch chromium-efl / mobile development to GCC 4.8"
-This reverts commit 8ffb97b642f4326e6da671b392942c2f5353dbb8.

Revert "fixup! [Tizen] Switch chromium-efl / mobile development to GCC 4.8"
-This reverts commit 053bb9dd81b79db39b7431358f815d6bb3d71640.

Revert "[Tizen] Switch chromium-efl / mobile development to GCC 4.8"
-This reverts commit 7e92be3cc650f8aed1a47599f3da2ae579f92ace.

Add GCC_4_6_X flag for mobile

Together with: I21e033ef68941f29164546c7dd8ce6e1e9b1aa57
Together with: I7718511dcb9ae9f12a02daf84827a04705ddafe5
Reviewed by: Antonio Gomes, Piotr Tworek, SeungSeop Park

Change-Id: I7c0e993d375cea1516a295249462b9e4bb1b04d3
Signed-off-by: hh4813.kim <hh4813.kim@samsung.com>
23 files changed:
tizen_src/build/build_mobile.sh
tizen_src/build/gbs.conf
tizen_src/ewk/chromium-ewk.gyp
tizen_src/impl/API/ewk_certificate_private.h
tizen_src/impl/browser/javascript_modal_dialog_efl.h
tizen_src/impl/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/impl/browser/renderer_host/web_event_factory_efl.cc
tizen_src/impl/browser/selectpicker/popup_picker.cc
tizen_src/impl/browser/web_contents/web_drag_dest_efl.h
tizen_src/impl/chromium-efl.gypi
tizen_src/impl/common/cursors/webcursor_efl.cc
tizen_src/impl/components/clipboard/clipboard_helper_efl.h
tizen_src/impl/ecore_x_wrapper.h [new file with mode: 0644]
tizen_src/impl/eweb_view.cc
tizen_src/impl/gfx/x11_types_override.cc
tizen_src/impl/google_streaming_api_pb_wrapper.h [new file with mode: 0644]
tizen_src/impl/media/base/tizen/media_player_bridge_capi.h
tizen_src/impl/media/base/tizen/media_source_player_gstreamer.h
tizen_src/impl/openssl_evp_wrapper.h [new file with mode: 0644]
tizen_src/impl/openssl_pem_wrapper.h [new file with mode: 0644]
tizen_src/impl/openssl_ssl_wrapper.h [new file with mode: 0644]
tizen_src/impl/openssl_x509_wrapper.h [new file with mode: 0644]
tizen_src/impl/openssl_x509v3_wrapper.h [new file with mode: 0644]

index 8b889fd270abc02285fb807945818c12b8330b63..153666b048b378bec50778832ae8fef2680ad9a0 100755 (executable)
@@ -21,10 +21,7 @@ if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
   CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
 fi
 
-CUSTOM_LIBC_DIR="custom_libc_dir /opt/usr/eglibc-2.18/lib"
-
 gbs $CONF_FLAG build $PROFILE_FLAG -A armv7l --incremental \
-    --define "${CUSTOM_LIBC_DIR}" \
     --define "${TIZEN_VERSION}" "$@"
 
 ${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches
index f97b7ef391bc70fd73d685da6c22c7d9e5fc0d03..139c34836e52e9d02594ccf147f8bf857063cc71 100755 (executable)
@@ -5,12 +5,9 @@
 [profile.tizenmb_v2.3]
 obs = obs.tizenmb
 # The order is IMPORTANT!
-repos = repo.tizenmb_supplement_gcc48, repo.tizenmb_supplement_v2.3, repo.tizenmb_supplement_chromium_v2.3, repo.tizenmb_base_v2.3
+repos = repo.tizenmb_supplement_v2.3, repo.tizenmb_supplement_chromium_v2.3, repo.tizenmb_base_v2.3
 buildroot=~/GBS-ROOT-2.3-DEV
 
-[repo.tizenmb_supplement_gcc48]
-url = http://10.251.52.177/tizenrepo/eur-open/supplement_gcc48
-
 [repo.tizenmb_supplement_v2.3]
 url = http://10.251.52.177/tizenrepo/eur-open/supplement_v2.3
 
index 191f62413fd8f7c18be1ee328ffa7d3690d05807..5cfc01cc2fe73451cf70c38b6b45cd6324b3f088 100644 (file)
       'efl_integration/public/text_encoding_map_efl.h',
     ],
     'conditions': [
+      ['gcc_4_6_x==1', {
+        'defines': [
+          'override=',
+          'final=',
+        ],
+      }],
       ['ewk_bringup==1', {
         'defines': [ 'EWK_BRINGUP=1' ],
       }]
index 145f2c1d65fdcf0726796719e555eca7b976f565..7a1df1ff5d06a2242f97cfc0dce76872b8d046e2 100644 (file)
@@ -13,7 +13,9 @@
 class _Ewk_Certificate_Policy_Decision : public Ewk_Suspendable_Object {
  public:
   _Ewk_Certificate_Policy_Decision(const GURL& url, const std::string& cert, int error_code, const base::Callback<void(bool)>& result_callback)
-      : Ewk_Suspendable_Object(result_callback),
+      : url_(NULL),
+        certificatePem_(NULL),
+        Ewk_Suspendable_Object(result_callback),
         error_(error_code) {
     url_ = eina_stringshare_add(url.spec().c_str());
     certificatePem_ = eina_stringshare_add(cert.c_str());
@@ -29,8 +31,8 @@ class _Ewk_Certificate_Policy_Decision : public Ewk_Suspendable_Object {
   int error() const { return error_; }
 
  private:
-  Eina_Stringshare* url_ = nullptr;
-  Eina_Stringshare* certificatePem_ = nullptr;
+  Eina_Stringshare* url_;
+  Eina_Stringshare* certificatePem_;
   int error_;
 };
 
index b43dbe8a2127144d124d3220b20b28584a7dc38f..986fda62efc132954a8e3bba262153af370e6232 100755 (executable)
@@ -13,7 +13,7 @@
 
 #include <Evas.h>
 #include <Elementary.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 
 namespace content {
 class WebContentsDelegateEfl;
index 0218649eda92398f11d34a83e93d5e28c316e783..c51baaa8412388a384f5d3039de809f8af62f639 100644 (file)
@@ -60,7 +60,7 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_Input.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 #include <Elementary.h>
 
 #define EFL_MAX_WIDTH 10000
index 9855356feff4346b8b00db3e1c6db676779131ad..ab5362540d0c3b40c5e567f2e78cfe39f7c0e61b 100644 (file)
@@ -11,7 +11,7 @@
 #include "ui/events/keycodes/keyboard_code_conversion_x.h"
 
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 
 // TODO: Figure out how to avoid this includes.
 #include <X11/Xutil.h>
index 583f19805849a91874eba382fbd6fcf6a10dfeba..a879719f71344cb7fd39b0f5a92f8ad53398605b 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <Elementary.h>
 #include <libintl.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 #ifdef OS_TIZEN_MOBILE
 #include <dlfcn.h>
 #include <efl_assist.h>
index 2cc1a7fadae394dfa52fee914c0358b52d80aed7..db6f78d5398d29a3b4d01f3507e1f77dfc7c99c9 100644 (file)
@@ -17,7 +17,7 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_Input.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 #include <Elementary.h>
 
 namespace content {
index ebe4445ab21e8442e85c6070b6e9dc6617ffcbd9..82d29878c1a7b976eeecd9037cd20a43809f1331 100644 (file)
@@ -6,6 +6,11 @@
       ['building_for_tizen==1', {
         'clang': 0,
       }],
+      ['building_for_tizen_mobile==1', {
+        'gcc_4_6_x': 1,
+      }, {
+        'gcc_4_6_x': 0,
+      }],
     ],
    'chromium_efl_tizen_version%': '2.3',
    'custom_libc_dir%': '',
           ['exclude', 'gesture_detection/gesture_configuration_default\\.cc$'],
         ],
       }],
+      ['_target_name=="boringssl" or _target_name=="crypto" or _target_name=="genperf" or  _target_name=="yasm" or _target_name=="speech_proto" or _target_name=="skia_library" or  _target_name=="http_server" or _target_name=="libjingle" or  _target_name=="libjingle_webrtc_common" or _target_name=="content_renderer"', {
+        'defines!': [
+          'final=',
+        ],
+      }],
+      ['_target_name=="usrsctplib"', {
+        'defines!': [
+          'override=',
+        ],
+      }],
+      ['_target_name=="webrtc_base" or _target_name=="rtc_base" or _target_name=="v8_base"', {
+        'defines!': [
+          'final=',
+          'override=',
+        ],
+      }],
     ],
     'conditions': [
        ['use_efl==1', {
            'USE_EFL=1',
          ],
        }],
+       ['gcc_4_6_x==1', {
+         'defines': [
+           'GCC_4_6_X=1',
+           'override=',
+           'final=',
+         ],
+       }],
        ['tizen_multimedia_support==1', {
          'defines': [
            'TIZEN_MULTIMEDIA_SUPPORT=1',
            'OS_TIZEN=1',
            'TIZEN_MULTIMEDIA_PIXMAP_SUPPORT=1',
            'TIZEN_CAPI_PLAYER_SUPPORT=1',
+         # For GCC 4.5.3 bundled arm.h has a bug and don't define __ARM_PCS when it should.
+         # Force define this flag for the whole chromium on gbs gcc 4.5.3.
+         # Non-arm builds will ingore it in any case.
+         '__ARM_PCS',
          ],
          'conditions': [
            ['chromium_efl_tizen_version=="2.3"', {
            ['exclude', 'browser/sound_effect.cc$'],
            ['exclude', 'battery_status_manager_linux\\.(h|cc)$'],
          ],
-      }, { # building_for_tizen != 1
+         'cflags_cc': [ '-std=gnu++0x', '-fpermissive' ],
+      }, {
         'sources/': [
           ['exclude', 'browser/device_sensors/data_fetcher_impl_tizen\\.(cc|h)$'],
           ['exclude', 'browser/device_sensors/data_fetcher_shared_memory_tizen\\.cc$'],
            ],
       }],
       ['building_for_tizen_tv==1', {
-       'defines': [
-          'OS_TIZEN_TV=1'
-        ],
+       'defines': ['OS_TIZEN_TV=1'],
       }],
       ['host_arch=="arm"', {
         'target_conditions': [
index bdc82545bee48c32eac6a15344fbde2377cbd2de..5299a8af84f9e20462fc1df3ff30bb5d02df57df 100644 (file)
@@ -4,7 +4,7 @@
 #include "content/common/cursors/webcursor.h"
 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
 
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 
 using namespace blink;
 
index 31ae03ed8ff578ff1d4ef0baffc8e7d2c1805be5..e9d83176f4409fdfd2934b8bb167ae54d9a58359 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <string>
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 
 #include "base/basictypes.h"
 
diff --git a/tizen_src/impl/ecore_x_wrapper.h b/tizen_src/impl/ecore_x_wrapper.h
new file mode 100644 (file)
index 0000000..d0cd674
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ECORE_X_WRAPPER_H_
+#define ECORE_X_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef override
+#endif
+#include <Ecore_X.h>
+#ifdef GCC_4_6_X
+#define override
+#endif
+
+#endif
index 53627c4a83533194cd3854d1303972c1c29a1cc6..331b1acadd681dd8170489a3170743f3db0cf79a 100644 (file)
@@ -984,6 +984,9 @@ bool EWebView::ExecuteJavaScript(const char* script, tizen_webview::View_Script_
   return true;
 }
 
+#ifdef GCC_4_6_X
+#undef override
+#endif
 bool EWebView::SetUserAgent(const char* userAgent) {
   const content::NavigationController& controller =
       web_contents_->GetController();
@@ -998,6 +1001,9 @@ bool EWebView::SetUserAgent(const char* userAgent) {
 
   return true;
 }
+#ifdef GCC_4_6_X
+#define override
+#endif
 
 bool EWebView::SetUserAgentAppName(const char* application_name) {
   EflWebView::VersionInfo::GetInstance()->
index 53b50f7239b7bd5c9f92ade36cf853c5ce4d7828..1dd984411361da83dedee9f9ecd0262b3121ff4a 100644 (file)
@@ -12,7 +12,7 @@
 #undef GetXDisplay
 #undef OpenNewXDisplay
 
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 #include <X11/Xlib.h>
 
 namespace gfx {
diff --git a/tizen_src/impl/google_streaming_api_pb_wrapper.h b/tizen_src/impl/google_streaming_api_pb_wrapper.h
new file mode 100644 (file)
index 0000000..007ceb5
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GOOGLE_STREAMING_API_PB_WRAPPER_H_
+#define GOOGLE_STREAMING_API_PB_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef final
+#endif
+#include "content/browser/speech/proto/google_streaming_api.pb.h"
+#ifdef GCC_4_6_X
+#define final
+#endif
+
+#endif
index 45199a7b071b2da0d2b17e46cf0b78f0c126227f..6e26eafe93b546d9a23201ee6302c67a7eafdf63 100755 (executable)
@@ -10,7 +10,7 @@
 
 #if defined(TIZEN_MULTIMEDIA_PIXMAP_SUPPORT)
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 #endif
 
 #include "base/memory/scoped_ptr.h"
index b792e9dd257d302209f545fa1be103327bab941f..c6ee3a56e75d803c21c21f2611d7a566cd47ecba 100644 (file)
@@ -8,7 +8,7 @@
 #include <map>
 
 #include <Ecore.h>
-#include <Ecore_X.h>
+#include "ecore_x_wrapper.h"
 #include <gst/gst.h>
 
 #include "base/cancelable_callback.h"
diff --git a/tizen_src/impl/openssl_evp_wrapper.h b/tizen_src/impl/openssl_evp_wrapper.h
new file mode 100644 (file)
index 0000000..c2f1e79
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OPENSSL_EVP_WRAPPER_H_
+#define OPENSSL_EVP_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef final
+#endif
+#include <openssl/evp.h>
+#ifdef GCC_4_6_X
+#define final
+#endif
+
+#endif
diff --git a/tizen_src/impl/openssl_pem_wrapper.h b/tizen_src/impl/openssl_pem_wrapper.h
new file mode 100644 (file)
index 0000000..a925a91
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OPENSSL_PEM_WRAPPER_H_
+#define OPENSSL_PEM_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef final
+#endif
+#include <openssl/pem.h>
+#ifdef GCC_4_6_X
+#define final
+#endif
+
+#endif
diff --git a/tizen_src/impl/openssl_ssl_wrapper.h b/tizen_src/impl/openssl_ssl_wrapper.h
new file mode 100644 (file)
index 0000000..7ce23e7
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OPENSSL_SSL_WRAPPER_H_
+#define OPENSSL_SSL_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef final
+#endif
+#include <openssl/ssl.h>
+#ifdef GCC_4_6_X
+#define final
+#endif
+
+#endif
diff --git a/tizen_src/impl/openssl_x509_wrapper.h b/tizen_src/impl/openssl_x509_wrapper.h
new file mode 100644 (file)
index 0000000..3b71b70
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OPENSSL_X509_WRAPPER_H_
+#define OPENSSL_X509_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef final
+#endif
+#include <openssl/x509.h>
+#ifdef GCC_4_6_X
+#define final
+#endif
+
+#endif
diff --git a/tizen_src/impl/openssl_x509v3_wrapper.h b/tizen_src/impl/openssl_x509v3_wrapper.h
new file mode 100644 (file)
index 0000000..546a303
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2015 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef OPENSSL_X509V3_WRAPPER_H_
+#define OPENSSL_X509V3_WRAPPER_H_
+
+#ifdef GCC_4_6_X
+#undef final
+#endif
+#include <openssl/x509v3.h>
+#ifdef GCC_4_6_X
+#define final
+#endif
+
+#endif