middle-end/110237 - wrong MEM_ATTRs for partial loads/stores
[official-gcc.git] / gcc / config / loongarch / t-loongarch
blob7e65bb6e2a85a6d17a8d0fa7bbe5dbd12c512d54
1 # Copyright (C) 2021-2023 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/>.
20 GTM_H += loongarch-multilib.h
21 OPTIONS_H_EXTRA += $(srcdir)/config/loongarch/loongarch-def.h   \
22                    $(srcdir)/config/loongarch/loongarch-tune.h  \
23                    $(srcdir)/config/loongarch/loongarch-cpucfg-map.h
25 # Canonical target triplet from config.gcc
26 LA_MULTIARCH_TRIPLET = $(patsubst LA_MULTIARCH_TRIPLET=%,%,$\
27 $(filter LA_MULTIARCH_TRIPLET=%,$(tm_defines)))
29 # String definition header
30 LA_STR_H = $(srcdir)/config/loongarch/loongarch-str.h
32 # String definition header
33 $(LA_STR_H): s-loongarch-str ; @true
34 s-loongarch-str: $(srcdir)/config/loongarch/genopts/genstr.sh \
35         $(srcdir)/config/loongarch/genopts/loongarch-strings  \
36         $(srcdir)/config/loongarch/genopts/isa-evolution.in
37         $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh header \
38     $(srcdir)/config/loongarch/genopts/loongarch-strings > \
39     tmp-loongarch-str.h
40         $(SHELL) $(srcdir)/../move-if-change tmp-loongarch-str.h \
41                 $(LA_STR_H)
42         $(STAMP) s-loongarch-str
44 loongarch-c.o: $(srcdir)/config/loongarch/loongarch-c.cc $(CONFIG_H) $(SYSTEM_H) \
45         coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H) $(TARGET_H)
46         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
47         $(srcdir)/config/loongarch/loongarch-c.cc
49 loongarch-builtins.o: $(srcdir)/config/loongarch/loongarch-builtins.cc $(CONFIG_H) \
50         $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(RECOG_H) langhooks.h \
51         $(DIAGNOSTIC_CORE_H) $(OPTABS_H) $(srcdir)/config/loongarch/loongarch-ftypes.def \
52         $(srcdir)/config/loongarch/loongarch-modes.def
53         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
54         $(srcdir)/config/loongarch/loongarch-builtins.cc
56 loongarch-driver.o : $(srcdir)/config/loongarch/loongarch-driver.cc $(LA_STR_H) \
57         $(CONFIG_H) $(SYSTEM_H)
58         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
60 loongarch-opts.o: $(srcdir)/config/loongarch/loongarch-opts.cc $(LA_STR_H)
61         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
63 loongarch-cpu.o: $(srcdir)/config/loongarch/loongarch-cpu.cc $(LA_STR_H) \
64                  $(srcdir)/config/loongarch/loongarch-cpucfg-map.h
65         $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
67 loongarch-def.o: $(srcdir)/config/loongarch/loongarch-def.c $(LA_STR_H)
68         $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
70 $(srcdir)/config/loongarch/loongarch.opt: s-loongarch-opt ; @true
71 s-loongarch-opt: $(srcdir)/config/loongarch/genopts/genstr.sh \
72         $(srcdir)/config/loongarch/genopts/loongarch.opt.in \
73         $(srcdir)/config/loongarch/genopts/isa-evolution.in \
74         $(srcdir)/config/loongarch/genopts/loongarch-strings $(LA_STR_H)
75         $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh opt \
76     $(srcdir)/config/loongarch/genopts/loongarch.opt.in \
77     > tmp-loongarch.opt
78         $(SHELL) $(srcdir)/../move-if-change tmp-loongarch.opt \
79     $(srcdir)/config/loongarch/loongarch.opt
80         $(STAMP) s-loongarch-opt
82 $(srcdir)/config/loongarch/loongarch-cpucfg-map.h: s-loongarch-cpucfg-map
83         @true
84 s-loongarch-cpucfg-map: $(srcdir)/config/loongarch/genopts/genstr.sh \
85         $(srcdir)/config/loongarch/genopts/isa-evolution.in
86         $(SHELL) $< cpucfg-map > tmp-cpucfg.h
87         $(SHELL) $(srcdir)/../move-if-change tmp-cpucfg.h \
88             $(srcdir)/config/loongarch/loongarch-cpucfg-map.h
89         $(STAMP) $@