diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2002-12-23 12:01:14 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2002-12-23 12:01:14 +0000 |
commit | 6c48980bd4f66569e62304407d93aec127a25e56 (patch) | |
tree | 3e19fae606fd1ee71314bbe73b9517b601141993 | |
parent | 33da198c2f1518878f512d6a05b9fd604cfacca5 (diff) | |
download | ATCD-6c48980bd4f66569e62304407d93aec127a25e56.tar.gz |
ChangeLogTag: Mon Dec 23 12:00:12 UTC 2002 Johnny Willemsen <jwillemsen@remedy.nl>
-rwxr-xr-x | bin/ace_ld | 21 | ||||
-rw-r--r-- | include/makeinclude/platform_vxworks5.x_diab.GNU | 2 | ||||
-rw-r--r-- | include/makeinclude/platform_vxworks5.x_g++.GNU | 2 |
3 files changed, 19 insertions, 6 deletions
diff --git a/bin/ace_ld b/bin/ace_ld index eafe82d36df..0f5cc50e1b0 100755 --- a/bin/ace_ld +++ b/bin/ace_ld @@ -21,7 +21,7 @@ my(@symbols) = ('dequeue__t17ACE_Message_Queue1Z14ACE_NULL_SYNCHRP17ACE_Message_ ); $usage = - "usage: $0 [-? | [-w] [[-C <compile> --] [-m <munch>] [-n <nm>]] [-f]]] " . + "usage: $0 [-? | [-w] [-o <VDIR>] [[-C <compile> --] [-m <munch>] [-n <nm>]] [-f]]] " . "<ld command>\n"; #### To avoid quoting problems on the command line, all arguments @@ -57,6 +57,13 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) { print STDERR "$0: must provide argument for -n option\n"; die $usage; } + } elsif ( $ARGV[0] eq '-o' ) { + if ( $ARGV[1] !~ /^[-].+$/ ) { + $vdir = $ARGV[1]; shift; + } else { + print STDERR "$0: must provide argument for -o option\n"; + die $usage; + } } elsif ( $ARGV[0] eq '-w' ) { $ss_change_warn = 1; } elsif ( $ARGV[0] eq '-?' ) { @@ -73,6 +80,12 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) { shift; } +#### +#### If $vdir is empty, set default object file directory (.obj) +#### +if ($vdir eq ''){ + $vdir = ".obj"; +} #### #### Save link command, i.e., current @ARGV, for use below. @@ -143,7 +156,7 @@ if ($munch) { close CTORDTOR || &fail ("$0: unable to write \"__ctordtor.c\"\n"); close MUNCH; - system ("$compile -o .obj/__ctordtor.o __ctordtor.c") && + system ("$compile -o $vdir/__ctordtor.o __ctordtor.c") && &fail ("$0: \"$compile\" failed\n"); } @@ -160,7 +173,7 @@ if ($munch) { } ++$arg_lib; } - splice (@args, $arg_lib, 0, ".obj/__ctordtor.o"); + splice (@args, $arg_lib, 0, "$vdir/__ctordtor.o"); } $link_command = join (' ', @args); @@ -213,7 +226,7 @@ sub fail { #### clean up when done or on signal #### sub cleanup { - unlink "__ctordtor.c", ".obj/__ctordtor.o"; + unlink "__ctordtor.c", "$vdir/__ctordtor.o"; if ($done) { exit 0; } else { diff --git a/include/makeinclude/platform_vxworks5.x_diab.GNU b/include/makeinclude/platform_vxworks5.x_diab.GNU index 1f350d844d5..931843ae1e9 100644 --- a/include/makeinclude/platform_vxworks5.x_diab.GNU +++ b/include/makeinclude/platform_vxworks5.x_diab.GNU @@ -137,7 +137,7 @@ DCFLAGS += -g DLD = $(LD) INCLDIRS += -I$(WIND_BASE)/target/h LD = $(PERL_PATH) $(ACE_ROOT)/bin/ace_ld \ - -C $(COMPILE.c) -traditional -- \ + -o $(VDIR) -C $(COMPILE.c) -traditional -- \ -m "ddump -M" -n nm$(TOOLENV) dld LDFLAGS += -r4 #### WindRiver only recommends -O, not -O2, with some CPUs, including diff --git a/include/makeinclude/platform_vxworks5.x_g++.GNU b/include/makeinclude/platform_vxworks5.x_g++.GNU index 0ba76c03460..f24d9ee79de 100644 --- a/include/makeinclude/platform_vxworks5.x_g++.GNU +++ b/include/makeinclude/platform_vxworks5.x_g++.GNU @@ -328,7 +328,7 @@ DCFLAGS += -g DLD = $(LD) INCLDIRS += -I$(WIND_BASE)/target/h LD = $(PERL_PATH) $(ACE_ROOT)/bin/ace_ld \ - -C $(COMPILE.c) -traditional -- \ + -o $(VDIR) -C $(COMPILE.c) -traditional -- \ -m munch -n nm$(TOOLENV) ld$(TOOLENV) LDFLAGS += -X -r #### WindRiver only recommends -O, not -O2, with some CPUs, including |