[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bugs #11188] configure check for __objc_msg_forward (checking "for forw
From: |
anonymous |
Subject: |
[bugs #11188] configure check for __objc_msg_forward (checking "for forwarding callback in runtime") should be rewritten |
Date: |
Wed, 01 Dec 2004 21:41:34 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.29 |
This mail is an automated notification from the bugs tracker
of the project: GNUstep.
/**************************************************************************/
[bugs #11188] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=11188>
Project: GNUstep
Submitted by: 0
On: Wed 12/01/04 at 21:35
Category: Base/Foundation
Severity: 5 - Average
Item Group: Bug
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
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
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/
- [bugs #11188] configure check for __objc_msg_forward (checking "for forwarding callback in runtime") should be rewritten,
anonymous <=