[RS6000] Non-pcrel tests when power10
[official-gcc.git] / gcc / config / t-vxworks
blob221f53ce3112af23494fa7f20209eaf2c629fe5c
1 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
3 # This file is part of GCC.
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.
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.
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/>.
19 vxworks.o: $(srcdir)/config/vxworks.c
20         $(COMPILE) $<
21         $(POSTCOMPILE)
23 vxworks-c.o: $(srcdir)/config/vxworks-c.c
24         $(COMPILE) $<
25         $(POSTCOMPILE)
27 # Arrange to install our stdint.h wrapper, by copying it in the
28 # build-time include dir before this include dir is installed and after
29 # stmp-int-hdrs removes it (because it was told we don't provide it).
31 INSTALL_HEADERS += install-stdint.h
33 install-stdint.h: stmp-int-hdrs
34         cp -p $(srcdir)/config/vxworks/stdint.h include/stdint.h
35         chmod a+r include/stdint.h
37 $(INSTALL_HEADERS_DIR): install-stdint.h
39 # Both the kernel and RTP headers provide limits.h.  They embed VxWorks
40 # specificities and are dated on some configurations so we both need to
41 # provide our own version and make sure the system one gets exposed.
43 LIMITS_H_TEST = true
44 STMP_FIXINC = stmp-fixinc
46 # VxWorks system environments have been GCC based for a long time and we need
47 # to make sure that our files and the system ones use distinct macro names to
48 # protect against recursive inclusions.  We achieve this by temporarily
49 # substituting the headers used by stmp-int-headers with alternative versions
50 # where we add some version indication in the inclusion-protection macro
51 # names.
53 # Before the standard stmp-int-headers operations take place, arrange to
54 # copy the current version of the relevant header files locally, generate
55 # the alternate version and replace the original version with ours:
57 stmp-int-hdrs: subst-glimits.h
59 subst-%.h:
60         cp -p $(srcdir)/$*.h orig-$*.h
61         ID=$$(echo $(BASEVER_c) | sed -e 's/\./_/g'); \
62         sed -e "s/_LIMITS_H__/_LIMITS_H__$${ID}_/" < $(srcdir)/$*.h > $@
63         cp $@ $(srcdir)/$*.h
65 # Then arrange to restore the original versions after the standard
66 # operations have taken place:
68 INSTALL_HEADERS += restore-glimits.h
70 restore-glimits.h: stmp-int-hdrs
71         cp -p orig-glimits.h $(srcdir)/glimits.h