[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Some DJGPP tweaks
From: |
Tim Van Holder |
Subject: |
Some DJGPP tweaks |
Date: |
Sun, 24 Jun 2001 17:28:57 +0200 |
First off, I'd like to request that the -*-Shell-script-*-
markers be replaced by -*-autoconf-*-, as shell-script-mode
in emacs gets the fontification all wrong, making the files
hard to edit.
These changes are required for current libtool CVS HEAD to work
properly on DJGPP. The SYS_MAX_CMD_LEN patch is critical; otherwise
the test will have effects ranging from slowdowns (> 5 mions for the
test) to system reboots. The change to AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
is required for that test to succeed, but isn't critical because the
result is probably not needed on DJGPP (no shared libs).
2001-06-24 Tim Van Holder <address@hidden>
* libtool.m4: Use the canonical absolute path test
([\\/]* | ?:[\\/]) and $lt_cv_sys_path_separator wherever
appropriate.
(AC_LIBTOOL_PROG_CC_PIC): Properly recognize DJGPP as a
platform that doesn't support shared libraries.
(AC_LIBTOOL_SYS_MAX_CMD_LEN): Avoid this test on DJGPP; use a
fixed value (12K) instead.
(AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE): Don't forget $ac_exeext
when testing for link success.
Index: libtool.m4
===================================================================
RCS file: /home/cvs/libtool/libtool.m4,v
retrieving revision 1.170
diff -u -u -r1.170 libtool.m4
--- libtool.m4 2001/06/06 22:06:57 1.170
+++ libtool.m4 2001/06/24 15:17:35
@@ -534,6 +534,13 @@
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
[max_cmd_len=
# find the maximum length of command line arguments
+dnl On DJGPP, this test can blow up pretty badly due to problems in libc
+dnl (any single argument exceeding 2000 bytes causes a buffer overrun
during
+dnl glob expansion). Even if it were fixed, the result of this check would
+dnl be larger than it should be. So override it here.
+case $host_os in
+ msdosdjgpp*) lt_cv_sys_max_cmd_len=12288;; # 12K is about right
+esac
AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
i=0
@@ -703,7 +710,7 @@
save_CFLAGS="$CFLAGS"
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS="$save_LIBS"
@@ -1052,15 +1059,17 @@
# Common symbols not allowed in MH_DYLIB files
lt_cv_prog_cc_pic='-fno-common'
;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- lt_cv_prog_cc_pic=
- ;;
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared
libraries
+ # on systems that don't support them.
+ enable_shared=no
+ lt_cv_prog_cc_can_build_shared=no
+ ;;
sysv4*MP*)
if test -d /usr/nec; then
lt_cv_prog_cc_pic=-Kconform_pic
fi
;;
*)
lt_cv_prog_cc_pic='-fPIC'
;;
@@ -3297,15 +3310,12 @@
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a
path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a
dos path.
+ [\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a
path.
;;
*)
ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$lt_cv_sys_path_separator"
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
@@ -3362,7 +3372,7 @@
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
+ AC_PATH_TOOL_PREFIX(file, "/usr/bin$lt_cv_sys_path_separator$PATH")
else
MAGIC_CMD=:
fi
@@ -3393,7 +3403,7 @@
esac
case $ac_prog in
# Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
+ [[\\/]]* | ?:[[\\/]]*)
[re_direlt='/[^/][^/]*/\.\./']
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
@@ -3418,7 +3428,7 @@
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ IFS="${IFS= }"; ac_save_ifs="$IFS";
IFS="${IFS}$lt_cv_sys_path_separator"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext";
then
@@ -3663,7 +3673,7 @@
# Let the user override the test.
lt_cv_path_NM="$NM"
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ IFS="${IFS= }"; ac_save_ifs="$IFS";
IFS="${IFS}$lt_cv_sys_path_separator"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
tmp_nm=$ac_dir/${ac_tool_prefix}nm
- Some DJGPP tweaks,
Tim Van Holder <=
- Re: Some DJGPP tweaks, Gary V . Vaughan, 2001/06/24
- Re: Some DJGPP tweaks, Tim Van Holder, 2001/06/25
- Re: Some DJGPP tweaks, Gary V . Vaughan, 2001/06/25
- RE: Some DJGPP tweaks, Tim Van Holder, 2001/06/26
- Re: Some DJGPP tweaks, Gary V . Vaughan, 2001/06/28
- Re: Some DJGPP tweaks, Tim Van Holder, 2001/06/28
- HEAD status report [Was Re: Some DJGPP tweaks], Gary V . Vaughan, 2001/06/28