Mercurial > hg > CbC > CbC_gcc
diff gcc/config/t-vxworks @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line diff
--- a/gcc/config/t-vxworks Thu Oct 25 07:37:49 2018 +0900 +++ b/gcc/config/t-vxworks Thu Feb 13 11:34:05 2020 +0900 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -16,9 +16,56 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# Both the kernel and RTP headers provide limits.h. +vxworks.o: $(srcdir)/config/vxworks.c + $(COMPILE) $< + $(POSTCOMPILE) + +vxworks-c.o: $(srcdir)/config/vxworks-c.c + $(COMPILE) $< + $(POSTCOMPILE) + +# Arrange to install our stdint.h wrapper, by copying it in the +# build-time include dir before this include dir is installed and after +# stmp-int-hdrs removes it (because it was told we don't provide it). + +INSTALL_HEADERS += install-stdint.h + +install-stdint.h: stmp-int-hdrs + cp -p $(srcdir)/config/vxworks/stdint.h include/stdint.h + chmod a+r include/stdint.h + +$(INSTALL_HEADERS_DIR): install-stdint.h + +# Both the kernel and RTP headers provide limits.h. They embed VxWorks +# specificities and are dated on some configurations so we both need to +# provide our own version and make sure the system one gets exposed. + LIMITS_H_TEST = true +STMP_FIXINC = stmp-fixinc -vxworks.o: $(srcdir)/config/vxworks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TARGET_H) output.h $(TM_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< +# VxWorks system environments have been GCC based for a long time and we need +# to make sure that our files and the system ones use distinct macro names to +# protect against recursive inclusions. We achieve this by temporarily +# substituting the headers used by stmp-int-headers with alternative versions +# where we add some version indication in the inclusion-protection macro +# names. + +# Before the standard stmp-int-headers operations take place, arrange to +# copy the current version of the relevant header files locally, generate +# the alternate version and replace the original version with ours: + +stmp-int-hdrs: subst-glimits.h + +subst-%.h: + cp -p $(srcdir)/$*.h orig-$*.h + ID=$$(echo $(BASEVER_c) | sed -e 's/\./_/g'); \ + sed -e "s/_LIMITS_H__/_LIMITS_H_$${ID}_/" < $(srcdir)/$*.h > $@ + cp $@ $(srcdir)/$*.h + +# Then arrange to restore the original versions after the standard +# operations have taken place: + +INSTALL_HEADERS += restore-glimits.h + +restore-glimits.h: stmp-int-hdrs + cp -p orig-glimits.h $(srcdir)/glimits.h