1510f52e3e
* configure.in: Create compatibility code in bits/libc-lock.h file. * libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is not defined. * filedoalloc.c (_IO_file_doallocate): Don't call _IO_cleanup_registration_needed if __linux__ is defined. * iofclose.c (fclose): Make it weak alias of _IO_fclose if __ELF__ is defined. * iovsprintf.c (vsprintf): Make it weak alias of _IO_vsprintf if __ELF__ is defined. * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if __ELF__ is defined. * config/linuxlibc1.mt (MT_CFLAGS): Defined as -D_G_HAVE_MMAP. (IO_OBJECTS): Add filedoalloc.o fileops.o genops.o iofclose.o iovsprintf.o iovsscanf.o strops.o. From-SVN: r15931
118 lines
3.2 KiB
Plaintext
118 lines
3.2 KiB
Plaintext
# This file is a shell script fragment that supplies the information
|
|
# necessary for a configure script to process the program in
|
|
# this directory. For more information, look at ../configure.
|
|
|
|
configdirs="tests dbz stdio testsuite"
|
|
srctrigger=libioP.h
|
|
srcname="input/output library"
|
|
package_makefile_frag=Make.pack
|
|
|
|
# per-host:
|
|
|
|
# per-target:
|
|
|
|
echo "# Warning: this fragment is automatically generated" > temp.mt
|
|
frags=
|
|
|
|
case "${target}" in
|
|
*-hpux*) frags=hpux.mt ;;
|
|
*-linux-gnulibc1)
|
|
frags=linuxlibc1.mt ;;
|
|
*-linux-gnu) frags="linux.mt mtsafe.mt" ;;
|
|
*-sco3.2v[45]*) frags=sco4.mt ;;
|
|
*-isc*) frags=isc.mt ;;
|
|
*-netware*) frags=netware.mt ;;
|
|
*) frags=${target_cpu}.mt ;;
|
|
esac
|
|
|
|
case "${enable_shared}" in
|
|
yes) shared=yes ;;
|
|
no) shared=no ;;
|
|
*libio*) shared=yes ;;
|
|
*) shared=no ;;
|
|
esac
|
|
|
|
if [ "${shared}" = "yes" ]; then
|
|
case "${target}" in
|
|
hppa*-*) frags="${frags} ../../config/mh-papic" ;;
|
|
i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
|
|
alpha-*-linux*)
|
|
frags="${frags} ../../config/mh-elfalphapic" ;;
|
|
*) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
|
|
esac
|
|
fi
|
|
|
|
# Make a link for the correct stdio-lock.h file.
|
|
case "${target}" in
|
|
*-linux-gnu)
|
|
# We have a correct file in glibc but the libioP.h file is written
|
|
# with glibc 2.1 in mind which has the internals headers in special
|
|
# directory while glibc 2.0 has them in /usr/include. Create a wrapper
|
|
# if necessary.
|
|
(echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
|
|
{
|
|
rm -fr bits
|
|
mkdir bits
|
|
echo "#include <libc-lock.h>" > bits/libc-lock.h
|
|
echo 'asm (".weak _pthread_cleanup_pop_restore");' >> bits/libc-lock.h
|
|
echo 'asm (".weak _pthread_cleanup_push_defer");' >> bits/libc-lock.h
|
|
|
|
echo "#include <stdio-lock.h>" > bits/stdio-lock.h
|
|
}
|
|
;;
|
|
*)
|
|
rm -fr bits
|
|
mkdir bits
|
|
ln -s ${srcdir}/include/empty.h bits/stdio-lock.h
|
|
;;
|
|
esac
|
|
|
|
for frag in ${frags}; do
|
|
frag=${srcdir}/config/$frag
|
|
if [ -f ${frag} ]; then
|
|
echo "Appending ${frag} to target-mkfrag"
|
|
echo "# Following fragment copied from ${frag}" >> temp.mt
|
|
cat ${frag} >> temp.mt
|
|
fi
|
|
done
|
|
|
|
target_makefile_frag=target-mkfrag
|
|
${moveifchange} temp.mt target-mkfrag
|
|
|
|
LIBDIR=yes
|
|
TO_TOPDIR=../
|
|
ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
|
|
XCINCLUDES='-I. -I$(srcdir)'
|
|
XCXXINCLUDES='-I. -I$(srcdir)'
|
|
MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
|
|
DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
|
|
CLEAN='_G_config.h *.a'
|
|
INFO_FILES=iostream
|
|
if [ -n "${with_cross_host}" ] ; then
|
|
CHECK_SUBDIRS=testsuite
|
|
fi
|
|
(. ${srcdir}/config.shared) >${package_makefile_frag}
|
|
|
|
# post-target:
|
|
|
|
# If cross-compiling, don't build gperf or the utils. They
|
|
# will get built by the target compiler, which is confusing.
|
|
# We cannot test the installation. We install in $(tooldir).
|
|
if [ -n "${with_cross_host}" ] ; then
|
|
rm -f Makefile.tem
|
|
sed \
|
|
-e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
|
|
Makefile >Makefile.tem
|
|
mv -f Makefile.tem Makefile
|
|
fi
|
|
|
|
if [ "${srcdir}" = "." ] ; then
|
|
if [ "${with_target_subdir}" != "." ] ; then
|
|
. ${with_multisrctop}../../config-ml.in
|
|
else
|
|
. ${with_multisrctop}../config-ml.in
|
|
fi
|
|
else
|
|
. ${srcdir}/../config-ml.in
|
|
fi
|