This is the mail archive of the 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]

Refine VxWorks header file path twists for libgcc builds


libgcc/config/t-vxworks twists LIBGCC2_INCLUDE to workaround a problem of
header file name conflicts between the system headers and gcc headers during
libgcc builds:

# This ensures that the correct target headers are used; some
# VxWorks system headers have names that collide with GCC's
# internal (host) headers, e.g. regs.h.
LIBGCC2_INCLUDES = -nostdinc \
   `case "/$(MULTIDIR)" in \
      */mrtp*) echo -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip ;; \
      *) echo -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip ;; \

As the comment indicates, this is typically preventing #include <regs.h> from
a VxWorks header file to pick gcc's regs.h.

For VxWorks 7 RTPs on ARM, the current twist introduces a symmetrical issue,
with #include "unwind.h" from picking unwind.h from a
VxWorks system dir instead of the local libgcc one.

The attached patch fixes this by prepending -I. to the set of options, so
we do pick local libgcc headers first without re-introducing access to the
originally problematic gcc headers.

Tested by verifying success of an in-house build and proper execution of ACATS
tests on a gcc-7 based compiler for arm-vxworks and arm-vxworks7, and checking
that a build for arm-wrs-vxworks proceeds to completion on mainline.

Committing to mainline,

With Kind Regards,


2017-08-01  Olivier Hainque  <>

  	* config/t-vxworks (LIBGCC2_INCLUDES): Start with -I. after -nostdinc.
    	* config/t-vxworks7: Likewise.

Attachment: 0002-When-building-libgcc-search-for-the-local-build-subd.patch
Description: Binary data

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