summaryrefslogtreecommitdiff
path: root/mcon
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-19 20:47:55 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-19 21:28:21 -0700
commit50ca5b27f2f7c51d062b3a89d334f7243f467078 (patch)
tree3af98da9dd271527231241fa5b5dc43055bc0c14 /mcon
parent0664966ad710d299c3ab43a8fe06d141306a0e68 (diff)
upgrade(new git snapshot): Ack NMUs and refresh fromn github
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
Diffstat (limited to 'mcon')
-rw-r--r--mcon/U/d_fast_assert.U85
-rwxr-xr-xmcon/man/mconfig.SH2
-rwxr-xr-xmcon/mconfig.SH2
-rwxr-xr-xmcon/mxref.SH2
4 files changed, 90 insertions, 1 deletions
diff --git a/mcon/U/d_fast_assert.U b/mcon/U/d_fast_assert.U
new file mode 100644
index 0000000..dba5132
--- /dev/null
+++ b/mcon/U/d_fast_assert.U
@@ -0,0 +1,85 @@
+?RCS: $Id$
+?RCS:
+?RCS: Copyright (c) 2006, Christian Biere
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_fast_assert: Myread Setvar cat gccversion spackage \
+ sed +ccflags +cc +ldflags +optimize
+?MAKE: -pick add $@ %<
+?S:d_fast_assert:
+?S: This variable conditionally defines FAST_ASSERTIONS.
+?S:.
+?C:FAST_ASSERTIONS:
+?C: This symbol, when defined, indicates that the program should make
+?C: use of its own asserting and failure reporting code, instead of
+?C: the one from GLib.
+?C:.
+?H:#$d_fast_assert FAST_ASSERTIONS /**/
+?H:.
+?F:!try.c !try
+?LINT:set d_fast_assert
+?LINT:change ccflags
+: determine whether to enable fast assertions
+echo " "
+case "$d_fast_assert" in
+"$undef")
+ dflt=n;;
+*)
+ dflt=y;;
+esac
+$cat <<EOM
+$spackage contains code called "fast assertions" which are lightweight
+assertions in terms of code space used. They use much less code than
+their GLib counterpart, and therefore should be more efficient.
+
+EOM
+rp='Shall I enable "fast assertions"'
+. ./myread
+case "$ans" in
+y) val="$define";;
+*) val="$undef";;
+esac
+set d_fast_assert
+eval $setvar
+?X: When gcc is used, see whether we can use -momit-leaf-frame-pointer
+?X: This is useful for tail routines containing assertions if they use
+?X: "fast assertions", given that the code is not calling any routine.
+case "$gccversion" in
+'') ;;
+*)
+ case "$d_fast_assert" in
+ "$define")
+ $cat >try.c <<'EOC'
+int main()
+{
+ return 0;
+}
+EOC
+ if $cc $ccflags -momit-leaf-frame-pointer $ldflags -o try try.c >/dev/null 2>&1
+ then
+ case "$ccflags $optimize" in
+ *-momit-leaf-frame-pointer*) ;;
+ *-O0*) ;;
+ *-O*)
+ ccflags="-momit-leaf-frame-pointer $ccflags"
+ echo "Added -momit-leaf-frame-pointer to the cc flags." >&4
+ ;;
+ esac
+ else
+ case "$ccflags" in
+ *-momit-leaf-frame-pointer*)
+ echo "Stripping -momit-leaf-frame-pointer from cc flags." >&4
+ ccflags=`echo $ccflags | $sed 's/ *-momit-leaf-frame-pointer//'`
+ ;;
+ esac
+ fi
+ ;;
+ esac
+;;
+esac
+
diff --git a/mcon/man/mconfig.SH b/mcon/man/mconfig.SH
index 1dd8a97..112c6f1 100755
--- a/mcon/man/mconfig.SH
+++ b/mcon/man/mconfig.SH
@@ -23,7 +23,7 @@ $spitshell >metaconfig.$manext <<!GROK!THIS!
.\" $Id$
.\"
.\" Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
-.\"
+.\"
.\" You may redistribute only under the terms of the Artistic Licence,
.\" as specified in the README file that comes with the distribution.
.\" You may reuse parts of this distribution only within the terms of
diff --git a/mcon/mconfig.SH b/mcon/mconfig.SH
index 42a3dc1..ee17057 100755
--- a/mcon/mconfig.SH
+++ b/mcon/mconfig.SH
@@ -70,6 +70,8 @@ chop($date = `date`);
use Getopt::Std;
&usage unless getopts("dhkmostvwGMVL:X:");
+my %excluded_symbol;
+read_exclusions($opt_X);
$MC = $opt_L if $opt_L; # May override public library path
$MC = &tilda_expand($MC); # ~name expansion
chop($WD = `pwd`); # Working directory
diff --git a/mcon/mxref.SH b/mcon/mxref.SH
index fa9e44e..439aef8 100755
--- a/mcon/mxref.SH
+++ b/mcon/mxref.SH
@@ -64,6 +64,8 @@ use Getopt::Std;
chop($date = `date`);
chop($WD = `pwd`); # Working directory
+my %excluded_symbol;
+read_exclusions($opt_X);
$MC = $opt_L if $opt_L; # May override library path
$MC = &tilda_expand($MC); # ~name expansion
chdir $MC || die "Can't chdir to $MC: $!\n";