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