sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-09-11 21:36:40 +00:00
parent 010ec4e74c
commit 2a511f7966
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
51 changed files with 340 additions and 268 deletions

View file

@ -858,7 +858,7 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;;
exit 0 ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;;

View file

@ -55,9 +55,9 @@ then
then
dummy=if$$
cat >$dummy.c <<EOF
#include <features.h>
#include <features.h>
main(argc, argv)
int argc;
int argc;
char *argv[];
{
printf("%d\n", __GLIBC_MINOR__);

22
gnu/share/configure vendored
View file

@ -10,12 +10,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -27,7 +27,7 @@
# preparation for compilation.
#
# If configure succeeds, it leaves its status in config.status.
# If configure fails after disturbing the status quo,
# If configure fails after disturbing the status quo,
# config.status is removed.
#
@ -188,7 +188,7 @@ do
--*) ;;
-*) option=-$option ;;
esac
# Split out the argument for options that take them
case $option in
--*=*)
@ -790,7 +790,7 @@ tooldir='$(exec_prefix)'/${target_alias}
if [ "${host_alias}" != "${target_alias}" ] ; then
if [ "${program_prefixoption}" = "" ] ; then
if [ "${program_suffixoption}" = "" ] ; then
if [ "${program_suffixoption}" = "" ] ; then
if [ "${program_transform_nameoption}" = "" ] ; then
program_prefix=${target_alias}- ;
fi
@ -1144,7 +1144,7 @@ for subdir in . ${subdirs} ; do
if [ ! -r ${srcdir}/${file} ] ; then
if [ ! -r ${file} ] ; then
echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
exit 1
@ -1160,7 +1160,7 @@ for subdir in . ${subdirs} ; do
if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
true
else
# We need to re-remove the file because Lynx leaves a
# We need to re-remove the file because Lynx leaves a
# very strange directory there when it fails an NFS symlink.
${remove} -r -f ${link}
${hard_link} ${srcfile} ${link}
@ -1198,7 +1198,7 @@ EOF
# code is order so as to try to sed the smallest input files we know.
# so do these separately because I don't trust the order of sed -e expressions.
# the five makefile fragments MUST end up in the resulting Makefile in this order:
# the five makefile fragments MUST end up in the resulting Makefile in this order:
# package macros, target, host, site, and package rules.
if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
@ -1422,7 +1422,7 @@ EOF
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
-e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
${subdir}/Makefile.tem >> ${Makefile}
sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
mv -f ${Makefile}.tem ${Makefile}
@ -1507,7 +1507,7 @@ ${progname}" ${arguments} "
done
# If there are subdirectories, then recur.
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
for configdir in ${configdirs} ${extraconfigdirs} ; do
# If configdir contains ',' it is
@ -1541,7 +1541,7 @@ if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
esac
POPDIR=${PWD=`pwd`}
cd ${bld_dir}
cd ${bld_dir}
### figure out what to do with srcdir
case "${srcdir}" in

View file

@ -115,7 +115,7 @@ fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
@ -125,7 +125,7 @@ if [ x"$dir_arg" != x ]; then
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
@ -135,7 +135,7 @@ else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
@ -202,17 +202,17 @@ else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
@ -243,7 +243,7 @@ else
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&

View file

@ -777,7 +777,7 @@ if test -n "$pic_flag"; then
if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
case "$host_os" in
hpux9* | hpux10* | hpux11*)
# On HP-UX, both CC and GCC only warn that PIC is supported... then they
@ -937,7 +937,7 @@ if test "$with_gcc" = yes; then
else
no_builtin_flag=' -fno-builtin'
fi
fi
# Check for any special shared library compilation flags.
@ -1183,7 +1183,7 @@ EOF
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
$CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
;;
netbsd*)
@ -1215,7 +1215,7 @@ EOF
else
ld_shlibs=no
fi
;;
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
@ -1469,8 +1469,8 @@ else
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
@ -1867,7 +1867,7 @@ cygwin* | mingw*)
freebsd1*)
dynamic_linker=no
;;
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
@ -2429,10 +2429,10 @@ fi
fi
fi
fi
@ -2538,7 +2538,7 @@ else
fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF
if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
@ -2611,7 +2611,7 @@ else
fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF
if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null

View file

@ -696,29 +696,29 @@ compiler."
# starting and closing comments
# /* impgen.c starts here */
# /* Copyright (C) 1999 Free Software Foundation, Inc.
#
#
# This file is part of GNU libtool.
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# */
#
#
# #include <stdio.h> /* for printf() */
# #include <unistd.h> /* for open(), lseek(), read() */
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
# #include <string.h> /* for strdup() */
#
#
# static unsigned int
# pe_get16 (fd, offset)
# int fd;
@ -729,7 +729,7 @@ compiler."
# read (fd, b, 2);
# return b[0] + (b[1]<<8);
# }
#
#
# static unsigned int
# pe_get32 (fd, offset)
# int fd;
@ -740,7 +740,7 @@ compiler."
# read (fd, b, 4);
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
# }
#
#
# static unsigned int
# pe_as32 (ptr)
# void *ptr;
@ -748,7 +748,7 @@ compiler."
# unsigned char *b = ptr;
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
# }
#
#
# int
# main (argc, argv)
# int argc;
@ -760,32 +760,32 @@ compiler."
# unsigned long name_rvas, nexp;
# unsigned char *expdata, *erva;
# char *filename, *dll_name;
#
#
# filename = argv[1];
#
#
# dll = open(filename, O_RDONLY|O_BINARY);
# if (!dll)
# return 1;
#
#
# dll_name = filename;
#
#
# for (i=0; filename[i]; i++)
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
# dll_name = filename + i +1;
#
#
# pe_header_offset = pe_get32 (dll, 0x3c);
# opthdr_ofs = pe_header_offset + 4 + 20;
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
#
#
# if (num_entries < 1) /* no exports */
# return 1;
#
#
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
# export_size = pe_get32 (dll, opthdr_ofs + 100);
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
# secptr = (pe_header_offset + 4 + 20 +
# pe_get16 (dll, pe_header_offset + 4 + 16));
#
#
# expptr = 0;
# for (i = 0; i < nsections; i++)
# {
@ -804,22 +804,22 @@ compiler."
# break;
# }
# }
#
#
# expdata = (unsigned char*)malloc(export_size);
# lseek (dll, expptr, SEEK_SET);
# read (dll, expdata, export_size);
# erva = expdata - export_rva;
#
#
# nexp = pe_as32 (expdata+24);
# name_rvas = pe_as32 (expdata+32);
#
#
# printf ("EXPORTS\n");
# for (i = 0; i<nexp; i++)
# {
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
# }
#
#
# return 0;
# }
# /* impgen.c ends here */
@ -849,7 +849,7 @@ compiler."
# now prepend the system-specific ones
eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
avoid_version=no
dlfiles=
dlprefiles=
@ -1351,7 +1351,7 @@ compiler."
fi
;;
esac
# This is the magic to use -rpath.
# Skip directories that are in the system default run-time
# search path, unless they have been requested with -R.
@ -1360,7 +1360,7 @@ compiler."
*)
case "$compile_rpath " in
*" $absdir "*) ;;
*) compile_rpath="$compile_rpath $absdir"
*) compile_rpath="$compile_rpath $absdir"
esac
;;
esac
@ -1797,7 +1797,7 @@ compiler."
versuffix=
verstring=""
fi
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
if test "$allow_undefined_flag" = unsupported; then
@ -1956,7 +1956,7 @@ EOF
# Follow soft links.
if ls -lLd "$potent_lib" 2>/dev/null \
| grep " -> " >/dev/null; then
continue
continue
fi
# The statement above tries to avoid entering an
# endless loop below, in case of cyclic links.
@ -2051,7 +2051,7 @@ EOF
library_names=
old_library=
dlname=
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
# Get the real and link names of the library.
@ -2250,7 +2250,7 @@ EOF
gentop=
# reload_cmds runs $LD directly, so let us get rid of
# -Wl from whole_archive_flag_spec
wl=
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
@ -2378,9 +2378,9 @@ EOF
if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
test "$dlopen_self_static" = unknown; then
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
fi
fi
fi
if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
for libdir in $rpath $xrpath; do
@ -2544,7 +2544,7 @@ extern \"C\" {
$run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
if test -n "$export_symbols_regex"; then
$run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
@ -2687,7 +2687,7 @@ static const void *lt_preloaded_setup() {
$show "$link_command"
$run eval "$link_command"
status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
$show "$rm $output_objdir/${outputname}S.${objext}"
@ -2747,7 +2747,7 @@ static const void *lt_preloaded_setup() {
# Fast installation is not supported
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
$echo "$modename: \`$output' will be relinked during installation" 1>&2
else
@ -2767,7 +2767,7 @@ static const void *lt_preloaded_setup() {
# Replace the output file specification.
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
# Delete the old output files.
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
@ -2880,7 +2880,7 @@ else
echo >> $output "\
program=lt-'$outputname'
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" || \\
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
@ -3011,7 +3011,7 @@ fi\
exit $status
fi
generated="$generated $gentop"
# Add in members from convenience archives.
for xlib in $addlibs; do
# Extract the objects.

View file

@ -4100,7 +4100,7 @@ while test "$type"; do
for fp in $gfpth; do
if test "X$fp" = X.; then
pf="$ansexp"
else
else
pf="$fp/$ansexp"
fi
if test -f "$pf"; then
@ -4121,7 +4121,7 @@ while test "$type"; do
if test "X$fp" = X.; then
dir="$ans"
direxp="$ansexp"
else
else
dir="$fp/$ansexp"
direxp="$fp/$ansexp"
fi
@ -15773,7 +15773,7 @@ set gettimeofday d_gettimeod
eval $inlibc
case "$d_gettimeod" in
"$undef")
set ftime d_ftime
set ftime d_ftime
eval $inlibc
;;
*)