source: mainline/uspace/app/binutils/intrusive.sh@ cb7c685

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since cb7c685 was cb7c685, checked in by Petr Koupy <petr.koupy@…>, 14 years ago

Improved syntax for file appending in shell scripts.
Minor improvements in comments.

  • Property mode set to 100755
File size: 2.1 KB
Line 
1#! /bin/bash
2
3#
4# Copyright (c) 2011 Petr Koupy
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions
9# are met:
10#
11# - Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer.
13# - Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution.
16# - The name of the author may not be used to endorse or promote products
17# derived from this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29#
30
31#
32# This shell script is reserved for intrusive patches (hacks) to binutils
33# that cannot be done in a clean and isolated way or for which doing so
34# would require too much complexity.
35#
36
37case "$1" in
38 "do")
39 # Binutils plugin support is dependent on libdl.so library.
40 # By default, the plugin support is switched off for all
41 # configure scripts of binutils. The only exception is configure
42 # script of ld 2.21 (and possibly above), where plugin support
43 # became mandatory (although not really needed).
44 mv -f "$2/ld/configure" "$2/ld/configure.backup"
45 sed 's/enable_plugins=yes/enable_plugins=no/g' \
46 < "$2/ld/configure.backup" > "$2/ld/configure"
47 ;;
48 "undo")
49 mv -f "$2/ld/configure.backup" "$2/ld/configure"
50 ;;
51 *)
52 ;;
53esac
54
Note: See TracBrowser for help on using the repository browser.