This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

common grounds for VxWorks 7 support


Hello,

This patch introduces common grounds for VxWorks 7 support.

The main device is the introduction of a TARGET_VXWORKS7 macro which we
leverage throughout the various vxworks.h / vxworks.c files, common or cpu
specific.

We have done several CPU specific ports already, and this scheme works pretty
well.

There's quite a bit of common material between Vx7 and the previous versions.

For the distinctions we need to make, the use of preprocessing doesn't impair
readability IMO, on the contrary, while the usual alternative with extra target
files rapidly becomes subtle to handle right (getting the proper inclusion
ordering while preventing code duplication is not always easy and may make
maintenance harder or more error-prone).

Nathan does this work for you ?

If OK on principle, I'm not sure who is to approve the tiny config.gcc part.

Thanks in advance for your feedback,

With Kind Regards,

Olivier

2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
            Olivier Hainque  <hainque@adacore.com>

        * config.gcc (tm_defines for VxWorks): Define TARGET_VXWORKS7 for
        all vxworks7 targets.
        * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
        (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
        (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
        variations for VX6/VX7 and 32/64bits later on in ...
        (VXWORKS_LIB_SPEC): Leverage new macros.
        (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
        as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.

Attachment: 0002-common-vxworks7-support.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]