Home | History | Annotate | Line # | Download | only in config
      1  1.12  mrg # Copyright (C) 2002-2022 Free Software Foundation, Inc.
      2   1.1  mrg #
      3   1.1  mrg # This file is part of GCC.
      4   1.1  mrg #
      5   1.1  mrg # GCC is free software; you can redistribute it and/or modify
      6   1.1  mrg # it under the terms of the GNU General Public License as published by
      7   1.1  mrg # the Free Software Foundation; either version 3, or (at your option)
      8   1.1  mrg # any later version.
      9   1.1  mrg #
     10   1.1  mrg # GCC is distributed in the hope that it will be useful,
     11   1.1  mrg # but WITHOUT ANY WARRANTY; without even the implied warranty of
     12   1.1  mrg # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13   1.1  mrg # GNU General Public License for more details.
     14   1.1  mrg #
     15   1.1  mrg # You should have received a copy of the GNU General Public License
     16   1.1  mrg # along with GCC; see the file COPYING3.  If not see
     17   1.1  mrg # <http://www.gnu.org/licenses/>.
     18   1.1  mrg 
     19  1.12  mrg vxworks.o: $(srcdir)/config/vxworks.cc
     20  1.11  mrg 	$(COMPILE) $<
     21  1.11  mrg 	$(POSTCOMPILE)
     22  1.11  mrg 
     23  1.12  mrg vxworks-c.o: $(srcdir)/config/vxworks-c.cc
     24  1.11  mrg 	$(COMPILE) $<
     25  1.11  mrg 	$(POSTCOMPILE)
     26  1.11  mrg 
     27  1.12  mrg # We leverage $sysroot to find target system headers only, distributed
     28  1.12  mrg # in a VxWorks (a)typical fashion with a different set of headers for
     29  1.12  mrg # rtp vs kernel mode.  We setup SYSROOT_HEADERS_SUFFIX_SPEC to handle
     30  1.12  mrg # this, and need to clear NATIVE_SYSTEM_HEADER_DIR to prevent it from
     31  1.12  mrg # interfering.
     32  1.11  mrg 
     33  1.12  mrg NATIVE_SYSTEM_HEADER_DIR =
     34  1.11  mrg 
     35  1.11  mrg # Both the kernel and RTP headers provide limits.h.  They embed VxWorks
     36  1.11  mrg # specificities and are dated on some configurations so we both need to
     37  1.11  mrg # provide our own version and make sure the system one gets exposed.
     38  1.11  mrg 
     39   1.1  mrg LIMITS_H_TEST = true
     40  1.11  mrg 
     41  1.12  mrg # VxWorks system environments have been GCC based for a long time and
     42  1.12  mrg # we need to make sure that our files and the system ones use distinct
     43  1.12  mrg # macro names to protect against recursive inclusions.  We achieve
     44  1.12  mrg # this by modifying the GLIMITS_H fragment that goes into limits.h
     45  1.12  mrg # with some version indication in the inclusion-protection macro
     46  1.11  mrg # names.
     47  1.11  mrg 
     48  1.12  mrg T_GLIMITS_H = vxw-glimits.h
     49  1.11  mrg 
     50  1.12  mrg vxw-glimits.h: $(srcdir)/glimits.h
     51  1.12  mrg 	ID=`echo $(BASEVER_c) | sed -e 's/\./_/g'` && \
     52  1.12  mrg 	sed -e "s/_LIMITS_H__/_LIMITS_H__$${ID}_/" < $< > $@T
     53  1.12  mrg 	mv $@T $@
     54  1.11  mrg 
     55  1.12  mrg # Arrange to "provide" a tailored version of stdint-gcc.h
     56  1.11  mrg 
     57  1.12  mrg T_STDINT_GCC_H = vxw-stdint-gcc.h
     58   1.1  mrg 
     59  1.12  mrg vxw-stdint-gcc.h: $(srcdir)/ginclude/stdint-gcc.h
     60  1.12  mrg 	sed -e "/#define _GCC_STDINT_H/ a #include <_yvals.h>" < $< > $@T
     61  1.12  mrg 	mv $@T $@
     62