OLD | NEW |
1 # This shell script emits a C file. -*- C -*- | 1 # This shell script emits a C file. -*- C -*- |
2 # Copyright 2006, 2007, 2008 Free Software Foundation, Inc. | 2 # Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc. |
3 # | 3 # |
4 # This file is part of the GNU Binutils. | 4 # This file is part of the GNU Binutils. |
5 # | 5 # |
6 # This program is free software; you can redistribute it and/or modify | 6 # This program is free software; you can redistribute it and/or modify |
7 # it under the terms of the GNU General Public License as published by | 7 # it under the terms of the GNU General Public License as published by |
8 # the Free Software Foundation; either version 3 of the License, or | 8 # the Free Software Foundation; either version 3 of the License, or |
9 # (at your option) any later version. | 9 # (at your option) any later version. |
10 # | 10 # |
11 # This program is distributed in the hope that it will be useful, | 11 # This program is distributed in the hope that it will be useful, |
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 # | 83 # |
84 # (2) VXWORKS_BASE_EM_FILE set the hook's LDEMUL_FOO variable to | 84 # (2) VXWORKS_BASE_EM_FILE set the hook's LDEMUL_FOO variable to |
85 # gld${EMULATION_NAME}_foo. This means that the file has | 85 # gld${EMULATION_NAME}_foo. This means that the file has |
86 # replaced elf32.em's default definition, so we simply #define | 86 # replaced elf32.em's default definition, so we simply #define |
87 # the current value of LDEMUL_FOO to vxworks_foo. | 87 # the current value of LDEMUL_FOO to vxworks_foo. |
88 # | 88 # |
89 # (3) VXWORKS_BASE_EM_FILE set the hook's LDEMUL_FOO variable to | 89 # (3) VXWORKS_BASE_EM_FILE set the hook's LDEMUL_FOO variable to |
90 # something other than gld${EMULATION_NAME}_foo. We handle | 90 # something other than gld${EMULATION_NAME}_foo. We handle |
91 # this case in the same way as (1). | 91 # this case in the same way as (1). |
92 for override in before_parse after_open; do | 92 for override in before_parse after_open; do |
93 var="LDEMUL_`echo ${override} | tr a-z A-Z`" | 93 var="LDEMUL_`echo ${override} | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLM
NOPQRSTUVWXYZ'`" |
94 eval value=\$${var} | 94 eval value=\$${var} |
95 if test "${value}" = "gld${EMULATION_NAME}_${override}"; then | 95 if test "${value}" = "gld${EMULATION_NAME}_${override}"; then |
96 fragment <<EOF | 96 fragment <<EOF |
97 #define ${value} vxworks_${override} | 97 #define ${value} vxworks_${override} |
98 EOF | 98 EOF |
99 else | 99 else |
100 eval $var=vxworks_${override} | 100 eval $var=vxworks_${override} |
101 fi | 101 fi |
102 done | 102 done |
OLD | NEW |