=== modified file 'configure/CONFIG_COMMON' --- configure/CONFIG_COMMON 2009-08-10 16:49:55 +0000 +++ configure/CONFIG_COMMON 2010-07-29 15:56:41 +0000 @@ -297,7 +297,7 @@ #-------------------------------------------------- # 'Munch' link-edit -MUNCH_CMD = $(LD) -o $@ $^ +MUNCH_CMD = $(LD) $(MUNCH_LDFLAGS) -o $@ $^ #-------------------------------------------------- # LEX default options === modified file 'configure/os/CONFIG.Common.vxWorksCommon' --- configure/os/CONFIG.Common.vxWorksCommon 2010-05-17 21:00:14 +0000 +++ configure/os/CONFIG.Common.vxWorksCommon 2010-07-29 16:42:19 +0000 @@ -92,6 +92,7 @@ VX_GNU_VERSION_6.5 = 3.4.4 VX_GNU_VERSION_6.6 = 4.1.2 VX_GNU_VERSION_6.7 = 4.1.2 +VX_GNU_VERSION_6.8 = 4.1.2 VX_GNU_VERSION = $(VX_GNU_VERSION_$(VXWORKS_VERSION)) VX_GNU_MAJOR_VERSION = $(basename $(basename $(VX_GNU_VERSION))) @@ -123,22 +124,29 @@ GNU_DIR = $(GNU_DIR_$(VXWORKS_MAJOR_VERSION)) #-------------------------------------------------- -# C++ host processing -NM_DIR_5 = $(GNU_BIN) -NM_DIR_6.0 = $(GNU_BIN) -NM_DIR_6.1 = $(GNU_BIN) -NM_DIR_6.2 = $(GNU_BIN) -NM_DIR_6.3 = $(GNU_BIN) -NM_DIR_6.4 = $(GNU_BIN) -NM_DIR_6.5 = $(GNU_BIN) -NM_DIR_6.6 = $(WIND_BASE)/workbench-$(WORKBENCH_VERSION)/$(WIND_HOST_TYPE)/bin +# Wind River moved nm out of GNU_BIN in some versions + +WORKBENCH_BIN = $(WIND_BASE)/workbench-$(WORKBENCH_VERSION)/$(WIND_HOST_TYPE)/bin +UTILITIES_BIN = $(WIND_BASE)/utilities-$(UTILITIES_VERSION)/$(WIND_HOST_TYPE)/bin + +NM_DIR_6.4 = $(WORKBENCH_BIN) +NM_DIR_6.5 = $(WORKBENCH_BIN) +NM_DIR_6.6 = $(WORKBENCH_BIN) NM_DIR_6.7 = $(GNU_BIN) -NM_DIR_6 = $(NM_DIR_$(VXWORKS_VERSION)) -NM_DIR = $(NM_DIR_$(VXWORKS_MAJOR_VERSION)) +NM_DIR_6.8 = $(UTILITIES_BIN) +NM_DIR = $(firstword $(NM_DIR_$(VXWORKS_VERSION)) $(GNU_BIN)) NM = $(NM_DIR)/$(CMPLR_PREFIX)nm$(CMPLR_SUFFIX)$(HOSTEXE) #-------------------------------------------------- +# A linker script is essential for munching from vxWorks 6.6 onwards +# (i.e. with versions that use gcc 4.1.2 or later). It can be used +# with any vxWorks 5 or 6 version, but apparently should not be used +# when compiling for 68K (which isn't supported in vxWorks 6 anyway) +MUNCH_LDFLAGS_6 = -T $(VX_DIR)/target/h/tool/gnu/ldscripts/link.OUT +MUNCH_LDFLAGS = $(MUNCH_LDFLAGS_$(VXWORKS_MAJOR_VERSION)) + +#-------------------------------------------------- # The follow 2 exports prevent gnu cross-compiler # from finding wrong assembler (as). export WIND_BASE @@ -151,10 +159,8 @@ #-------------------------------------------------- # Operating system flags -BSD_DEFINE_VERSION_6.7 = -DBSD=44 -OP_BSD_DEFINE = $(BSD_DEFINE_VERSION_$(VXWORKS_VERSION)) -OP_SYS_CPPFLAGS += -DvxWorks $(OP_BSD_DEFINE) -OP_SYS_CFLAGS += -fno-builtin $(OP_BSD_DEFINE) +OP_SYS_CPPFLAGS += -DvxWorks +OP_SYS_CFLAGS += -fno-builtin # Fix for vxWorks headers that use macros defined in vxWorks.h but # which don't actually include vxWorks.h themselves, for example the === modified file 'configure/os/CONFIG_SITE.Common.vxWorksCommon' --- configure/os/CONFIG_SITE.Common.vxWorksCommon 2008-09-29 20:06:50 +0000 +++ configure/os/CONFIG_SITE.Common.vxWorksCommon 2010-07-29 15:59:58 +0000 @@ -18,6 +18,8 @@ #VXWORKS_VERSION = 6.4 #VXWORKS_VERSION = 6.5 #VXWORKS_VERSION = 6.6 +#VXWORKS_VERSION = 6.7 +#VXWORKS_VERSION = 6.8 # Sites may override the following path for a particular host @@ -33,6 +35,13 @@ #WIND_BASE = /ade/vxWorks/$(VXWORKS_VERSION) -# WorkBench Version number, used with vxWorks 6.6 and later +# WorkBench Version number, required for vxWorks 6.x +#WORKBENCH_VERSION = 2.6 #WORKBENCH_VERSION = 3.0 +#WORKBENCH_VERSION = 3.2 + + +# Utilities Version number, required from vxWorks 6.8 and later + +#UTILITIES_VERSION = 1.0 === modified file 'src/libCom/osi/os/vxWorks/osdSock.c' --- src/libCom/osi/os/vxWorks/osdSock.c 2004-01-28 00:04:03 +0000 +++ src/libCom/osi/os/vxWorks/osdSock.c 2010-07-29 15:56:42 +0000 @@ -15,6 +15,8 @@ #error this is a vxWorks specific source code #endif +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> #include #include === modified file 'src/libCom/osi/os/vxWorks/osdSock.h' --- src/libCom/osi/os/vxWorks/osdSock.h 2005-11-14 17:06:49 +0000 +++ src/libCom/osi/os/vxWorks/osdSock.h 2010-07-29 15:56:42 +0000 @@ -26,6 +26,8 @@ #include #include #include +/* This is needed for vxWorks 6.8 to prevent an obnoxious compiler warning */ +#define _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> #include #include #include @@ -89,7 +91,9 @@ # define INADDR_NONE (0xffffffff) #endif -#if ( defined (BSD) && ( BSD >= 44 ) ) +#if defined(_SIZEOF_ADDR_IFREQ) +# define ifreq_size(pifreq) _SIZEOF_ADDR_IFREQ(*pifreq) +#elif ( defined (BSD) && ( BSD >= 44 ) ) # define ifreq_size(pifreq) (pifreq->ifr_addr.sa_len + sizeof(pifreq->ifr_name)) #else # define ifreq_size(pifreq) sizeof(*pifreq) === modified file 'src/tools/munch.pl' --- src/tools/munch.pl 2008-03-24 22:17:06 +0000 +++ src/tools/munch.pl 2010-07-29 16:35:18 +0000 @@ -13,12 +13,16 @@ # Creates a ctdt.c file of C++ static constructors and destructors, # as required for all vxWorks binaries containing C++ code. +# Is exception handler frame info required? +my $need_eh_frame = 0; + @ctors = (); %ctors = (); @dtors = (); %dtors = (); while (my $line = ) { chomp $line; + $need_eh_frame++ if ($line =~ m/__?gxx_personality_v[0-9]/); next if ($line =~ m/__?GLOBAL_.F.+/); next if ($line =~ m/__?GLOBAL_.I._GLOBAL_.D.+/); if ($line =~ m/__?GLOBAL_.D.+/) { @@ -39,6 +43,11 @@ "#include ", "\n/* Declarations */", (map cDecl($_), @ctors, @dtors), + ''; + +exceptionHandlerFrame() if $need_eh_frame; + +print join "\n", "\n/* Constructors */", "void (*_ctors[])() = {", (join ",\n", (map " " . cName($_), @ctors), " NULL"), @@ -49,6 +58,35 @@ "};", "\n"; +# Outputs the C code for registering exception handler frame info +sub exceptionHandlerFrame { + my $eh_ctor = 'eh_ctor'; + my $eh_dtor = 'eh_dtor'; + + # Add EH ctor/dtor to _start_ of arrays + unshift @ctors, $eh_ctor; + unshift @dtors, $eh_dtor; + + print join "\n", + '/* Exception handler frame */', + 'extern const unsigned __EH_FRAME_BEGIN__[];', + '', + "static void $eh_ctor(void) {", + ' extern void __register_frame_info (const void *, void *);', + ' static struct { unsigned pad[8]; } object;', + '', + ' __register_frame_info(__EH_FRAME_BEGIN__, &object);', + '}', + '', + "static void $eh_dtor(void) {", + ' extern void *__deregister_frame_info (const void *);', + '', + ' __deregister_frame_info(__EH_FRAME_BEGIN__);', + '}', + ''; + return; +} + sub cName { my ($name) = @_; $name =~ s/^__/_/;