blob: 3967e0065469b769cc07e03b52312b21a4b33eec [file] [log] [blame]
# Don't build libgcc.a with debug info
LIBGCC2_DEBUG_CFLAGS =
# We provide our own implementation for __clear_cache, using a
# VxWorks specific entry point.
LIB2FUNCS_EXCLUDE += _clear_cache
# Arrange to have the correct target headers used when compiling
# libgcc. We specifically need to handle VxWorks system headers
# having names that collide with GCC's internal headers.
#
# For example, compiling gthr-vxworks.c #includes <taskLib.h>
# which in turn #includes <regs.h>, which exists both in the gcc
# source tree and as a VxWorks system header. We need that
# #include to get the VxWorks version, not the compiler one.
#
# We still need to make sure that the local libgcc headers prevail
# (e.g. ./unwind.h), and that gcc provided header files intended
# to be user visible eventually are visible as well (gcc/include
# and gcc/include-fixed).
#
# The latter are added unconditionally as -isystem during regular
# cross builds via the %I spec processing and search paths introduced
# by -B options. These take priority over whatever we can add here,
# even with -nostdinc, and end up at the tail of the search chain.
#
# We keep explicit options nevertheless, to accommodate canadian
# setups where the libraries are built with an installed cross compiler,
# without -B. Also note, incidentally, that the detection of duplicate
# paths differs between Windows and Linux hosts as the latter can perform
# inode based checks while the former may only rely on name comparisons.
LIBGCC2_INCLUDES = -nostdinc -include vxworks-predef.h -I. \
$(if $(findstring vxworks7, $(target_noncanonical)), \
-I=/../../h -I=/../../share/h -I=/system -I=/public, \
-I=/ -I=/wrn/coreip) \
-isystem $(MULTIBUILDTOP)../../gcc/include-fixed$(MULTISUBDIR) \
-isystem $(MULTIBUILDTOP)../../gcc/include
# The aarch64-vx7r2 objLibP.h defines an inline function with unused
# parameters. Ideally using -isystem instead of -I above would work
# around that, but then we get conflicts between GCC's and VxWorks'
# regs.h.
LIBGCC2_CFLAGS += -Wno-error=unused-parameter
# aarch64-vx7r2 also gets complaints about dropping volatile
# qualifiers in vxTas calls taking a pointer to __vx_tas_t.
# An explicit cast doesn't avoid the warning, alas.
LIBGCC2_CFLAGS += -Wno-error=discarded-qualifiers
# Use these also for the vxcrstuff objects (.e.g for version.h), on top of
# the options possibly already set specifically for the target:
CRTSTUFF_T_CFLAGS += $(LIBGCC2_INCLUDES)