4.104.115
Last change
on this file since b69cd3f was
8f0740b,
checked in by Chris Johns <chrisj@…>, on 10/22/12 at 14:12:29
|
Script to test the linker. Run after building the linker.
|
-
Property mode set to
100755
|
File size:
950 bytes
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | # |
---|
3 | # Make an application using the object files in the RTL application. |
---|
4 | # Please build the RTL application first. |
---|
5 | # |
---|
6 | |
---|
7 | if [ $# -ne 2 ]; then |
---|
8 | echo "error: bad arguments: ./mkapp <path to RTL app> <path to C compiler>" |
---|
9 | exit 2 |
---|
10 | fi |
---|
11 | |
---|
12 | if [ ! -d $1 ]; then |
---|
13 | echo "error: not a directory: $1" |
---|
14 | exit 3 |
---|
15 | fi |
---|
16 | |
---|
17 | if [ ! -f $2 ]; then |
---|
18 | echo "error: not a file: $2" |
---|
19 | exit 3 |
---|
20 | fi |
---|
21 | |
---|
22 | o1="$1/xa.c.1.o" |
---|
23 | o2="$1/x-long-name-to-create-gnu-extension-in-archive.c.1.o" |
---|
24 | |
---|
25 | if [ ! -e ${o1} ]; then |
---|
26 | echo "error: cannot find: ${o1}" |
---|
27 | exit 4 |
---|
28 | fi |
---|
29 | |
---|
30 | if [ ! -e ${o2} ]; then |
---|
31 | echo "error: cannot find: ${o2}" |
---|
32 | exit 4 |
---|
33 | fi |
---|
34 | |
---|
35 | case $(uname -s) in |
---|
36 | Darwin) platform="darwin" ;; |
---|
37 | Linux) platform="linux2" ;; |
---|
38 | WIN32) platform="win32" ;; |
---|
39 | *) |
---|
40 | echo "error: unsupported platform" |
---|
41 | exit 5 |
---|
42 | esac |
---|
43 | |
---|
44 | echo "./build-${platform}/rtems-ld -S --base $1/rtld --cc $2 -o rtl-app.rap ${o1} ${o2}" |
---|
45 | ./build-${platform}/rtems-ld -S --base $1/rtld --cc $2 -o rtl-app.rap ${o1} ${o2} |
---|
46 | |
---|
47 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.