Skip to contentSkip to conversation

Support option --disable-optimization

PATCH In review Yang Gu 3 participants 4 messages Jul 8, 2010

lore
Share & tools
lore

Yang Gu

author
#0 lore raw

PATCH 1/2 Support option --disable-optimization

---
 configure.ac |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
configure.ac +7 -0
index 887c91a..a85fda3 100644
@@ -14,6 +14,13 @@ PKG_PROG_PKG_CONFIG
 AC_PROG_CXX
 AC_PROG_INSTALL
 
+AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
+			[disable code optimization through compiler]), [
+	if (test "${enableval}" = "no"); then
+		CXXFLAGS="$CXXFLAGS -O0"
+	fi
+])
+
 PKG_CHECK_MODULES(QT, QtCore QtGui QtXml QtNetwork, dummy=yes,
 						AC_MSG_ERROR(Qt is required))
 AC_SUBST(QT_CFLAGS)
Signature · 1 line
1.7.0.4
author
#1 lore raw

PATCH 2/2 Change sw2 only when cmd is not empty

---
 src/phonesim.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
src/phonesim.cpp +2 -1
index d5d7d87..8210f51 100644
@@ -923,9 +923,10 @@ bool SimRules::simCsimOk( const QByteArray& payload )
 
     if ( toolkitApp ) {
         QByteArray cmd = toolkitApp->fetch();
-        if ( !cmd.isEmpty() )
+        if ( !cmd.isEmpty() ) {
             sw1 = 0x91;
             sw2 = cmd.size();
+        }
     }
 
     resp += sw1;
Signature · 1 line
1.7.0.4
#2 lore raw
In reply to Yang Gu

Hi,
Forget to mention, this patch series (2 patches) is against phonesim.

Quoted 26 lines

-----Original Message-----
From: Gu, Yang
Sent: Thursday, July 08, 2010 6:57 PM
To: ofono(a)ofono.org
Cc: Gu, Yang
Subject: [PATCH 1/2] Support option --disable-optimization

---
configure.ac | 7 +++++++

1 files changed, 7 insertions(+), 0 deletions(-)
configure.ac +0 -0
index 887c91a..a85fda3 100644
@@ -14,6 +14,13 @@ PKG_PROG_PKG_CONFIG

AC_PROG_CXX
AC_PROG_INSTALL

configure.ac +7 -0
+AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
+			[disable code optimization through compiler]), [
+	if (test "${enableval}" = "no"); then
+		CXXFLAGS="$CXXFLAGS -O0"
+	fi
+])
+
Quoted 5 lines

PKG_CHECK_MODULES(QT, QtCore QtGui QtXml QtNetwork, dummy=yes,
AC_MSG_ERROR(Qt is required))
AC_SUBST(QT_CFLAGS)
--
1.7.0.4

Regards,
-Yang

#3 lore raw

Hi Yang,

Quoted 1 line

Forget to mention, this patch series (2 patches) is against phonesim.

I figured that. Both patches have been applied. Thanks.

Regards

Marcel