ffi 1.13.1 → 1.15.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/Gemfile +1 -4
- data/README.md +14 -2
- data/Rakefile +23 -23
- data/ext/ffi_c/AbstractMemory.c +24 -25
- data/ext/ffi_c/Buffer.c +2 -7
- data/ext/ffi_c/Call.c +2 -8
- data/ext/ffi_c/ClosurePool.c +64 -11
- data/ext/ffi_c/ClosurePool.h +3 -1
- data/ext/ffi_c/DynamicLibrary.c +1 -6
- data/ext/ffi_c/Function.c +31 -16
- data/ext/ffi_c/Function.h +0 -4
- data/ext/ffi_c/FunctionInfo.c +2 -6
- data/ext/ffi_c/LastError.c +2 -6
- data/ext/ffi_c/MemoryPointer.c +2 -7
- data/ext/ffi_c/MemoryPointer.h +0 -4
- data/ext/ffi_c/MethodHandle.c +4 -8
- data/ext/ffi_c/Platform.c +2 -7
- data/ext/ffi_c/Pointer.c +24 -25
- data/ext/ffi_c/Pointer.h +0 -4
- data/ext/ffi_c/Struct.c +3 -6
- data/ext/ffi_c/StructByValue.c +2 -7
- data/ext/ffi_c/StructLayout.c +2 -6
- data/ext/ffi_c/Thread.c +0 -5
- data/ext/ffi_c/Thread.h +1 -6
- data/ext/ffi_c/Type.c +1 -1
- data/ext/ffi_c/Types.c +6 -7
- data/ext/ffi_c/Types.h +3 -4
- data/ext/ffi_c/Variadic.c +14 -9
- data/ext/ffi_c/extconf.rb +20 -4
- data/ext/ffi_c/libffi/.travis/bfin-sim.exp +1 -1
- data/ext/ffi_c/libffi/.travis/m32r-sim.exp +1 -1
- data/ext/ffi_c/libffi/.travis/moxie-sim.exp +1 -1
- data/ext/ffi_c/libffi/.travis/or1k-sim.exp +1 -1
- data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +1 -1
- data/ext/ffi_c/libffi/.travis/wine-sim.exp +1 -1
- data/ext/ffi_c/libffi/Makefile.am +48 -58
- data/ext/ffi_c/libffi/Makefile.in +420 -156
- data/ext/ffi_c/libffi/README.md +4 -0
- data/ext/ffi_c/libffi/config.guess +552 -331
- data/ext/ffi_c/libffi/config.sub +1321 -1306
- data/ext/ffi_c/libffi/configure +158 -96
- data/ext/ffi_c/libffi/configure.ac +6 -1
- data/ext/ffi_c/libffi/configure.host +32 -20
- data/ext/ffi_c/libffi/doc/Makefile.in +8 -5
- data/ext/ffi_c/libffi/fficonfig.h.in +6 -0
- data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +1 -1
- data/ext/ffi_c/libffi/include/Makefile.in +8 -5
- data/ext/ffi_c/libffi/install-sh +23 -13
- data/ext/ffi_c/libffi/ltmain.sh +156 -61
- data/ext/ffi_c/libffi/man/Makefile.in +8 -5
- data/ext/ffi_c/libffi/missing +8 -8
- data/ext/ffi_c/libffi/msvcc.sh +11 -11
- data/ext/ffi_c/libffi/src/aarch64/ffi.c +45 -35
- data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +10 -5
- data/ext/ffi_c/libffi/src/aarch64/internal.h +1 -0
- data/ext/ffi_c/libffi/src/aarch64/sysv.S +1 -1
- data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +1 -1
- data/ext/ffi_c/libffi/src/arm/ffi.c +22 -0
- data/ext/ffi_c/libffi/src/arm/sysv.S +4 -4
- data/ext/ffi_c/libffi/src/closures.c +23 -6
- data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
- data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
- data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
- data/ext/ffi_c/libffi/src/dlmalloc.c +1 -1
- data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
- data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
- data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
- data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
- data/ext/ffi_c/libffi/src/mips/ffi.c +5 -1
- data/ext/ffi_c/libffi/src/mips/ffitarget.h +1 -1
- data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +13 -1
- data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +1 -1
- data/ext/ffi_c/libffi/src/powerpc/linux64.S +8 -0
- data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +13 -1
- data/ext/ffi_c/libffi/src/prep_cif.c +1 -1
- data/ext/ffi_c/libffi/src/x86/ffi.c +8 -2
- data/ext/ffi_c/libffi/src/x86/ffi64.c +7 -0
- data/ext/ffi_c/libffi/src/x86/ffiw64.c +5 -0
- data/ext/ffi_c/libffi/src/x86/sysv.S +2 -2
- data/ext/ffi_c/libffi/src/x86/unix64.S +1 -2
- data/ext/ffi_c/libffi/src/x86/win64.S +3 -2
- data/ext/ffi_c/libffi/src/x86/win64_intel.S +3 -2
- data/ext/ffi_c/libffi/testsuite/Makefile.in +9 -6
- data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +22 -2
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +4 -4
- data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2 -2
- data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +2 -0
- data/ffi.gemspec +1 -1
- data/lib/ffi.rb +3 -4
- data/lib/ffi/abstract_memory.rb +44 -0
- data/lib/ffi/autopointer.rb +1 -1
- data/lib/ffi/ffi.rb +1 -0
- data/lib/ffi/io.rb +3 -3
- data/lib/ffi/library.rb +2 -2
- data/lib/ffi/managedstruct.rb +2 -2
- data/lib/ffi/platform.rb +17 -11
- data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
- data/lib/ffi/platform/aarch64-freebsd/types.conf +2 -2
- data/lib/ffi/platform/aarch64-freebsd12/types.conf +113 -60
- data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
- data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
- data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
- data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
- data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
- data/lib/ffi/pointer.rb +2 -2
- data/lib/ffi/tools/const_generator.rb +2 -1
- data/lib/ffi/tools/struct_generator.rb +2 -1
- data/lib/ffi/variadic.rb +1 -10
- data/lib/ffi/version.rb +1 -1
- data/rakelib/ffi_gem_helper.rb +65 -0
- metadata +18 -11
- data/.appveyor.yml +0 -30
- data/.github/workflows/ci.yml +0 -64
- data/.gitignore +0 -25
- data/.gitmodules +0 -4
- data/.travis.yml +0 -58
- data/.yardopts +0 -5
- data/ext/ffi_c/win32/stdbool.h +0 -8
- data/ext/ffi_c/win32/stdint.h +0 -201
@@ -1,7 +1,7 @@
|
|
1
|
-
# Makefile.in generated by automake 1.
|
1
|
+
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
2
2
|
# @configure_input@
|
3
3
|
|
4
|
-
# Copyright (C) 1994-
|
4
|
+
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
5
5
|
|
6
6
|
# This Makefile.in is free software; the Free Software Foundation
|
7
7
|
# gives unlimited permission to copy and/or distribute it,
|
@@ -370,8 +370,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
370
370
|
*config.status*) \
|
371
371
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
372
372
|
*) \
|
373
|
-
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(
|
374
|
-
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(
|
373
|
+
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
374
|
+
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
375
375
|
esac;
|
376
376
|
|
377
377
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
@@ -556,7 +556,10 @@ ctags CTAGS:
|
|
556
556
|
cscope cscopelist:
|
557
557
|
|
558
558
|
|
559
|
-
distdir: $(
|
559
|
+
distdir: $(BUILT_SOURCES)
|
560
|
+
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
561
|
+
|
562
|
+
distdir-am: $(DISTFILES)
|
560
563
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
561
564
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
562
565
|
list='$(DISTFILES)'; \
|
@@ -76,6 +76,9 @@
|
|
76
76
|
/* Define to 1 if you have the `memcpy' function. */
|
77
77
|
#undef HAVE_MEMCPY
|
78
78
|
|
79
|
+
/* Define to 1 if you have the `memfd_create' function. */
|
80
|
+
#undef HAVE_MEMFD_CREATE
|
81
|
+
|
79
82
|
/* Define to 1 if you have the <memory.h> header file. */
|
80
83
|
#undef HAVE_MEMORY_H
|
81
84
|
|
@@ -112,6 +115,9 @@
|
|
112
115
|
/* Define to 1 if you have the <string.h> header file. */
|
113
116
|
#undef HAVE_STRING_H
|
114
117
|
|
118
|
+
/* Define to 1 if you have the <sys/memfd.h> header file. */
|
119
|
+
#undef HAVE_SYS_MEMFD_H
|
120
|
+
|
115
121
|
/* Define to 1 if you have the <sys/mman.h> header file. */
|
116
122
|
#undef HAVE_SYS_MMAN_H
|
117
123
|
|
@@ -186,7 +186,7 @@ def generate_source_and_headers(generate_osx=True, generate_ios=True):
|
|
186
186
|
build_target(desktop64_platform, platform_headers)
|
187
187
|
|
188
188
|
mkdir_p('darwin_common/include')
|
189
|
-
for header_name, tag_tuples in platform_headers.
|
189
|
+
for header_name, tag_tuples in platform_headers.items():
|
190
190
|
basename, suffix = os.path.splitext(header_name)
|
191
191
|
with open(os.path.join('darwin_common/include', header_name), 'w') as header:
|
192
192
|
for tag_tuple in tag_tuples:
|
@@ -1,7 +1,7 @@
|
|
1
|
-
# Makefile.in generated by automake 1.
|
1
|
+
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
2
2
|
# @configure_input@
|
3
3
|
|
4
|
-
# Copyright (C) 1994-
|
4
|
+
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
5
5
|
|
6
6
|
# This Makefile.in is free software; the Free Software Foundation
|
7
7
|
# gives unlimited permission to copy and/or distribute it,
|
@@ -353,8 +353,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|
353
353
|
*config.status*) \
|
354
354
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
355
355
|
*) \
|
356
|
-
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(
|
357
|
-
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(
|
356
|
+
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
357
|
+
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
358
358
|
esac;
|
359
359
|
|
360
360
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
@@ -447,7 +447,10 @@ cscopelist-am: $(am__tagged_files)
|
|
447
447
|
distclean-tags:
|
448
448
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
449
449
|
|
450
|
-
distdir: $(
|
450
|
+
distdir: $(BUILT_SOURCES)
|
451
|
+
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
452
|
+
|
453
|
+
distdir-am: $(DISTFILES)
|
451
454
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
452
455
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
453
456
|
list='$(DISTFILES)'; \
|
data/ext/ffi_c/libffi/install-sh
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
# install - install a program, script, or datafile
|
3
3
|
|
4
|
-
scriptversion=
|
4
|
+
scriptversion=2018-03-11.20; # UTC
|
5
5
|
|
6
6
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
7
7
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
@@ -271,15 +271,18 @@ do
|
|
271
271
|
fi
|
272
272
|
dst=$dst_arg
|
273
273
|
|
274
|
-
# If destination is a directory, append the input filename
|
275
|
-
# if double slashes aren't ignored.
|
274
|
+
# If destination is a directory, append the input filename.
|
276
275
|
if test -d "$dst"; then
|
277
276
|
if test "$is_target_a_directory" = never; then
|
278
277
|
echo "$0: $dst_arg: Is a directory" >&2
|
279
278
|
exit 1
|
280
279
|
fi
|
281
280
|
dstdir=$dst
|
282
|
-
|
281
|
+
dstbase=`basename "$src"`
|
282
|
+
case $dst in
|
283
|
+
*/) dst=$dst$dstbase;;
|
284
|
+
*) dst=$dst/$dstbase;;
|
285
|
+
esac
|
283
286
|
dstdir_status=0
|
284
287
|
else
|
285
288
|
dstdir=`dirname "$dst"`
|
@@ -288,6 +291,11 @@ do
|
|
288
291
|
fi
|
289
292
|
fi
|
290
293
|
|
294
|
+
case $dstdir in
|
295
|
+
*/) dstdirslash=$dstdir;;
|
296
|
+
*) dstdirslash=$dstdir/;;
|
297
|
+
esac
|
298
|
+
|
291
299
|
obsolete_mkdir_used=false
|
292
300
|
|
293
301
|
if test $dstdir_status != 0; then
|
@@ -324,14 +332,16 @@ do
|
|
324
332
|
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
325
333
|
;;
|
326
334
|
*)
|
327
|
-
# $RANDOM is not portable (e.g. dash);
|
328
|
-
# lower collision chance
|
335
|
+
# Note that $RANDOM variable is not portable (e.g. dash); Use it
|
336
|
+
# here however when possible just to lower collision chance.
|
329
337
|
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
338
|
+
|
330
339
|
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
331
340
|
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
341
|
+
# Because "mkdir -p" follows existing symlinks and we likely work
|
342
|
+
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
343
|
+
# directory is successfully created first before we actually test
|
344
|
+
# 'mkdir -p' feature.
|
335
345
|
if (umask $mkdir_umask &&
|
336
346
|
$mkdirprog $mkdir_mode "$tmpdir" &&
|
337
347
|
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
@@ -434,8 +444,8 @@ do
|
|
434
444
|
else
|
435
445
|
|
436
446
|
# Make a couple of temp file names in the proper directory.
|
437
|
-
dsttmp=$
|
438
|
-
rmtmp=$
|
447
|
+
dsttmp=${dstdirslash}_inst.$$_
|
448
|
+
rmtmp=${dstdirslash}_rm.$$_
|
439
449
|
|
440
450
|
# Trap to clean up those temp files at exit.
|
441
451
|
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
@@ -500,9 +510,9 @@ do
|
|
500
510
|
done
|
501
511
|
|
502
512
|
# Local variables:
|
503
|
-
# eval: (add-hook '
|
513
|
+
# eval: (add-hook 'before-save-hook 'time-stamp)
|
504
514
|
# time-stamp-start: "scriptversion="
|
505
515
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
506
|
-
# time-stamp-time-zone: "
|
516
|
+
# time-stamp-time-zone: "UTC0"
|
507
517
|
# time-stamp-end: "; # UTC"
|
508
518
|
# End:
|
data/ext/ffi_c/libffi/ltmain.sh
CHANGED
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
PROGRAM=libtool
|
33
33
|
PACKAGE=libtool
|
34
|
-
VERSION="2.4.6 Debian-2.4.6-
|
34
|
+
VERSION="2.4.6 Debian-2.4.6-14"
|
35
35
|
package_revision=2.4.6
|
36
36
|
|
37
37
|
|
@@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
|
|
387
387
|
# putting '$debug_cmd' at the start of all your functions, you can get
|
388
388
|
# bash to show function call trace with:
|
389
389
|
#
|
390
|
-
# debug_cmd='
|
390
|
+
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
|
391
391
|
debug_cmd=${debug_cmd-":"}
|
392
392
|
exit_cmd=:
|
393
393
|
|
@@ -1370,7 +1370,7 @@ func_lt_ver ()
|
|
1370
1370
|
#! /bin/sh
|
1371
1371
|
|
1372
1372
|
# Set a version string for this script.
|
1373
|
-
scriptversion=
|
1373
|
+
scriptversion=2015-10-07.11; # UTC
|
1374
1374
|
|
1375
1375
|
# A portable, pluggable option parser for Bourne shell.
|
1376
1376
|
# Written by Gary V. Vaughan, 2010
|
@@ -1530,6 +1530,8 @@ func_run_hooks ()
|
|
1530
1530
|
{
|
1531
1531
|
$debug_cmd
|
1532
1532
|
|
1533
|
+
_G_rc_run_hooks=false
|
1534
|
+
|
1533
1535
|
case " $hookable_fns " in
|
1534
1536
|
*" $1 "*) ;;
|
1535
1537
|
*) func_fatal_error "'$1' does not support hook funcions.n" ;;
|
@@ -1538,16 +1540,16 @@ func_run_hooks ()
|
|
1538
1540
|
eval _G_hook_fns=\$$1_hooks; shift
|
1539
1541
|
|
1540
1542
|
for _G_hook in $_G_hook_fns; do
|
1541
|
-
eval $_G_hook '"$@"'
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1543
|
+
if eval $_G_hook '"$@"'; then
|
1544
|
+
# store returned options list back into positional
|
1545
|
+
# parameters for next 'cmd' execution.
|
1546
|
+
eval _G_hook_result=\$${_G_hook}_result
|
1547
|
+
eval set dummy "$_G_hook_result"; shift
|
1548
|
+
_G_rc_run_hooks=:
|
1549
|
+
fi
|
1547
1550
|
done
|
1548
1551
|
|
1549
|
-
|
1550
|
-
func_run_hooks_result=$func_quote_for_eval_result
|
1552
|
+
$_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
|
1551
1553
|
}
|
1552
1554
|
|
1553
1555
|
|
@@ -1557,10 +1559,16 @@ func_run_hooks ()
|
|
1557
1559
|
## --------------- ##
|
1558
1560
|
|
1559
1561
|
# In order to add your own option parsing hooks, you must accept the
|
1560
|
-
# full positional parameter list in your hook function, remove
|
1561
|
-
# options that you action, and then pass back the remaining unprocessed
|
1562
|
+
# full positional parameter list in your hook function, you may remove/edit
|
1563
|
+
# any options that you action, and then pass back the remaining unprocessed
|
1562
1564
|
# options in '<hooked_function_name>_result', escaped suitably for
|
1563
|
-
# 'eval'.
|
1565
|
+
# 'eval'. In this case you also must return $EXIT_SUCCESS to let the
|
1566
|
+
# hook's caller know that it should pay attention to
|
1567
|
+
# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that
|
1568
|
+
# arguments are left untouched by the hook and therefore caller will ignore the
|
1569
|
+
# result variable.
|
1570
|
+
#
|
1571
|
+
# Like this:
|
1564
1572
|
#
|
1565
1573
|
# my_options_prep ()
|
1566
1574
|
# {
|
@@ -1570,9 +1578,11 @@ func_run_hooks ()
|
|
1570
1578
|
# usage_message=$usage_message'
|
1571
1579
|
# -s, --silent don'\''t print informational messages
|
1572
1580
|
# '
|
1573
|
-
#
|
1574
|
-
#
|
1575
|
-
#
|
1581
|
+
# # No change in '$@' (ignored completely by this hook). There is
|
1582
|
+
# # no need to do the equivalent (but slower) action:
|
1583
|
+
# # func_quote_for_eval ${1+"$@"}
|
1584
|
+
# # my_options_prep_result=$func_quote_for_eval_result
|
1585
|
+
# false
|
1576
1586
|
# }
|
1577
1587
|
# func_add_hook func_options_prep my_options_prep
|
1578
1588
|
#
|
@@ -1581,25 +1591,37 @@ func_run_hooks ()
|
|
1581
1591
|
# {
|
1582
1592
|
# $debug_cmd
|
1583
1593
|
#
|
1594
|
+
# args_changed=false
|
1595
|
+
#
|
1584
1596
|
# # Note that for efficiency, we parse as many options as we can
|
1585
1597
|
# # recognise in a loop before passing the remainder back to the
|
1586
1598
|
# # caller on the first unrecognised argument we encounter.
|
1587
1599
|
# while test $# -gt 0; do
|
1588
1600
|
# opt=$1; shift
|
1589
1601
|
# case $opt in
|
1590
|
-
# --silent|-s) opt_silent=:
|
1602
|
+
# --silent|-s) opt_silent=:
|
1603
|
+
# args_changed=:
|
1604
|
+
# ;;
|
1591
1605
|
# # Separate non-argument short options:
|
1592
1606
|
# -s*) func_split_short_opt "$_G_opt"
|
1593
1607
|
# set dummy "$func_split_short_opt_name" \
|
1594
1608
|
# "-$func_split_short_opt_arg" ${1+"$@"}
|
1595
1609
|
# shift
|
1610
|
+
# args_changed=:
|
1596
1611
|
# ;;
|
1597
|
-
# *)
|
1612
|
+
# *) # Make sure the first unrecognised option "$_G_opt"
|
1613
|
+
# # is added back to "$@", we could need that later
|
1614
|
+
# # if $args_changed is true.
|
1615
|
+
# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
|
1598
1616
|
# esac
|
1599
1617
|
# done
|
1600
1618
|
#
|
1601
|
-
#
|
1602
|
-
#
|
1619
|
+
# if $args_changed; then
|
1620
|
+
# func_quote_for_eval ${1+"$@"}
|
1621
|
+
# my_silent_option_result=$func_quote_for_eval_result
|
1622
|
+
# fi
|
1623
|
+
#
|
1624
|
+
# $args_changed
|
1603
1625
|
# }
|
1604
1626
|
# func_add_hook func_parse_options my_silent_option
|
1605
1627
|
#
|
@@ -1611,16 +1633,32 @@ func_run_hooks ()
|
|
1611
1633
|
# $opt_silent && $opt_verbose && func_fatal_help "\
|
1612
1634
|
# '--silent' and '--verbose' options are mutually exclusive."
|
1613
1635
|
#
|
1614
|
-
#
|
1615
|
-
# my_option_validation_result=$func_quote_for_eval_result
|
1636
|
+
# false
|
1616
1637
|
# }
|
1617
1638
|
# func_add_hook func_validate_options my_option_validation
|
1618
1639
|
#
|
1619
|
-
# You'll
|
1640
|
+
# You'll also need to manually amend $usage_message to reflect the extra
|
1620
1641
|
# options you parse. It's preferable to append if you can, so that
|
1621
1642
|
# multiple option parsing hooks can be added safely.
|
1622
1643
|
|
1623
1644
|
|
1645
|
+
# func_options_finish [ARG]...
|
1646
|
+
# ----------------------------
|
1647
|
+
# Finishing the option parse loop (call 'func_options' hooks ATM).
|
1648
|
+
func_options_finish ()
|
1649
|
+
{
|
1650
|
+
$debug_cmd
|
1651
|
+
|
1652
|
+
_G_func_options_finish_exit=false
|
1653
|
+
if func_run_hooks func_options ${1+"$@"}; then
|
1654
|
+
func_options_finish_result=$func_run_hooks_result
|
1655
|
+
_G_func_options_finish_exit=:
|
1656
|
+
fi
|
1657
|
+
|
1658
|
+
$_G_func_options_finish_exit
|
1659
|
+
}
|
1660
|
+
|
1661
|
+
|
1624
1662
|
# func_options [ARG]...
|
1625
1663
|
# ---------------------
|
1626
1664
|
# All the functions called inside func_options are hookable. See the
|
@@ -1630,17 +1668,28 @@ func_options ()
|
|
1630
1668
|
{
|
1631
1669
|
$debug_cmd
|
1632
1670
|
|
1633
|
-
|
1634
|
-
eval func_parse_options \
|
1635
|
-
${func_options_prep_result+"$func_options_prep_result"}
|
1636
|
-
eval func_validate_options \
|
1637
|
-
${func_parse_options_result+"$func_parse_options_result"}
|
1671
|
+
_G_rc_options=false
|
1638
1672
|
|
1639
|
-
|
1640
|
-
|
1673
|
+
for my_func in options_prep parse_options validate_options options_finish
|
1674
|
+
do
|
1675
|
+
if eval func_$my_func '${1+"$@"}'; then
|
1676
|
+
eval _G_res_var='$'"func_${my_func}_result"
|
1677
|
+
eval set dummy "$_G_res_var" ; shift
|
1678
|
+
_G_rc_options=:
|
1679
|
+
fi
|
1680
|
+
done
|
1681
|
+
|
1682
|
+
# Save modified positional parameters for caller. As a top-level
|
1683
|
+
# options-parser function we always need to set the 'func_options_result'
|
1684
|
+
# variable (regardless the $_G_rc_options value).
|
1685
|
+
if $_G_rc_options; then
|
1686
|
+
func_options_result=$_G_res_var
|
1687
|
+
else
|
1688
|
+
func_quote_for_eval ${1+"$@"}
|
1689
|
+
func_options_result=$func_quote_for_eval_result
|
1690
|
+
fi
|
1641
1691
|
|
1642
|
-
|
1643
|
-
func_options_result=$func_run_hooks_result
|
1692
|
+
$_G_rc_options
|
1644
1693
|
}
|
1645
1694
|
|
1646
1695
|
|
@@ -1649,9 +1698,9 @@ func_options ()
|
|
1649
1698
|
# All initialisations required before starting the option parse loop.
|
1650
1699
|
# Note that when calling hook functions, we pass through the list of
|
1651
1700
|
# positional parameters. If a hook function modifies that list, and
|
1652
|
-
# needs to
|
1701
|
+
# needs to propagate that back to rest of this script, then the complete
|
1653
1702
|
# modified list must be put in 'func_run_hooks_result' before
|
1654
|
-
# returning.
|
1703
|
+
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
|
1655
1704
|
func_hookable func_options_prep
|
1656
1705
|
func_options_prep ()
|
1657
1706
|
{
|
@@ -1661,10 +1710,14 @@ func_options_prep ()
|
|
1661
1710
|
opt_verbose=false
|
1662
1711
|
opt_warning_types=
|
1663
1712
|
|
1664
|
-
|
1713
|
+
_G_rc_options_prep=false
|
1714
|
+
if func_run_hooks func_options_prep ${1+"$@"}; then
|
1715
|
+
_G_rc_options_prep=:
|
1716
|
+
# save modified positional parameters for caller
|
1717
|
+
func_options_prep_result=$func_run_hooks_result
|
1718
|
+
fi
|
1665
1719
|
|
1666
|
-
|
1667
|
-
func_options_prep_result=$func_run_hooks_result
|
1720
|
+
$_G_rc_options_prep
|
1668
1721
|
}
|
1669
1722
|
|
1670
1723
|
|
@@ -1678,18 +1731,20 @@ func_parse_options ()
|
|
1678
1731
|
|
1679
1732
|
func_parse_options_result=
|
1680
1733
|
|
1734
|
+
_G_rc_parse_options=false
|
1681
1735
|
# this just eases exit handling
|
1682
1736
|
while test $# -gt 0; do
|
1683
1737
|
# Defer to hook functions for initial option parsing, so they
|
1684
1738
|
# get priority in the event of reusing an option name.
|
1685
|
-
func_run_hooks func_parse_options ${1+"$@"}
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1739
|
+
if func_run_hooks func_parse_options ${1+"$@"}; then
|
1740
|
+
eval set dummy "$func_run_hooks_result"; shift
|
1741
|
+
_G_rc_parse_options=:
|
1742
|
+
fi
|
1689
1743
|
|
1690
1744
|
# Break out of the loop if we already parsed every option.
|
1691
1745
|
test $# -gt 0 || break
|
1692
1746
|
|
1747
|
+
_G_match_parse_options=:
|
1693
1748
|
_G_opt=$1
|
1694
1749
|
shift
|
1695
1750
|
case $_G_opt in
|
@@ -1704,7 +1759,10 @@ func_parse_options ()
|
|
1704
1759
|
;;
|
1705
1760
|
|
1706
1761
|
--warnings|--warning|-W)
|
1707
|
-
test $# = 0 && func_missing_arg $_G_opt
|
1762
|
+
if test $# = 0 && func_missing_arg $_G_opt; then
|
1763
|
+
_G_rc_parse_options=:
|
1764
|
+
break
|
1765
|
+
fi
|
1708
1766
|
case " $warning_categories $1" in
|
1709
1767
|
*" $1 "*)
|
1710
1768
|
# trailing space prevents matching last $1 above
|
@@ -1757,15 +1815,25 @@ func_parse_options ()
|
|
1757
1815
|
shift
|
1758
1816
|
;;
|
1759
1817
|
|
1760
|
-
--) break ;;
|
1818
|
+
--) _G_rc_parse_options=: ; break ;;
|
1761
1819
|
-*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
|
1762
|
-
*) set dummy "$_G_opt" ${1+"$@"}; shift
|
1820
|
+
*) set dummy "$_G_opt" ${1+"$@"}; shift
|
1821
|
+
_G_match_parse_options=false
|
1822
|
+
break
|
1823
|
+
;;
|
1763
1824
|
esac
|
1825
|
+
|
1826
|
+
$_G_match_parse_options && _G_rc_parse_options=:
|
1764
1827
|
done
|
1765
1828
|
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1829
|
+
|
1830
|
+
if $_G_rc_parse_options; then
|
1831
|
+
# save modified positional parameters for caller
|
1832
|
+
func_quote_for_eval ${1+"$@"}
|
1833
|
+
func_parse_options_result=$func_quote_for_eval_result
|
1834
|
+
fi
|
1835
|
+
|
1836
|
+
$_G_rc_parse_options
|
1769
1837
|
}
|
1770
1838
|
|
1771
1839
|
|
@@ -1778,16 +1846,21 @@ func_validate_options ()
|
|
1778
1846
|
{
|
1779
1847
|
$debug_cmd
|
1780
1848
|
|
1849
|
+
_G_rc_validate_options=false
|
1850
|
+
|
1781
1851
|
# Display all warnings if -W was not given.
|
1782
1852
|
test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
|
1783
1853
|
|
1784
|
-
func_run_hooks func_validate_options ${1+"$@"}
|
1854
|
+
if func_run_hooks func_validate_options ${1+"$@"}; then
|
1855
|
+
# save modified positional parameters for caller
|
1856
|
+
func_validate_options_result=$func_run_hooks_result
|
1857
|
+
_G_rc_validate_options=:
|
1858
|
+
fi
|
1785
1859
|
|
1786
1860
|
# Bail if the options were screwed!
|
1787
1861
|
$exit_cmd $EXIT_FAILURE
|
1788
1862
|
|
1789
|
-
|
1790
|
-
func_validate_options_result=$func_run_hooks_result
|
1863
|
+
$_G_rc_validate_options
|
1791
1864
|
}
|
1792
1865
|
|
1793
1866
|
|
@@ -2068,7 +2141,7 @@ include the following information:
|
|
2068
2141
|
compiler: $LTCC
|
2069
2142
|
compiler flags: $LTCFLAGS
|
2070
2143
|
linker: $LD (gnu? $with_gnu_ld)
|
2071
|
-
version: $progname $scriptversion Debian-2.4.6-
|
2144
|
+
version: $progname $scriptversion Debian-2.4.6-14
|
2072
2145
|
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
|
2073
2146
|
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
2074
2147
|
|
@@ -2270,6 +2343,8 @@ libtool_options_prep ()
|
|
2270
2343
|
nonopt=
|
2271
2344
|
preserve_args=
|
2272
2345
|
|
2346
|
+
_G_rc_lt_options_prep=:
|
2347
|
+
|
2273
2348
|
# Shorthand for --mode=foo, only valid as the first argument
|
2274
2349
|
case $1 in
|
2275
2350
|
clean|clea|cle|cl)
|
@@ -2293,11 +2368,18 @@ libtool_options_prep ()
|
|
2293
2368
|
uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
|
2294
2369
|
shift; set dummy --mode uninstall ${1+"$@"}; shift
|
2295
2370
|
;;
|
2371
|
+
*)
|
2372
|
+
_G_rc_lt_options_prep=false
|
2373
|
+
;;
|
2296
2374
|
esac
|
2297
2375
|
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2376
|
+
if $_G_rc_lt_options_prep; then
|
2377
|
+
# Pass back the list of options.
|
2378
|
+
func_quote_for_eval ${1+"$@"}
|
2379
|
+
libtool_options_prep_result=$func_quote_for_eval_result
|
2380
|
+
fi
|
2381
|
+
|
2382
|
+
$_G_rc_lt_options_prep
|
2301
2383
|
}
|
2302
2384
|
func_add_hook func_options_prep libtool_options_prep
|
2303
2385
|
|
@@ -2309,9 +2391,12 @@ libtool_parse_options ()
|
|
2309
2391
|
{
|
2310
2392
|
$debug_cmd
|
2311
2393
|
|
2394
|
+
_G_rc_lt_parse_options=false
|
2395
|
+
|
2312
2396
|
# Perform our own loop to consume as many options as possible in
|
2313
2397
|
# each iteration.
|
2314
2398
|
while test $# -gt 0; do
|
2399
|
+
_G_match_lt_parse_options=:
|
2315
2400
|
_G_opt=$1
|
2316
2401
|
shift
|
2317
2402
|
case $_G_opt in
|
@@ -2386,15 +2471,22 @@ libtool_parse_options ()
|
|
2386
2471
|
func_append preserve_args " $_G_opt"
|
2387
2472
|
;;
|
2388
2473
|
|
2389
|
-
|
2390
|
-
*)
|
2474
|
+
# An option not handled by this hook function:
|
2475
|
+
*) set dummy "$_G_opt" ${1+"$@"} ; shift
|
2476
|
+
_G_match_lt_parse_options=false
|
2477
|
+
break
|
2478
|
+
;;
|
2391
2479
|
esac
|
2480
|
+
$_G_match_lt_parse_options && _G_rc_lt_parse_options=:
|
2392
2481
|
done
|
2393
2482
|
|
2483
|
+
if $_G_rc_lt_parse_options; then
|
2484
|
+
# save modified positional parameters for caller
|
2485
|
+
func_quote_for_eval ${1+"$@"}
|
2486
|
+
libtool_parse_options_result=$func_quote_for_eval_result
|
2487
|
+
fi
|
2394
2488
|
|
2395
|
-
|
2396
|
-
func_quote_for_eval ${1+"$@"}
|
2397
|
-
libtool_parse_options_result=$func_quote_for_eval_result
|
2489
|
+
$_G_rc_lt_parse_options
|
2398
2490
|
}
|
2399
2491
|
func_add_hook func_parse_options libtool_parse_options
|
2400
2492
|
|
@@ -7275,10 +7367,13 @@ func_mode_link ()
|
|
7275
7367
|
# -specs=* GCC specs files
|
7276
7368
|
# -stdlib=* select c++ std lib with clang
|
7277
7369
|
# -fsanitize=* Clang/GCC memory and address sanitizer
|
7370
|
+
# -fuse-ld=* Linker select flags for GCC
|
7371
|
+
# -static-* direct GCC to link specific libraries statically
|
7372
|
+
# -fcilkplus Cilk Plus language extension features for C/C++
|
7278
7373
|
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
7279
7374
|
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
|
7280
7375
|
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
|
7281
|
-
-specs=*|-fsanitize
|
7376
|
+
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
|
7282
7377
|
func_quote_for_eval "$arg"
|
7283
7378
|
arg=$func_quote_for_eval_result
|
7284
7379
|
func_append compile_command " $arg"
|