Fix for GCC 4.7 compatibility.
authorJunfeng Dong <junfeng.dong@intel.com>
Wed, 20 Mar 2013 08:29:48 +0000 (16:29 +0800)
committerJunfeng Dong <junfeng.dong@intel.com>
Wed, 20 Mar 2013 08:29:48 +0000 (16:29 +0800)
- Add -fpermissive. see the part of "Name Lookup changes" in
  http://gcc.gnu.org/gcc-4.7/porting_to.html
- Drop the wrong flag: -Wl.

Change-Id: I346d918ba5350166d7c79c8c098ef02b4704c88c

CMakeLists.txt
src/plugins-installer/CMakeLists.txt
src/wrt-popup/wrt/popup-bin/CMakeLists.txt

index e9241f4..2b454dc 100644 (file)
@@ -73,6 +73,8 @@ ADD_DEFINITIONS("-Wall")
 ADD_DEFINITIONS("-Wextra")
 ADD_DEFINITIONS("-Wno-deprecated")
 #ADD_DEFINITIONS("-DDEVPKG")
+# GCC 4.7 changes the scheme of name lookup. Guide: http://gcc.gnu.org/gcc-4.7/porting_to.html
+ADD_DEFINITIONS("-fpermissive")
 
 ##############################################################################
 # CMake flags
index 4fcb46d..6c01a00 100644 (file)
@@ -61,7 +61,7 @@ TARGET_LINK_LIBRARIES(${TARGET_PLUGINS_INSTALLER}
 )
 
 SET_TARGET_PROPERTIES(${TARGET_PLUGINS_INSTALLER} PROPERTIES
-    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -Wl"
+    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
     BUILD_WITH_INSTALL_RPATH ON
     INSTALL_RPATH_USE_LINK_PATH ON
 )
index d76b34e..52f73ff 100644 (file)
@@ -48,7 +48,7 @@ TARGET_LINK_LIBRARIES(${TARGET_POPUP_WRT}
 )
 
 SET_TARGET_PROPERTIES(${TARGET_POPUP_WRT} PROPERTIES
-    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -Wl"
+    LINK_FLAGS "-Wl,--as-needed -Wl,--hash-style=both"
     BUILD_WITH_INSTALL_RPATH ON
     INSTALL_RPATH_USE_LINK_PATH ON
 )