[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BFD portability problems on GNU coreutils 4.5.4 hosts
From: |
Paul Eggert |
Subject: |
BFD portability problems on GNU coreutils 4.5.4 hosts |
Date: |
Tue, 17 Dec 2002 16:54:31 -0800 |
In a couple of places BFD relies on obsolete behavior that has been
removed from POSIX. If you configure with _POSIX2_VERSION=200112 in
your environment (to enable pedantic POSIX 1003.1-2001 mode in recent
versions of GNU coreutils), the build process will fail. Here is a
patch to fix the portability problems that I found.
2002-12-17 Paul Eggert <address@hidden>
Port to POSIX 1003.1-2001.
* bfd/acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
* bfd/configure.in (build-warnings): Likewise.
(Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
===================================================================
RCS file: bfd/acinclude.m4,v
retrieving revision 5.3
retrieving revision 5.3.0.1
diff -pu -r5.3 -r5.3.0.1
--- bfd/acinclude.m4 2002/05/17 10:34:00 5.3
+++ bfd/acinclude.m4 2002/12/17 21:54:48 5.3.0.1
@@ -129,7 +129,7 @@ AC_DEFUN([AM_INSTALL_LIBBFD],
AC_ARG_ENABLE(install-libbfd,
[ --install-libbfd controls installation of libbfd and related headers],
install_libbfd_p=$enableval,
- if test "${host}" = "${target}" -o "$enable_shared" = "yes"; then
+ if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
install_libbfd_p=yes
else
install_libbfd_p=no
===================================================================
RCS file: bfd/configure.in,v
retrieving revision 5.3
retrieving revision 5.3.0.1
diff -pu -r5.3 -r5.3.0.1
--- bfd/configure.in 2002/08/28 10:38:45 5.3
+++ bfd/configure.in 2002/12/17 21:59:57 5.3.0.1
@@ -86,7 +86,7 @@ if test x"$silent" != x"yes" && test x"$
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
+if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
@@ -446,7 +446,7 @@ case "${host}" in
;;
*)
changequote(,)dnl
- x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' <
../libiberty/Makefile | tail -1`
+ x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' <
../libiberty/Makefile | sed -n '$p'`
changequote([,])dnl
if test -n "$x"; then
WIN32LIBADD="-L../libiberty/pic -liberty"
- BFD portability problems on GNU coreutils 4.5.4 hosts,
Paul Eggert <=