~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/builddir-aarch64-linux-gnu/binutils/objcopy

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
# objcopy - temporary wrapper script for .libs/objcopy
 
4
# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
 
5
#
 
6
# The objcopy program cannot be directly executed until all the libtool
 
7
# libraries that it depends on are installed.
 
8
#
 
9
# This wrapper script should never be moved out of the build directory.
 
10
# If it is, it will not operate correctly.
 
11
 
 
12
# Sed substitution that helps us do robust quoting.  It backslashifies
 
13
# metacharacters that are still active within double-quoted strings.
 
14
sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
 
15
 
 
16
# Be Bourne compatible
 
17
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 
18
  emulate sh
 
19
  NULLCMD=:
 
20
  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
 
21
  # is contrary to our usage.  Disable this feature.
 
22
  alias -g '${1+"$@"}'='"$@"'
 
23
  setopt NO_GLOB_SUBST
 
24
else
 
25
  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 
26
fi
 
27
BIN_SH=xpg4; export BIN_SH # for Tru64
 
28
DUALCASE=1; export DUALCASE # for MKS sh
 
29
 
 
30
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
31
# if CDPATH is set.
 
32
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
33
 
 
34
relink_command="(cd /scratch/packages/cross/binutils-arm64-cross-0.6/binutils-2.23.52.20130611/builddir-aarch64-linux-gnu/binutils; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; PATH=/home/doko/bin:/usr/local/bin:/usr/bin:/bin; export PATH; gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -Wno-format-security -static-libstdc++ -static-libgcc -o \$progdir/\$file objcopy.o not-strip.o rename.o rddbg.o debug.o stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o  ../bfd/.libs/libbfd.so -L/scratch/packages/cross/binutils-arm64-cross-0.6/binutils-2.23.52.20130611/builddir-aarch64-linux-gnu/bfd/../libiberty/pic -liberty -ldl ../libiberty/libiberty.a -lz -Wl,-rpath -Wl,/scratch/packages/cross/binutils-arm64-cross-0.6/binutils-2.23.52.20130611/builddir-aarch64-linux-gnu/bfd/.libs -Wl,-rpath -Wl,/usr/x86_64-linux-gnu/aarch64-linux-gnu/lib)"
 
35
 
 
36
# This environment variable determines our operation mode.
 
37
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
 
38
  # install mode needs the following variables:
 
39
  generated_by_libtool_version='2.2.7a'
 
40
  notinst_deplibs=' ../bfd/libbfd.la'
 
41
else
 
42
  # When we are sourced in execute mode, $file and $ECHO are already set.
 
43
  if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
 
44
    file="$0"
 
45
 
 
46
# A function that is used when there is no print builtin or printf.
 
47
func_fallback_echo ()
 
48
{
 
49
  eval 'cat <<_LTECHO_EOF
 
50
$1
 
51
_LTECHO_EOF'
 
52
}
 
53
    ECHO="printf %s\\n"
 
54
  fi
 
55
  # Find the directory that this script lives in.
 
56
  thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'`
 
57
  test "x$thisdir" = "x$file" && thisdir=.
 
58
 
 
59
  # Follow symbolic links until we get to the real thisdir.
 
60
  file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
 
61
  while test -n "$file"; do
 
62
    destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'`
 
63
 
 
64
    # If there was a directory component, then change thisdir.
 
65
    if test "x$destdir" != "x$file"; then
 
66
      case "$destdir" in
 
67
      [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
 
68
      *) thisdir="$thisdir/$destdir" ;;
 
69
      esac
 
70
    fi
 
71
 
 
72
    file=`$ECHO "$file" | /bin/sed 's%^.*/%%'`
 
73
    file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
 
74
  done
 
75
 
 
76
  # Usually 'no', except on cygwin/mingw when embedded into
 
77
  # the cwrapper.
 
78
  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
 
79
  if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
 
80
    # special case for '.'
 
81
    if test "$thisdir" = "."; then
 
82
      thisdir=`pwd`
 
83
    fi
 
84
    # remove .libs from thisdir
 
85
    case "$thisdir" in
 
86
    *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;;
 
87
    .libs )   thisdir=. ;;
 
88
    esac
 
89
  fi
 
90
 
 
91
  # Try to get the absolute directory name.
 
92
  absdir=`cd "$thisdir" && pwd`
 
93
  test -n "$absdir" && thisdir="$absdir"
 
94
 
 
95
  program=lt-'objcopy'
 
96
  progdir="$thisdir/.libs"
 
97
 
 
98
  if test ! -f "$progdir/$program" ||
 
99
     { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
 
100
       test "X$file" != "X$progdir/$program"; }; then
 
101
 
 
102
    file="$$-$program"
 
103
 
 
104
    if test ! -d "$progdir"; then
 
105
      mkdir "$progdir"
 
106
    else
 
107
      rm -f "$progdir/$file"
 
108
    fi
 
109
 
 
110
    # relink executable if necessary
 
111
    if test -n "$relink_command"; then
 
112
      if relink_command_output=`eval "$relink_command" 2>&1`; then :
 
113
      else
 
114
        printf %s\n "$relink_command_output" >&2
 
115
        rm -f "$progdir/$file"
 
116
        exit 1
 
117
      fi
 
118
    fi
 
119
 
 
120
    mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
 
121
    { rm -f "$progdir/$program";
 
122
      mv -f "$progdir/$file" "$progdir/$program"; }
 
123
    rm -f "$progdir/$file"
 
124
  fi
 
125
 
 
126
  if test -f "$progdir/$program"; then
 
127
    if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
 
128
      # Run the actual program with our arguments.
 
129
 
 
130
      exec "$progdir/$program" ${1+"$@"}
 
131
 
 
132
      $ECHO "$0: cannot exec $program $*" 1>&2
 
133
      exit 1
 
134
    fi
 
135
  else
 
136
    # The program doesn't exist.
 
137
    $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
 
138
    $ECHO "This script is just a wrapper for $program." 1>&2
 
139
    $ECHO "See the libtool documentation for more information." 1>&2
 
140
    exit 1
 
141
  fi
 
142
fi