comparison Makefile.tpl @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
450 # * We also disable -Wformat, since older GCCs don't understand newer %s. 450 # * We also disable -Wformat, since older GCCs don't understand newer %s.
451 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ 451 STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
452 --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ 452 --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \
453 --disable-build-format-warnings 453 --disable-build-format-warnings
454 454
455 # When using the slow stage1 compiler disable IL verification and forcefully
456 # enable it when using the stage2 compiler instead. As we later compare
457 # stage2 and stage3 we are merely avoid doing redundant work, plus we apply
458 # checking when building all target libraries for release builds.
459 STAGE1_TFLAGS += -fno-checking
460 STAGE2_CFLAGS += -fno-checking
461 STAGE2_TFLAGS += -fno-checking
462 STAGE3_CFLAGS += -fchecking=1
463 STAGE3_TFLAGS += -fchecking=1
464
455 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate 465 STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
456 STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) 466 STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
457 467
458 STAGEtrain_CFLAGS = $(STAGE3_CFLAGS) 468 STAGEtrain_CFLAGS = $(filter-out -fchecking=1,$(STAGE3_CFLAGS))
459 STAGEtrain_TFLAGS = $(STAGE3_TFLAGS) 469 STAGEtrain_TFLAGS = $(filter-out -fchecking=1,$(STAGE3_TFLAGS))
460 470
461 STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use 471 STAGEfeedback_CFLAGS = $(STAGE4_CFLAGS) -fprofile-use
462 STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS) 472 STAGEfeedback_TFLAGS = $(STAGE4_TFLAGS)
463 473
464 STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g 474 STAGEautoprofile_CFLAGS = $(STAGE2_CFLAGS) -g
1458 @if target-libgomp 1468 @if target-libgomp
1459 .PHONY: check-target-libgomp-c++ 1469 .PHONY: check-target-libgomp-c++
1460 check-target-libgomp-c++: 1470 check-target-libgomp-c++:
1461 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp 1471 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp
1462 1472
1473 .PHONY: check-target-libgomp-fortran
1474 check-target-libgomp-fortran:
1475 $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) fortran.exp" check-target-libgomp
1476
1463 @endif target-libgomp 1477 @endif target-libgomp
1464 1478
1465 @if target-libitm 1479 @if target-libitm
1466 .PHONY: check-target-libitm-c++ 1480 .PHONY: check-target-libitm-c++
1467 check-target-libitm-c++: 1481 check-target-libitm-c++:
1716 $(MAKE) distclean-stagefeedback 1730 $(MAKE) distclean-stagefeedback
1717 1731
1718 stagefeedback-start:: 1732 stagefeedback-start::
1719 @r=`${PWD_COMMAND}`; export r; \ 1733 @r=`${PWD_COMMAND}`; export r; \
1720 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ 1734 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
1721 for i in prev-*; do \ 1735 for i in stageprofile-*; do \
1722 j=`echo $$i | sed s/^prev-//`; \ 1736 j=`echo $$i | sed s/^stageprofile-//`; \
1723 cd $$r/$$i && \ 1737 cd $$r/$$i && \
1724 { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } && \ 1738 { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } && \
1725 { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \ 1739 { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \
1726 done 1740 done
1727 1741
1812 ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'" 1826 ;; dep-maybe is the same as the AutoGen expression "- hard 'maybe-'"
1813 ;; but is written in Scheme. 1827 ;; but is written in Scheme.
1814 (define dep-maybe (lambda () 1828 (define dep-maybe (lambda ()
1815 (if (exist? "hard") "" "maybe-"))) 1829 (if (exist? "hard") "" "maybe-")))
1816 1830
1817 ;; dep-kind returns "normal" if the dependency is on an "install" target, 1831 ;; dep-kind returns returns "prebootstrap" for configure or build
1818 ;; or if either module is not bootstrapped. It returns "bootstrap" for 1832 ;; dependencies of bootstrapped modules on a build module
1819 ;; configure or build dependencies between bootstrapped modules; it returns 1833 ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
1820 ;; "prebootstrap" for configure or build dependencies of bootstrapped 1834 ;; on an "install" target, or if the dependence module is not
1821 ;; modules on a build module (e.g. all-gcc on all-build-bison). All this 1835 ;; bootstrapped; otherwise, it returns "bootstrap" or
1822 ;; is only necessary for host modules. 1836 ;; "postbootstrap" depending on whether the dependent module is
1837 ;; bootstrapped. All this is only necessary for host and target
1838 ;; modules. It might seem like, in order to avoid build races, we
1839 ;; might need more elaborate detection between prebootstrap and
1840 ;; postbootstrap modules, but there are no host prebootstrap
1841 ;; modules. If there were any non-bootstrap host modules that
1842 ;; bootstrap modules depended on, we'd get unsatisfied per-stage
1843 ;; dependencies on them, which would be immediately noticed.
1823 (define dep-kind (lambda () 1844 (define dep-kind (lambda ()
1824 (if (and (hash-ref boot-modules (dep-module "module")) 1845 (cond
1825 (=* (dep-module "on") "build-")) 1846 ((and (hash-ref boot-modules (dep-module "module"))
1826 "prebootstrap" 1847 (=* (dep-module "on") "build-"))
1827 1848 "prebootstrap")
1828 (if (or (= (dep-subtarget "on") "install-") 1849
1829 (not (hash-ref boot-modules (dep-module "module"))) 1850 ((or (= (dep-subtarget "on") "install-")
1830 (not (hash-ref boot-modules (dep-module "on")))) 1851 (not (hash-ref boot-modules (dep-module "on"))))
1831 "normal" 1852 "normal")
1832 "bootstrap")))) 1853
1854 ((hash-ref boot-modules (dep-module "module"))
1855 "bootstrap")
1856
1857 (1 "postbootstrap"))))
1858
1859 (define make-postboot-dep (lambda ()
1860 (let ((target (dep-module "module")) (dep "stage_last"))
1861 (unless (= (hash-ref postboot-targets target) dep)
1862 (hash-create-handle! postboot-targets target dep)
1863 ;; All non-bootstrap modules' configure target already
1864 ;; depend on dep.
1865 (unless (=* target "target-")
1866 (string-append "configure-" target ": " dep "\n"))))))
1833 1867
1834 ;; We now build the hash table that is used by dep-kind. 1868 ;; We now build the hash table that is used by dep-kind.
1835 (define boot-modules (make-hash-table 113)) 1869 (define boot-modules (make-hash-table 113))
1870 (define postboot-targets (make-hash-table 113))
1836 +] 1871 +]
1837 1872
1838 [+ FOR host_modules +][+ 1873 [+ FOR host_modules +][+
1839 (if (exist? "bootstrap") 1874 (if (exist? "bootstrap")
1840 (hash-create-handle! boot-modules (get "module") #t)) 1875 (hash-create-handle! boot-modules (get "module") #t))
1847 # With all the machinery above in place, it is pretty easy to generate 1882 # With all the machinery above in place, it is pretty easy to generate
1848 # dependencies. Host dependencies are a bit more complex because we have 1883 # dependencies. Host dependencies are a bit more complex because we have
1849 # to check for bootstrap/prebootstrap dependencies. To resolve 1884 # to check for bootstrap/prebootstrap dependencies. To resolve
1850 # prebootstrap dependencies, prebootstrap modules are gathered in 1885 # prebootstrap dependencies, prebootstrap modules are gathered in
1851 # a hash table. 1886 # a hash table.
1852 [+ FOR dependencies +][+ (make-dep "" "") +] 1887 [+ FOR dependencies +][+ CASE (dep-kind) +]
1853 [+ CASE (dep-kind) +] 1888 [+ == "prebootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
1854 [+ == "prebootstrap" 1889 [+ (make-dep (dep-stage) "") +][+ ENDFOR bootstrap_stage +]
1855 +][+ FOR bootstrap_stage +] 1890 [+ == "bootstrap" +][+ (make-dep "" "") +][+ FOR bootstrap_stage +]
1856 [+ (make-dep (dep-stage) "") +][+ 1891 [+ (make-dep (dep-stage) (dep-stage)) +][+ ENDFOR bootstrap_stage +]
1857 ENDFOR bootstrap_stage +] 1892 [+ == "normal" +][+ (make-dep "" "") +]
1858 [+ == "bootstrap" 1893 [+ ESAC +][+ ENDFOR dependencies +]
1859 +][+ FOR bootstrap_stage +] 1894
1860 [+ (make-dep (dep-stage) (dep-stage)) +][+ 1895 @if gcc-bootstrap
1861 ENDFOR bootstrap_stage +] 1896 [+ FOR dependencies +][+ CASE (dep-kind) +]
1862 [+ ESAC +][+ 1897 [+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
1863 ENDFOR dependencies +] 1898 ENDFOR dependencies +]@endif gcc-bootstrap
1899
1900 @unless gcc-bootstrap
1901 [+ FOR dependencies +][+ CASE (dep-kind) +]
1902 [+ == "postbootstrap" +][+ (make-dep "" "") +]
1903 [+ ESAC +][+ ENDFOR dependencies +]@endunless gcc-bootstrap
1864 1904
1865 # Dependencies for target modules on other target modules are 1905 # Dependencies for target modules on other target modules are
1866 # described by lang_env_dependencies; the defaults apply to anything 1906 # described by lang_env_dependencies; the defaults apply to anything
1867 # not mentioned there. 1907 # not mentioned there.
1868 [+ 1908 [+