Commit c872ef71 authored by zack's avatar zack
Browse files

* Makefile.in: Exterminate all references to assert.h.

	* cross-make: Likewise.
	* assert.h: Delete.
	* configure.in: Correct commentary.
	* configure: Regenerate.
	* po/POTFILES.in: Remove assert.h.

	* libgcc-std.ver, libgcc2.c, libgcc2.h, sys-protos.h:
	Remove __eprintf.

	* config/t-freebsd, config/t-linux, config/t-linux-aout,
	config/t-netbsd, config/t-rtems, config/x-linux,
	config/i386/t-beos, config/mcore/t-mcore, config/mcore/t-mcore-pe:
	No need to override INSTALL_ASSERT_H.

	* fixinc/fixinc.dgux, fixinc/fixinc.interix, fixinc/fixinc.ptx,
	fixinc/fixinc.svr4, fixinc/fixinc.winnt, fixinc/fixinc.wrap,
	fixinc/fixincl.sh: Don't install assert.h into objdir/include.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41972 138bc75d-0d04-0410-961f-82ee72b054a4
parent cf2b989a
2001-05-11 Zack Weinberg <zackw@stanford.edu>
* Makefile.in: Exterminate all references to assert.h.
* cross-make: Likewise.
* assert.h: Delete.
* configure.in: Correct commentary.
* configure: Regenerate.
* libgcc-std.ver, libgcc2.c, libgcc2.h, sys-protos.h:
Remove __eprintf.
* config/t-freebsd, config/t-linux, config/t-linux-aout,
config/t-netbsd, config/t-rtems, config/x-linux,
config/i386/t-beos, config/mcore/t-mcore, config/mcore/t-mcore-pe:
No need to override INSTALL_ASSERT_H.
* fixinc/fixinc.dgux, fixinc/fixinc.interix, fixinc/fixinc.ptx,
fixinc/fixinc.svr4, fixinc/fixinc.winnt, fixinc/fixinc.wrap,
fixinc/fixincl.sh: Don't install assert.h into objdir/include.
2001-05-11 Graham Stott <grahams@redhat.com>
* combine.c (simplify_comparison): Fix typo.
......
......@@ -172,10 +172,6 @@ USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
$(srcdir)/ginclude/stdbool.h $(srcdir)/ginclude/iso646.h \
$(EXTRA_HEADERS) $(LANG_EXTRA_HEADERS)
# Target to use whe installing assert.h. Some systems may
# want to set this empty.
INSTALL_ASSERT_H = install-assert-h
# The GCC to use for compiling libgcc.a, enquire, and libgcc1-test.
# Usually the one we just built.
# Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
......@@ -320,9 +316,6 @@ build_tooldir = $(exec_prefix)/$(target_alias)
gcc_gxx_include_dir = @gcc_gxx_include_dir@
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
# (But this currently agrees with what is in cross-make.)
assertdir = $(gcc_tooldir)/include
# where the info files go
infodir = @infodir@
# Where cpp should go besides $prefix/bin if necessary
......@@ -2130,8 +2123,8 @@ stmp-fixinc: fixinc.sh gsyslimits.h
rm -rf include; mkdir include
-chmod a+rx include
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); pwd`; \
INSTALL_ASSERT_H='$(INSTALL_ASSERT_H)'; SHELL='$(SHELL)' ;\
export TARGET_MACHINE srcdir INSTALL_ASSERT_H SHELL ; \
SHELL='$(SHELL)' ;\
export TARGET_MACHINE srcdir SHELL ; \
$(SHELL) ./fixinc.sh `pwd`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
rm -f include/syslimits.h; \
if [ -f include/limits.h ]; then \
......@@ -2510,7 +2503,6 @@ installdirs:
-if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
-if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
-if [ -d $(gcc_tooldir) ] ; then true ; else mkdir $(gcc_tooldir) ; chmod a+rx $(gcc_tooldir) ; fi
-if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
-if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
-if [ -d $(slibdir) ] ; then true ; else mkdir $(slibdir) ; chmod a+rx $(slibdir) ; fi
# We don't use mkdir -p to create the parents of man1dir,
......@@ -2694,7 +2686,7 @@ install-multilib: stmp-multilib installdirs
-f libgcc.mk install
# Install all the header files built in the include subdirectory.
install-headers: $(INSTALL_HEADERS_DIR) $(INSTALL_ASSERT_H)
install-headers: $(INSTALL_HEADERS_DIR)
# Fix symlinks to absolute paths in the installed include directory to
# point to the installed directory, not the build directory.
# Don't need to use LN_S here since we really do need ln -s and no substitutes.
......@@ -2734,29 +2726,6 @@ install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
cd `pwd`/include ; \
find . -print | cpio -pdum $(libsubdir)/include
# Put assert.h where it won't override GNU libc's assert.h.
# It goes in a dir that is searched after GNU libc's headers;
# thus, the following conditionals are no longer needed.
# But it's not worth deleting them now.
## Don't replace the assert.h already there if it is not from GCC.
## This code would be simpler if it tested for -f ... && ! grep ...
## but supposedly the ! operator is missing in sh on some systems.
install-assert-h: assert.h installdirs
if [ -f $(assertdir)/assert.h ]; \
then \
if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
then \
rm -f $(assertdir)/assert.h; \
$(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
chmod a-x $(assertdir)/assert.h; \
else true; \
fi; \
else \
rm -f $(assertdir)/assert.h; \
$(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
chmod a-x $(assertdir)/assert.h; \
fi
# Use this target to install the program `collect2' under the name `collect2'.
install-collect2: collect2 installdirs
$(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext)
......
/* Allow this file to be included multiple times
with different settings of NDEBUG. */
#undef assert
#undef __assert
#ifdef NDEBUG
#define assert(ignore) ((void) 0)
#else
#ifndef __GNUC__
#define assert(expression) \
((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
#define __assert(expression, file, lineno) \
(printf ("%s:%u: failed assertion\n", file, lineno), \
abort (), 0)
#else
#if defined(__STDC__) || defined (__cplusplus)
/* Defined in libgcc.a */
#ifdef __cplusplus
extern "C" {
extern void __eprintf (const char *, const char *, unsigned, const char *)
__attribute__ ((noreturn));
}
#else
extern void __eprintf (const char *, const char *, unsigned, const char *)
__attribute__ ((noreturn));
#endif
#define assert(expression) \
((void) ((expression) ? 0 : __assert (#expression, __FILE__, __LINE__)))
#define __assert(expression, file, line) \
(__eprintf ("%s:%u: failed assertion `%s'\n", \
file, line, expression), 0)
#else /* no __STDC__ and not C++; i.e. -traditional. */
extern void __eprintf () __attribute__ ((noreturn)); /* Defined in libgcc.a */
#define assert(expression) \
((void) ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)))
#define __assert(expression, file, lineno) \
(__eprintf ("%s:%u: failed assertion `%s'\n", \
file, lineno, "expression"), 0)
#endif /* no __STDC__ and not C++; i.e. -traditional. */
#endif /* no __GNU__; i.e., /bin/cc. */
#endif
......@@ -6,6 +6,3 @@ CROSS_LIBGCC1 =
# we are most likely to want to apply any fixes to.
SYSTEM_HEADER_DIR = /boot/develop/headers/posix
CROSS_SYSTEM_HEADER_DIR = $(tooldir)/sys-include/posix
# Use the system assert.h
INSTALL_ASSERT_H =
......@@ -38,9 +38,6 @@ TARGET_LIBGCC2_CFLAGS=-O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter
# We have values for float.h.
CROSS_FLOAT_H = $(srcdir)/config/mcore/gfloat.h
# let the library provider supply an <assert.h>
INSTALL_ASSERT_H=
# If support for -m4align is ever re-enabled then comment out the
# following line and uncomment the mutlilib lines below.
......
......@@ -29,9 +29,6 @@ TARGET_LIBGCC2_CFLAGS=-O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter
# We have values for float.h.
CROSS_FLOAT_H = $(srcdir)/config/mcore/gfloat.h
# let the library provider supply an <assert.h>
INSTALL_ASSERT_H=
MULTILIB_OPTIONS = mbig-endian/mlittle-endian m210/m340
MULTILIB_DIRNAMES = big little m210 m340
MULTILIB_MATCHES =
......
# Don't run fixproto
STMP_FIXPROTO =
# Don't install "assert.h" in gcc. We use the system one.
INSTALL_ASSERT_H =
# Compile crtbeginS.o and crtendS.o with pic.
CRTSTUFF_T_CFLAGS_S = -fPIC
# Don't run fixproto
STMP_FIXPROTO =
# Don't install "assert.h" in gcc. We use the one in glibc.
INSTALL_ASSERT_H =
# Compile crtbeginS.o and crtendS.o with pic.
CRTSTUFF_T_CFLAGS_S = -fPIC
# Compile libgcc2.a with pic.
......
# Don't run fixproto
STMP_FIXPROTO =
# Don't install "assert.h" in gcc. We use the one in glibc.
INSTALL_ASSERT_H =
# Do not build libgcc1. Let gcc generate those functions. The GNU/Linux
# C library can handle them.
LIBGCC1 =
......
......@@ -4,6 +4,3 @@ LIBGCC1_TEST=
# Don't run fixproto
STMP_FIXPROTO =
# Don't install "assert.h" in gcc. We use the one in glibc.
INSTALL_ASSERT_H =
# RTEMS uses newlib which does not require prototype fixing
STMP_FIXPROTO =
# Don't install "assert.h" in gcc. RTEMS uses the one in newlib.
INSTALL_ASSERT_H =
# RTEMS always has limits.h.
LIMITS_H_TEST = true
......
# Don't run fixproto
STMP_FIXPROTO =
# Don't install "assert.h" in gcc. We use the one in glibc.
INSTALL_ASSERT_H =
......@@ -6471,10 +6471,9 @@ fi
# have its own set of headers then define
# inhibit_libc
# If this is using newlib, then define inhibit_libc in
# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
# libgcc.a, but that's OK because newlib should have its own version of
# assert.h.
# If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
inhibit_libc=
if test x$host != x$target && test x$with_headers = x; then
inhibit_libc=-Dinhibit_libc
......@@ -6544,7 +6543,7 @@ fi
# Figure out what assembler we will be using.
echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
echo "configure:6548: checking what assembler to use" >&5
echo "configure:6547: checking what assembler to use" >&5
gcc_cv_as=
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
......@@ -6629,7 +6628,7 @@ fi
# Figure out what nm we will be using.
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:6633: checking what nm to use" >&5
echo "configure:6632: checking what nm to use" >&5
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test x$host = x$target; then
......@@ -6640,7 +6639,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:6644: checking assembler alignment features" >&5
echo "configure:6643: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
......@@ -6688,7 +6687,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:6692: checking assembler subsection support" >&5
echo "configure:6691: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
......@@ -6728,7 +6727,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:6732: checking assembler weak support" >&5
echo "configure:6731: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
......@@ -6751,7 +6750,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:6755: checking assembler hidden support" >&5
echo "configure:6754: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
......@@ -6775,7 +6774,7 @@ fi
echo "$ac_t""$gcc_cv_as_hidden" 1>&6
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
echo "configure:6779: checking assembler leb128 support" >&5
echo "configure:6778: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
......@@ -6822,7 +6821,7 @@ echo "$ac_t""$gcc_cv_as_leb128" 1>&6
case "$target" in
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:6826: checking assembler .register pseudo-op support" >&5
echo "configure:6825: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -6850,7 +6849,7 @@ EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
echo "configure:6854: checking assembler supports -relax" >&5
echo "configure:6853: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -6880,7 +6879,7 @@ EOF
case "$tm_file" in
*64*)
echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
echo "configure:6884: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
echo "configure:6883: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -6925,7 +6924,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:6929: checking for assembler offsetable %lo() support" >&5
echo "configure:6928: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -6964,7 +6963,7 @@ EOF
i[34567]86-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:6968: checking assembler instructions" >&5
echo "configure:6967: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
......@@ -6993,7 +6992,7 @@ EOF
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:6997: checking assembler dwarf2 debug_line support" >&5
echo "configure:6996: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
......@@ -7178,7 +7177,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:7182: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:7181: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
......
......@@ -1075,10 +1075,9 @@ fi
# have its own set of headers then define
# inhibit_libc
# If this is using newlib, then define inhibit_libc in
# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
# libgcc.a, but that's OK because newlib should have its own version of
# assert.h.
# If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
inhibit_libc=
if [test x$host != x$target] && [test x$with_headers = x]; then
inhibit_libc=-Dinhibit_libc
......
......@@ -9,6 +9,3 @@ SYSTEM_HEADER_DIR = $(CROSS_SYSTEM_HEADER_DIR)
# Don't try to compile the things we can't compile.
ALL = all.cross
# Don't install assert.h in /usr/local/include.
assertdir = $(tooldir)/include
......@@ -221,12 +221,4 @@ fi
done
if [ x${INSTALL_ASSERT_H} != x ]
then
cd ${ORIG_DIR}
rm -f include/assert.h
cp ${srcdir}/assert.h include/assert.h || exit 1
chmod a+r include/assert.h
fi
exit 0
......@@ -162,12 +162,4 @@ done
done # for include directory list
if [ x${INSTALL_ASSERT_H} != x ]
then
cd ${ORIG_DIR}
rm -f include/assert.h
cp ${srcdir}/assert.h include/assert.h || exit 1
chmod a+r include/assert.h
fi
exit 0
......@@ -263,12 +263,4 @@ fi
done
if [ x${INSTALL_ASSERT_H} != x ]
then
cd ${ORIG_DIR}
rm -f include/assert.h
cp ${srcdir}/assert.h include/assert.h || exit 1
chmod a+r include/assert.h
fi
exit 0
......@@ -1806,12 +1806,4 @@ chmod a+r ${LIB}/sys/byteorder.h
done
if [ x${INSTALL_ASSERT_H} != x ]
then
cd ${ORIG_DIR}
rm -f include/assert.h
cp ${srcdir}/assert.h include/assert.h || exit 1
chmod a+r include/assert.h
fi
exit 0
......@@ -229,12 +229,4 @@ for file in $files; do
rmdir $LIB/$file > NUL 2>&1
done
if [ x${INSTALL_ASSERT_H} != x ]
then
cd ${ORIG_DIR}
rm -f include/assert.h
cp ${srcdir}/assert.h include/assert.h || exit 1
chmod a+r include/assert.h
fi
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment