diff options
-rwxr-xr-x | bin/ace_ld | 21 | ||||
-rw-r--r-- | include/makeinclude/platform_vxworks5.x_g++.GNU | 19 |
2 files changed, 23 insertions, 17 deletions
diff --git a/bin/ace_ld b/bin/ace_ld index f5fd66431e9..2879512b225 100755 --- a/bin/ace_ld +++ b/bin/ace_ld @@ -10,19 +10,28 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. -$usage = "usage: $0 [-? | [[-c <compile>] [-m <munch>] [-n <nm>]] [-f]]]\n"; +$usage = + "usage: $0 [-? | [[-C <compile> --] [-m <munch>] [-n <nm>]] [-f]]] " . + "<ld command>\n"; + +#### To avoid quoting problems on the command line, all arguments +#### between -C and -- are combined into the single compile command. +$compile_option = 0; #### #### process command line args #### while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) { - if ( $ARGV[0] eq '-c' ) { + if ( $ARGV[0] eq '-C' ) { + $compile_option = 1; if ( $ARGV[1] !~ /^[-].+$/ ) { $compile = $ARGV[1]; shift; } else { print STDERR "$0: must provide argument for -c option\n"; die $usage; } + } elsif ( $ARGV[0] eq '--' ) { + $compile_option = 0; } elsif ( $ARGV[0] eq '-m' ) { if ( $ARGV[1] !~ /^[-].+$/ ) { $munch = $ARGV[1]; shift; @@ -41,8 +50,12 @@ while ( $#ARGV >= 0 && $ARGV[0] =~ /^-/ ) { print "$usage"; exit; } else { - warn "$0: unknown option $ARGV[0]\n"; - die $usage; + if ($compile_option) { + $compile .= " $ARGV[0]"; + } else { + warn "$0: unknown option $ARGV[0]\n"; + die $usage; + } } shift; } diff --git a/include/makeinclude/platform_vxworks5.x_g++.GNU b/include/makeinclude/platform_vxworks5.x_g++.GNU index 576db8f0a58..76ca934af3c 100644 --- a/include/makeinclude/platform_vxworks5.x_g++.GNU +++ b/include/makeinclude/platform_vxworks5.x_g++.GNU @@ -39,19 +39,13 @@ ifeq (,$(findstring $(HOST_DIR)/bin,$PATH)) PATH := $(PATH):$(HOST_DIR)/bin endif # PATH -PERL_PATH = perl - -ifeq (win32,$(findstring win32,$(WIND_HOST_TYPE))) - #### GNU make on WIN32 needs quoted double quotes. - ACE_QUOTE ='"' -else # ! win32 host - ACE_QUOTE =" -endif # ! win32 host +ifeq (,$(PERL_PATH)) + PERL_PATH = perl +endif # ! PERL_PATH #### BEGIN target CPU-specific settings - #### This is kind of messy so that it can support multiple targets. #### You'll need to set CPU to a supported CPU using one of these #### methods (unless your CPU is a PowerPC 604): @@ -104,7 +98,6 @@ endif # I80486 endif # PPC860 endif # PPC604 - #### END target CPU-specific settings @@ -149,9 +142,9 @@ endif # rtti DCFLAGS += -g DLD = $(LD) INCLDIRS += -I$(WIND_BASE)/target/h -LD = $(PERL_PATH) $(ACE_ROOT)/bin/ace_ld -c \ - $(ACE_QUOTE)$(COMPILE.c) -traditional$(ACE_QUOTE) \ - -m "munch" -n "nm$(TOOLENV)" ld$(TOOLENV) +LD = $(PERL_PATH) $(ACE_ROOT)/bin/ace_ld \ + -C $(COMPILE.c) -traditional -- \ + -m munch -n nm$(TOOLENV) ld$(TOOLENV) LDFLAGS += -X -r #### WindRiver only recommends -O, not -O2, with some CPUs, including #### the i386 family. And -O2 causes some compilation failures. |