# Define the names for selecting Ada in LANGUAGES.
ada: gnat1$(exeext) gnatbind$(exeext)
-ada.serial: gnat1$(exeext)
+ada.serial = gnat1$(exeext)
# Tell GNU Make to ignore these, if they exist.
-.PHONY: ada ada.serial ada.prev
+.PHONY: ada
# Compute the FLAGS to pass for gnattools, now linked with a C++ driver as
# we're linking against at least libcommon which contains C++ compiled code.
# Since the RTL should be built with the latest compiler, remove the
# stamp target in the parent directory whenever gnat1 is rebuilt
gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) libcommon-target.a \
- $(LIBDEPS) ada.prev
+ $(LIBDEPS) $(ada.prev)
@$(call LINK_PROGRESS,$(INDEX.ada),start)
+$(GCC_LLINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) \
libcommon-target.a $(LIBS) $(SYSLIBS) $(BACKENDLIBS) $(CFLAGS)
# The name for selecting brig in LANGUAGES.
brig: brig1$(exeext)
-brig.serial: brig
+brig.serial = brig1$(exeext)
-.PHONY: brig brig.serial brig.prev
+.PHONY: brig
CFLAGS-brig/brigspec.o += $(DRIVER_DEFINES)
brig_OBJS = $(BRIG_OBJS) brig/brigspec.o
-brig1$(exeext): $(BRIG_OBJS) attribs.o $(BACKEND) $(LIBDEPS) brig.prev
+brig1$(exeext): $(BRIG_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(brig.prev)
@$(call LINK_PROGRESS,$(INDEX.brig),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(BRIG_OBJS) attribs.o $(BACKEND) $(LIBS) \
#\f
# Define the names for selecting c in LANGUAGES.
c: cc1$(exeext)
-c.serial: c
+c.serial = cc1$(exeext)
# Tell GNU make to ignore these if they exist.
-.PHONY: c gcc c.serial
+.PHONY: c gcc
# The C front end driver. This is different from the drivers for other
# front ends, because there is no C language specific driver (i.e. nothing
echo else >> Make-hooks
lang_cnt=0
lang_list=
-prev=c.serial
+prev=c
serialization_languages=c
for lang in $all_selected_languages
do
test $lang = c && continue
lang_cnt=`expr $lang_cnt + 1`
lang_list=" $prev$lang_list"
- prev=${lang}.serial
+ prev=${lang}
done
echo "SERIAL_LIST = \$(wordlist \$(DO_LINK_SERIALIZATION),$lang_cnt,$lang_list)" >> Make-hooks
echo endif >> Make-hooks
for lang in $serialization_languages
do
test $lang = c && continue
- echo "$lang.prev: \$(word $lang_cnt,\$(SERIAL_LIST))" >> Make-hooks
+ echo "$lang.prev = \$(if \$(word $lang_cnt,\$(SERIAL_LIST)),\$(\$(word $lang_cnt,\$(SERIAL_LIST)).serial))" >> Make-hooks
echo "INDEX.$lang = $lang_idx" >> Make-hooks
lang_cnt=`expr $lang_cnt - 1`
lang_idx=`expr $lang_idx + 1`
echo else >> Make-hooks
lang_cnt=0
lang_list=
-prev=c.serial
+prev=c
serialization_languages=c
for lang in $all_selected_languages
do
test $lang = c && continue
lang_cnt=`expr $lang_cnt + 1`
lang_list=" $prev$lang_list"
- prev=${lang}.serial
+ prev=${lang}
done
echo "SERIAL_LIST = \$(wordlist \$(DO_LINK_SERIALIZATION),$lang_cnt,$lang_list)" >> Make-hooks
echo endif >> Make-hooks
for lang in $serialization_languages
do
test $lang = c && continue
- echo "$lang.prev: \$(word $lang_cnt,\$(SERIAL_LIST))" >> Make-hooks
+ echo "$lang.prev = \$(if \$(word $lang_cnt,\$(SERIAL_LIST)),\$(\$(word $lang_cnt,\$(SERIAL_LIST)).serial))" >> Make-hooks
echo "INDEX.$lang = $lang_idx" >> Make-hooks
lang_cnt=`expr $lang_cnt - 1`
lang_idx=`expr $lang_idx + 1`
# into the C++ rule, but that needs a little bit of work
# to do the right thing within all.cross.
c++: cc1plus$(exeext)
-c++.serial: c++
+c++.serial = cc1plus$(exeext)
# Tell GNU make to ignore these if they exist.
-.PHONY: c++ c++.serial c++.prev
+.PHONY: c++
CFLAGS-cp/g++spec.o += $(DRIVER_DEFINES)
$(srcdir)/../move-if-change cc1plus-checksum.c.tmp cc1plus-checksum.c; \
fi
-cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS) c++.prev
+cc1plus$(exeext): $(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBDEPS) $(c++.prev)
@$(call LINK_PROGRESS,$(INDEX.c++),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(CXX_OBJS) cc1plus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
# The name for selecting d in LANGUAGES.
d: d21$(exeext)
-d.serial: d
+d.serial = d21$(exeext)
# Tell GNU make to ignore these if they exist.
-.PHONY: d d.serial d.prev
+.PHONY: d
# Create the compiler driver for D.
CFLAGS-d/d-spec.o += $(DRIVER_DEFINES) $(D_LIBPHOBOS)
d_OBJS = $(D_ALL_OBJS) d/d-spec.o
-d21$(exeext): $(D_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) d.prev
+d21$(exeext): $(D_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(d.prev)
@$(call LINK_PROGRESS,$(INDEX.d),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(D_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
#\f
# Define the names for selecting gfortran in LANGUAGES.
fortran: f951$(exeext)
-fortran.serial: fortran
+fortran.serial = f951$(exeext)
# Tell GNU make to ignore files by these names if they exist.
-.PHONY: fortran fortran.serial fortran.prev
+.PHONY: fortran
CFLAGS-fortran/gfortranspec.o += $(DRIVER_DEFINES)
cp gfortran$(exeext) gfortran-cross$(exeext)
# The compiler itself is called f951.
-f951$(exeext): $(F95_OBJS) $(BACKEND) $(LIBDEPS) attribs.o fortran.prev
+f951$(exeext): $(F95_OBJS) $(BACKEND) $(LIBDEPS) attribs.o $(fortran.prev)
@$(call LINK_PROGRESS,$(INDEX.fortran),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(F95_OBJS) $(BACKEND) $(ZLIB) $(LIBS) attribs.o \
# The name for selecting go in LANGUAGES.
go: go1$(exeext)
-go.serial: go
+go.serial = go1$(exeext)
-.PHONY: go go.serial go.prev
+.PHONY: go
CFLAGS-go/gospec.o += $(DRIVER_DEFINES)
go_OBJS = $(GO_OBJS) go/gospec.o
-go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) go.prev
+go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(go.prev)
@$(call LINK_PROGRESS,$(INDEX.go),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
$(FULL_DRIVER_NAME)
endif
-jit.serial: $(LIBGCCJIT_FILENAME)
+jit.serial = $(LIBGCCJIT_FILENAME)
# Tell GNU make to ignore these if they exist.
-.PHONY: jit jit.serial jit.prev
+.PHONY: jit
jit_OBJS = attribs.o \
jit/dummy-frontend.o \
libbackend.a libcommon-target.a libcommon.a \
$(CPPLIB) $(LIBDECNUMBER) \
$(LIBDEPS) $(srcdir)/jit/libgccjit.map \
- $(EXTRA_GCC_OBJS) jit.prev
+ $(EXTRA_GCC_OBJS) $(jit.prev)
@$(call LINK_PROGRESS,$(INDEX.jit),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ -shared \
$(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \
# Rules
lto: $(LTO_EXE) $(LTO_DUMP_EXE)
-lto1.serial: $(LTO_EXE)
-lto2.serial: $(LTO_DUMP_EXE)
+lto1.serial = $(LTO_EXE)
+lto2.serial = $(LTO_DUMP_EXE)
-.PHONY: lto lto1.serial lto1.prev lto2.serial lto2.prev
+.PHONY: lto
# These hooks are used by the main GCC Makefile. Consult that
# Makefile for documentation.
# Use strict warnings for this front end.
lto-warn = $(STRICT_WARN)
-$(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) lto1.prev
+$(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) $(lto1.prev)
@$(call LINK_PROGRESS,$(INDEX.lto1),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS)
@$(call LINK_PROGRESS,$(INDEX.lto1),end)
-$(LTO_DUMP_EXE): $(LTO_DUMP_OBJS) $(BACKEND) $(LIBDEPS) lto2.prev
+$(LTO_DUMP_EXE): $(LTO_DUMP_OBJS) $(BACKEND) $(LIBDEPS) $(lto2.prev)
@$(call LINK_PROGRESS,$(INDEX.lto2),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(LTO_DUMP_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS)
#\f
# Define the names for selecting Objective-C in LANGUAGES.
objc: cc1obj$(exeext)
-objc.serial: objc
+objc.serial = cc1obj$(exeext)
# Tell GNU make to ignore these if they exist.
-.PHONY: objc objc.serial objc.prev
+.PHONY: objc
# Use maximal warnings for this front end.
objc-warn = $(STRICT_WARN)
$(srcdir)/../move-if-change cc1obj-checksum.c.tmp cc1obj-checksum.c
cc1obj$(exeext): $(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o $(BACKEND) \
- $(LIBDEPS) objc.prev
+ $(LIBDEPS) $(objc.prev)
@$(call LINK_PROGRESS,$(INDEX.objc),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(OBJC_OBJS) $(C_AND_OBJC_OBJS) cc1obj-checksum.o \
#\f
# Define the names for selecting Objective-C++ in LANGUAGES.
obj-c++: cc1objplus$(exeext)
-obj-c++.serial: obj-c++
+obj-c++.serial = cc1objplus$(exeext)
# Tell GNU make to ignore these if they exist.
-.PHONY: obj-c++ obj-c++.serial obj-c++.prev
+.PHONY: obj-c++
# Use maximal warnings for this front end. Also, make ObjC and C++
# headers accessible.
cc1objplus-checksum.c
cc1objplus$(exeext): $(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) \
- $(LIBDEPS) obj-c++.prev
+ $(LIBDEPS) $(obj-c++.prev)
@$(call LINK_PROGRESS,$(INDEX.obj-c++),start)
+$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
$(OBJCXX_OBJS) cc1objplus-checksum.o $(BACKEND) $(LIBS) $(BACKENDLIBS)