OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This is wrapper around gcc/g++ so we can easily sneak in some extra | 7 # This is wrapper around gcc/g++ so we can easily sneak in some extra |
8 # flags required for building chrome using the nacl arm trusted TC. | 8 # flags required for building chrome using the nacl arm trusted TC. |
9 # This script will be copied into the the arm trusted TC jail | 9 # This script will be copied into the the arm trusted TC jail |
10 # and changes behavior slightly depending on what name is used to invoke it. | 10 # and changes behavior slightly depending on what name is used to invoke it. |
11 | 11 |
12 # NOTE: this script should not be necessary, c.f. below | 12 # NOTE: this script should not be necessary, c.f. below |
13 | 13 |
14 set -o nounset | 14 set -o nounset |
15 set -o errexit | 15 set -o errexit |
16 | 16 |
17 if [[ $(basename $0) == *c++* ]] ; then | 17 if [[ $(basename $0) == *c++* ]] ; then |
18 readonly COMPILER=g++ | 18 readonly COMPILER=g++ |
19 else | 19 else |
20 readonly COMPILER=gcc | 20 readonly COMPILER=gcc |
21 fi | 21 fi |
22 | 22 |
23 # NOTE: the host compiler seems to be invoked with flags from the | 23 # NOTE: the host compiler seems to be invoked with flags from the |
24 # target compiler which is wrong. We add the hacks below to work | 24 # target compiler which is wrong. We add the hacks below to work |
25 # around this | 25 # around this |
26 | 26 |
27 ${COMPILER} -I/usr/lib/glib-2.0/include "$@" | 27 ${COMPILER} -I/usr/lib/glib-2.0/include "$@" |
OLD | NEW |