bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #11188] configure check for __objc_msg_forward (checking "for forw


From: Adam Fedor
Subject: [bugs #11188] configure check for __objc_msg_forward (checking "for forwarding callback in runtime") should be rewritten
Date: Wed, 08 Dec 2004 11:36:10 -0500
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12

This mail is an automated notification from the bugs tracker
 of the project: GNUstep.

/**************************************************************************/
[bugs #11188] Latest Modifications:

Changes by: 
                Adam Fedor <fedor@gnu.org>
'Date: 
                Wed 12/08/2004 at 16:25 (US/Mountain)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
         Assigned to | None                      | fedor
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Fixed.

2004-12-07  Adam Fedor  <fedor@gnu.org>
        * configure.ac: Test for objc forwarding by compiling a program.
        * config/config.forward.m: New file.
        (Fixes bug #11188).







/**************************************************************************/
[bugs #11188] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11188>
Project: GNUstep
Submitted by: 0
On: Thu 12/02/2004 at 02:35

Category:  Base/Foundation
Severity:  5 - Average
Item Group:  Bug
Resolution:  Fixed
Privacy:  Public
Assigned to:  fedor
Status:  Closed


Summary:  configure check for __objc_msg_forward (checking "for forwarding 
callback in runtime") should be rewritten

Original Submission:  checking "for forwarding callback in runtime" currently 
checks if "__objc_msg_forward" is present in the preprocessed file from gcc (by 
invoking gcc with -E):

starting at line 13843:

have_forward_hook=yes
echo "$as_me:$LINENO: checking "for forwarding callback in runtime"" >&5
echo $ECHO_N "checking "for forwarding callback in runtime"... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <objc/objc-api.h>

_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "__objc_msg_forward" >/dev/null 2>&1; then
  echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; have_forward_hook=no
fi
rm -f conftest*

in line 13856 there is a grep for  "__objc_msg_forward". If that is present it 
is assumed that forwarding callback in runtime is working. 

there are some problems with that way of doing this. 

At first, as andrew pinski pointed out it is in no way guarantied that 
forwarding callback works if grep find a occurrence of "__objc_msg_forward". 
there could also be a variable named that way in the code.

Second and more important is that -E and -fgnu-runtime don't work together in 
the upcoming version 4.0 of gcc (and this is hard to fix according to pinskia 
at gcc dot gnu dot org):

cc1: warning: command line option "-fgnu-runtime" is valid for ObjC/ObjC++ but 
not for C

See also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18772

because of that pinskia also proposed a better (and more robust) check for that 
feature:

try to compile:

#include <objc/objc-api.h>
...
IMP (*__objc_msg_forward1)(SEL) = __objc_msg_forward;
...

for questions please mail to 
lars dot sonchocky-helldorf at hamburg dot de 
and/or
pinskia at gcc dot gnu dot org

regards, Lars

Follow-up Comments
------------------


-------------------------------------------------------
Date: Wed 12/08/2004 at 16:25       By: Adam Fedor <fedor>
Fixed.

2004-12-07  Adam Fedor  <fedor@gnu.org>
        * configure.ac: Test for objc forwarding by compiling a program.
        * config/config.forward.m: New file.
        (Fixes bug #11188).













For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11188>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]