Improved CON_AUTOLOAD tests.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2780 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1998-03-31 16:34:29 +00:00
parent 4992c288e9
commit 097ee73e95
6 changed files with 47 additions and 26 deletions

View file

@ -1,3 +1,14 @@
Tue Mar 31 11:32:03 1998 Adam Fedor <fedor@doc.com>
* aclocal.m4 (OBJC_CON_AUTOLOAD): Improved test. Check nm output
for indicator functions.
* configure: Regenerate.
* checks/GNUmakefile (LoadMe_RESOURCE_FILES): Changed name.
* doc/gnustep-howto.tmpl.texi: Update.
* doc/status.tmpl.texi: Likewise.
Fri Mar 20 11:15:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* checks/client.m: Added some tests for passing objects byref

View file

@ -170,9 +170,11 @@ make install
@subsection Compiling PCThreads
For Linux/GNU systems on Intel x86 processors, the PCThreads library is
For GNU/Linux systems on Intel x86 processors, the PCThreads library is
known to work with GNUstep. PCThreads version 1.1.0 is an enhanced version
of PCThread 1.0.0 with better support for GNUstep.
of PCThread 1.0.0 with better support for GNUstep. PCThreads may no longer
be necessary on all GNU/Linux systems, such as Debian 2.0 or other systems
with glibc2.
@example
cd /usr/src
@ -204,7 +206,7 @@ Special note for Solaris users. GNUstep works on Solaris/Intel systems;
however, GCC 2.8.0 has problems, so you must use the older patched GCC
2.7.2 instead. GCC 2.8.0 has also induced a problem on Solaris/Sparc
systems; however, there is a patch to fix this in the contrib directory
on the ftp sites.
on the ftp sites (This is also true for egcs-1.0.1).
@table @asis
@item 1. Uncompress GCC:

View file

@ -35,6 +35,7 @@ Unknown status.
Doesn't yet call -awakeAfterUsingCoder:.
@item NSArray:: [9]
@item NSAssertionHandler:: [9]
@item NSAttributedString:: [8]
@item NSAutoreleasePool:: [9]
But not exception- safe
@item NSBundle:: [8]
@ -60,11 +61,17 @@ Unknown status.
@item NSDeserializer:: [7]
@item NSDictionary:: [8]
@item NSDistantObject:: [7]
@item NSDistributedLock:: [7]
@item NSEnumerator:: [9]
@item NSException:: [9]
@item NSException:: [9]
But this needs integration with new, better
@item NSFileHandle:: [9]
@item NSFileManager:: [9]
@item NSHashTable:: [8]
@item NSHost:: [8]
@item NSInvocation:: [3]
@item NSLock:: [8]
@item NSMapTable:: [8]
@item NSMethodSignature:: [4]
@item NSMutableArray:: [8]
@item NSMutableCharacterSet:: [7]
@ -89,6 +96,7 @@ Unknown status.
@item NSString:: [8]
Careful, relationship with GNU String is tricky; this could
also use fixing.
@item NSTask:: [8]
@item NSThread:: [8]
@item NSTimeZone:: [8]
@item NSTimeZoneDetail:: [8]

View file

@ -138,7 +138,7 @@ BUNDLE_NAME=LoadMe
LoadMe_OBJC_FILES = LoadMe.m MyCategory.m SecondClass.m
# The bundle resource files and directories
LoadMe_RESOURCES = English.lproj/NXStringTable.example
LoadMe_RESOURCE_FILES = English.lproj/NXStringTable.example
LoadMe_RESOURCE_DIRS = English.lproj
SRCS = $(TEST_TOOL_NAME:=.m)

20
aclocal.m4 vendored
View file

@ -28,11 +28,9 @@ AC_DEFUN(OBJC_CON_AUTOLOAD,
#
# If this system supports autoloading of constructors, that means that gcc
# doesn't have to do it for us via collect2. This routine tests for this
# in a very roundabout way by intentionally trying to link a program that
# will give a link error, and examining the output to see if collect2 gave
# the error (which means the system does not autoload constructors)
# The only problem is this test might incorrectly return yes if it fails
# for some other reason besides a link problem.
# in a very roundabout way by compiling a program with a constructor and
# testing the file, via nm, for certain symbols that collect2 includes to
# handle loading of constructors.
#
# Makes the following substitutions:
# Defines CON_AUTOLOAD (whether constructor functions are autoloaded)
@ -42,16 +40,18 @@ AC_MSG_CHECKING(loading of constructor functions)
AC_CACHE_VAL(objc_cv_con_autoload,
[dnl
cat > conftest.constructor.c <<EOF
extern void undefined_function();
void cons_functions() __attribute__ ((constructor));
void cons_functions() {}
int main()
{
undefined_function();
return 0;
}
EOF
if test -n "`${CC-cc} -o conftest.constructor conftest.constructor.c 2>&1 | grep collect2`"; then
objc_cv_con_autoload=no
else
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.constructor.$ac_ext $LIBS 1>&5
if test -n "`nm conftest | grep _ctors_aux`"; then
objc_cv_con_autoload=yes
else
objc_cv_con_autoload=no
fi
])
if test $objc_cv_con_autoload = yes; then

22
configure vendored
View file

@ -1178,31 +1178,31 @@ EOF
#
# If this system supports autoloading of constructors, that means that gcc
# doesn't have to do it for us via collect2. This routine tests for this
# in a very roundabout way by intentionally trying to link a program that
# will give a link error, and examining the output to see if collect2 gave
# the error (which means the system does not autoload constructors)
# The only problem is this test might incorrectly return yes if it fails
# for some other reason besides a link problem.
# in a very roundabout way by compiling a program with a constructor and
# testing the file, via nm, for certain symbols that collect2 includes to
# handle loading of constructors.
#
# Makes the following substitutions:
# Defines CON_AUTOLOAD (whether constructor functions are autoloaded)
#--------------------------------------------------------------------
echo $ac_n "checking loading of constructor functions""... $ac_c" 1>&6
echo "configure:1192: checking loading of constructor functions" >&5
echo "configure:1190: checking loading of constructor functions" >&5
if eval "test \"`echo '$''{'objc_cv_con_autoload'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.constructor.c <<EOF
extern void undefined_function();
void cons_functions() __attribute__ ((constructor));
void cons_functions() {}
int main()
{
undefined_function();
return 0;
}
EOF
if test -n "`${CC-cc} -o conftest.constructor conftest.constructor.c 2>&1 | grep collect2`"; then
objc_cv_con_autoload=no
else
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.constructor.$ac_ext $LIBS 1>&5
if test -n "`nm conftest | grep _ctors_aux`"; then
objc_cv_con_autoload=yes
else
objc_cv_con_autoload=no
fi
fi