diff options
Diffstat (limited to 'debian/rules.patch')
-rw-r--r-- | debian/rules.patch | 357 |
1 files changed, 129 insertions, 228 deletions
diff --git a/debian/rules.patch b/debian/rules.patch index 5e9356e..266126b 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -14,28 +14,19 @@ series_file ?= $(patchdir)/series debian_patches = \ svn-updates \ - libiberty-updates \ - $(if $(with_linaro_branch),gcc-linaro-revert-r247639) \ - $(if $(with_linaro_branch),gcc-linaro-revert-r246734) \ $(if $(with_linaro_branch),gcc-linaro) \ $(if $(with_linaro_branch),gcc-linaro-no-macros) \ + gcc-lto-jobserver \ + gcc-lto-pick-compile-time-g \ # svn-updates \ -ifeq ($(with_java),yes) -# debian_patches += \ -# svn-class-updates -endif - ifneq ($(GFDL_INVARIANT_FREE),yes) debian_patches += \ - svn-doc-updates \ $(if $(with_linaro_branch),gcc-linaro-doc) \ rename-info-files \ - gcc-SOURCE_DATE_EPOCH-doc \ - gcc-SOURCE_DATE_EPOCH-2-doc \ - $(if $(with_linaro_branch),,vulcan-cpu-doc) \ - gcc-fuse-ld-lld-doc \ + gcc-lto-jobserver-doc \ + gcc-lto-pick-compile-time-g-doc \ # svn-doc-updates \ # $(if $(with_linaro_branch),,svn-doc-updates) \ @@ -45,10 +36,9 @@ endif debian_patches += \ gcc-gfdl-build -# boehm-gc-nocheck: seems to work on the buildds \ - debian_patches += \ gcc-textdomain \ + gcc-distro-specs \ gcc-driver-extra-langs$(if $(with_linaro_branch),-linaro) ifneq (,$(filter $(distrelease),etch lenny squeeze wheezy dapper hardy intrepid jaunty karmic lucid)) @@ -62,18 +52,11 @@ debian_patches += \ libstdc++-doclink \ libstdc++-man-3cxx \ libstdc++-test-installed \ - libjava-stacktrace \ - libjava-jnipath \ - libjava-sjlj \ - libjava-disable-plugin \ alpha-no-ev4-directive \ - boehm-gc-getnprocs \ note-gnu-stack \ libgomp-omp_h-multilib \ - gccgo-version \ - pr47818 \ - gcc-base-version \ libgo-testsuite \ + libgo-cleanfiles \ gcc-target-include-asm \ libgo-revert-timeout-exp \ libgo-setcontext-config \ @@ -81,65 +64,37 @@ debian_patches += \ kfreebsd-unwind \ libitm-no-fortify-source \ sparc64-biarch-long-double-128 \ - gcc-ia64-bootstrap-ignore \ - gotools-configury \ pr66368 \ pr67590 \ - ada-gnattools-ldflags \ libjit-ldflags \ - gcc-SOURCE_DATE_EPOCH \ - gcc-SOURCE_DATE_EPOCH-2 \ - cmd-go-combine-gccgo-s-ld-and-ldShared-methods \ - libjava-mips64el \ - gccgo-issue16780 \ - $(if $(with_linaro_branch),,vulcan-cpu) \ - $(if $(with_linaro_branch),,vulcan-costs) \ libffi-pax \ libffi-race-condition \ - libgo-add-getrandom-mips-sparc \ - libgo-fix-getrandom-clone-sparc64 \ - libgo-rawClone-no_split_stack \ - libgo-rawClone-no-pt_regs \ - libgo-elf-relocations-sparc64 \ - libobjc-system-gc \ - compress-debug-check \ - pr77267 \ - pr78774 \ - CVE-2016-9840 \ - CVE-2016-9841 \ - CVE-2016-9842 \ - CVE-2016-9843 \ - libcc1-compiler-name \ - mips-pr78176-add-mlxc1-sxc1 \ - mips-loongson3a-use-fused-madd.d \ - mips-madd4 \ - gcc-fuse-ld-lld \ - pr72813 \ - pr70909 \ - pr77857 \ - pr80533 \ - pr60818 \ - -ifeq ($(libstdcxx_abi),new) - debian_patches += libstdc++-functexcept -endif + gcc-foffload-default \ + cuda-float128 \ + libffi-mipsen-r6 \ + t-libunwind-elf-Wl-z-defs \ + gcc-force-cross-layout \ + gcc-search-prefixed-as-ld \ + kfreebsd-decimal-float \ + pr87808 \ + libgomp-no-werror \ + gdc-cross-build \ + verbose-lto-linker \ + libstdc++-futex \ + pr91307 \ + pr92267 \ + +# TODO: +# pr81829 \ # $(if $(filter yes, $(DEB_CROSS)),,gcc-print-file-name) \ # libstdc++-nothumb-check \ -# TODO: update ... -# libjava-rpath \ hardening_patches = -ifeq ($(with_ssp)-$(with_ssp_default),yes-yes) - hardening_patches += gcc-default-ssp - hardening_patches += gcc-default-format-security - ifeq (,$(filter $(distrelease),dapper hardy lucid maverick natty oneiric precise quantal raring saucy trusty)) - hardening_patches += gcc-default-ssp-strong - endif -endif ifneq (,$(filter $(derivative),Ubuntu)) - ifneq (,$(findstring gcc-6, $(PKGSOURCE))) + ifneq (,$(findstring gcc-9, $(PKGSOURCE))) hardening_patches += \ + gcc-distro-specs-doc \ gcc-default-fortify-source \ gcc-default-relro \ testsuite-hardening-format \ @@ -149,16 +104,16 @@ ifneq (,$(filter $(derivative),Ubuntu)) ifeq ($(with_pie),yes) hardening_patches += \ bind_now_when_pie - else - hardening_patches += \ - ignore-pie-specs-when-not-enabled +# else +# hardening_patches += \ +# ignore-pie-specs-when-not-enabled endif endif else ifneq (,$(filter $(derivative),Debian)) - ifneq (,$(findstring gcc-6, $(PKGSOURCE))) + ifneq (,$(findstring gcc-9, $(PKGSOURCE))) # ifneq ($(with_pie),yes) # hardening_patches += \ -# ignore-pie-specs-when-not-enabled +# ignore-pie-specs-when-not-enabled # endif endif endif @@ -168,76 +123,48 @@ ifneq (,$(findstring 4.4, $(PKGSOURCE))) debian_patches += pr39491 endif -debian_patches += ada-arm -debian_patches += ada-kfreebsd -debian_patches += ada-revert-pr63225 +# Patches for non-core languages. -ifeq (,$(DEB_STAGE)) -# there should be no harm to always apply these, except for new GCC versions -#ifeq ($(with_ada),yes) - debian_patches += \ - ada-driver-check \ - ada-default-project-path \ - ada-library-project-files-soname - - # FIXME: needs update - #ada-symbolic-tracebacks \ +debian_patches += gm2 gm2-install-man gm2-updates gm2-bootstrap-compare +# Most of the time, it would be safe to apply them whether the +# language is selected or not. But when working on a new GCC version, +# it is convenient to concentrate on core languages, and refresh them +# later when working on the specific language. +ifeq ($(with_ada),yes) + debian_patches += ada-gcc-name + debian_patches += ada-verbose ifeq ($(biarch64),yes) - debian_patches += \ - ada-nobiarch-check + debian_patches += ada-nobiarch-check endif - - #ifeq ($(with_libgnat),yes) - debian_patches += \ - ada-link-lib \ - ada-libgnatvsn \ - ada-libgnatprj \ - ada-gnattools-cross \ - ada-acats \ - libgnatprj-cross-hack - ifneq (,$(filter $(distrelease),lucid precise)) - debian_patches += \ - libgnatprj-link + debian_patches += ada-link-lib + debian_patches += ada-libgnatvsn + debian_patches += ada-gnattools-cross + ifeq ($(with_gnatsjlj),yes) + debian_patches += ada-sjlj endif - #endif - #ifeq ($(with_gnatsjlj),yes) - debian_patches += \ - ada-sjlj - #endif - - debian_patches += ada-link-shlib - debian_patches += ada-gcc-name -#endif -endif # DEB_STAGE - + debian_patches += ada-lib-info-source-date-epoch + debian_patches += ada-armel-libatomic + # applied for trunk builds as well: + #debian_patches += ada-kfreebsd + debian_patches += ada-749574 + debian_patches += ada-lib-info-file-prefix-map + debian_patches += ada-perl-shebang + debian_patches += ada-repinfo-input +endif -ifeq ($(with_d),yes) - debian_patches += \ - gdc-6 \ - gdc-updates \ - libphobos-zlib \ - gdc-versym-cpu \ - gdc-versym-os \ - gdc-frontend-posix \ - gdc-base-version \ - gdc-profiledbuild \ +# FIXME: still relevant? +# gdc-updates \ # gdc-multiarch - ifneq ($(GFDL_INVARIANT_FREE),yes) - debian_patches += gdc-6-doc - else - debian_patches += gdc-texinfo - endif - ifeq ($(with_libphobos),yes) - debian_patches += gdc-libphobos-build - else - debian_patches += gdc-driver-nophobos - endif - ifeq (,$(filter $(DEB_TARGET_ARCH),amd64 i386)) - debian_patches += disable-gdc-tests - endif -else - debian_patches += gcc-d-lang + +ifeq ($(GFDL_INVARIANT_FREE),yes) + debian_patches += gdc-texinfo +endif +ifneq ($(with_libphobos),yes) + debian_patches += gdc-driver-nophobos +endif +ifeq (,$(filter $(DEB_TARGET_ARCH),amd64 i386 armhf)) + debian_patches += disable-gdc-tests endif ifeq ($(DEB_TARGET_ARCH),alpha) @@ -247,36 +174,10 @@ ifeq ($(DEB_TARGET_ARCH),alpha) endif endif -ifeq (,$(filter $(derivative),Ubuntu)) - debian_patches += pr64735-headers - ifeq ($(DEB_TARGET_ARCH),armel) - debian_patches += pr64735 - endif -endif - -ifneq (,$(findstring $(DEB_TARGET_ARCH),arm armel armhf)) - debian_patches += libjava-armel-unwind -endif - -ifeq ($(DEB_TARGET_ARCH),armhf) - debian_patches += gcj-arm-mode -else ifeq ($(DEB_TARGET_ARCH),armel) - ifneq (,$(filter $(distrelease),lucid maverick natty oneiric precise)) - debian_patches += gcj-arm-mode - endif -endif - -ifneq (,$(findstring mips, $(DEB_TARGET_ARCH))) - debian_patches += pr65618 -endif - -ifeq ($(DEB_TARGET_ARCH),powerpcspe) - debian_patches += powerpc_remove_many - debian_patches += powerpc_nofprs +ifeq ($(DEB_TARGET_ARCH),ia64) + debian_patches += pr87338 pr90714 endif -#debian_patches += link-libs - # all patches below this line are applied for gcc-snapshot builds as well ifeq ($(single_package),yes) @@ -285,7 +186,8 @@ endif debian_patches += \ sys-auxv-header \ - libcilkrts-targets \ + gdc-dynamic-link-phobos \ + ia64-disable-selective-scheduling \ ifeq ($(with_ibm_branch),yes) debian_patches += ibm-branch @@ -305,56 +207,29 @@ debian_patches += arm-multilib-defaults ifeq ($(DEB_CROSS),yes) debian_patches += cross-fixes debian_patches += cross-install-location - ifeq ($(with_d),yes) - debian_patches += gdc-cross-install-location + ifeq ($(with_m2),yes) + debian_patches += cross-install-location-gm2 endif endif ifeq ($(DEB_TARGET_ARCH_OS),hurd) debian_patches += hurd-changes - debian_patches += \ - src_gcc_config_i386_gnu.h \ - src_libgo_configure.ac \ - src_libgo_runtime_go-caller.c \ - src_libgo_go_net_sendfile_gnu.go \ - src_libgo_go_net_sock_gnu.go \ - src_libgo_go_net_sockopt_gnu.go \ - src_libgo_go_net_sockoptip_gnu.go \ - src_libgo_go_syscall_libcall_gnu_386.go \ - src_libgo_go_syscall_libcall_gnu.go \ - src_libgo_go_syscall_libcall_posix-1.go \ - src_libgo_go_syscall_socket_gnu.go \ - src_libgo_go_syscall_wait.c \ - src_libgo_Makefile.am \ - src_libgo_Makefile.in \ - src_libgo_mksysinfo.sh \ - src_libgo_runtime_getncpu-gnu.c \ - src_libgo_runtime_netpoll.goc \ - src_libgo_go_os_os_test.go \ - src_libgo_go_syscall_syscall_gnu_test.go \ - src_libgo_testsuite_gotest \ - add-gnu-to-libgo-headers endif debian_patches += gcc-ice-dump debian_patches += gcc-ice-apport debian_patches += skip-bootstrap-multilib -debian_patches += libjava-fixed-symlinks debian_patches += libffi-ro-eh_frame_sect debian_patches += libffi-mips +debian_patches += ada-kfreebsd # sigaction on sparc changed between glibc 2.19 and 2.21 ifeq (,$(filter 2.1%, $(shell dpkg-query -l libc-bin | awk '/^.i/ {print $$3}'))) - debian_patches += pr67899 + # keep it, gets remove in GCC from time to time + #debian_patches += pr67899 endif debian_patches += gcc-multiarch -ifeq ($(with_multiarch_lib),yes) - ifneq ($(single_package),yes) - debian_patches += libjava-multiarch - endif -endif -debian_patches += libjava-nobiarch-check debian_patches += config-ml ifneq ($(single_package),yes) ifeq ($(with_multiarch_cxxheaders),yes) @@ -365,12 +240,10 @@ endif ifneq (,$(filter $(build_type), build-cross cross-build-cross)) debian_patches += cross-no-locale-include debian_patches += cross-biarch - ifeq ($(with_libphobos),yes) - debian_patches += gdc-cross-biarch - endif endif debian_patches += gcc-multilib-multiarch +ifneq ($(trunk_build),yes) ifneq (,$(filter $(derivative),Ubuntu)) ifeq (,$(filter $(distrelease),dapper hardy intrepid jaunty karmic lucid maverick)) debian_patches += gcc-as-needed @@ -379,25 +252,21 @@ ifneq (,$(filter $(derivative),Ubuntu)) endif endif else # Debian - #debian_patches += gcc-as-needed + ifeq (,$(filter $(distrelease),squeeze wheezy jessie stretch)) + debian_patches += gcc-as-needed gcc-as-needed-gold + endif +endif endif debian_patches += libgomp-kfreebsd-testsuite debian_patches += go-testsuite -# Ada patches needed for both the stable package and snapshot builds -debian_patches += ada-749574 -debian_patches += ada-mips -ifeq ($(DEB_TARGET_ARCH),m68k) - debian_patches += ada-m68k - ifeq ($(with_ada),yes) - debian_patches += m68k-revert-pr45144 - endif -endif - # don't remove, this is regularly overwritten, see PR sanitizer/63958. #debian_patches += libasan-sparc +# Has to be refreshed manually as described in the header. +debian_patches += ada-changes-in-autogen-output + series_stamp = $(stampdir)/02-series-stamp series: $(series_stamp) $(series_stamp): @@ -412,16 +281,19 @@ endif sed -r 's/(.)$$/\1 -p1/' -i $(series_file) touch $@ -autoconf_files = $(filter-out src/libjava/classpath/m4/acinclude.m4, \ - $(shell lsdiff --no-filename $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \ - | sed -rn '/(configure\.ac|acinclude.m4)$$/s:[^/]+/src/:src/:p' | sort -u)) +autoconf_files = $(shell lsdiff --no-filename $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \ + | sed -rn '/(configure\.ac|acinclude.m4)$$/s:[^/]+/src/:src/:p' | sort -u) autoconf_dirs = $(sort $(dir $(autoconf_files))) automake_files = $(addprefix ./, $(filter-out none, \ $(shell lsdiff --no-filename $(foreach patch,$(debian_patches),$(patchdir)/$(patch).diff) \ | sed -rn '/Makefile\.(am|in)$$/s:[^/]+/src/:src/:p' | sort -u))) -autoconf_version = 2.64 +autoconf_version = 2.69 +# FIXME should have a separate 2.69 package +ifeq (,$(filter $(distrelease),lucid precise)) + autoconf_version = +endif ifeq ($(trunk_build),yes) # The actual version depends on the build-dependencies set by # variable AUTO_BUILD_DEP in rules.conf. Here, we assume the @@ -435,7 +307,7 @@ endif # maybe only once per directory). $(patch_stamp): $(unpack_stamp) $(series_stamp) sync - QUILT_PATCHES=$(patchdir) \ + QUILT_PATCHES=$(patchdir) QUILT_PATCH_OPTS='-E' \ quilt --quiltrc /dev/null push -a || test $$? = 2 ifneq (,$(filter svn-updates, $(debian_patches))) @@ -443,17 +315,13 @@ ifneq (,$(filter svn-updates, $(debian_patches))) $(patchdir)/svn-updates.diff > src/LAST_UPDATED endif -ifneq (,$(filter libgo-elf-relocations-sparc64, $(debian_patches))) - uudecode $(patchdir)/../go-relocation-test-gcc620-sparc64.obj.uue -endif - : # only needed when we have changes, and currently fails with autogen 5.18 : #cd $(srcdir)/fixincludes && ./genfixes sync echo -n $(autoconf_dirs) | xargs -d ' ' -L 1 -P $(USE_CPUS) -I{} \ sh -c 'echo "Running autoconf$(autoconf_version) in {}..." ; \ - cd $(CURDIR)/{} && \ + cd $(CURDIR)/{} && rm -f configure && \ AUTOM4TE=/usr/bin/autom4te$(autoconf_version) autoconf$(autoconf_version)' for i in $(debian_patches) $(hardening_patches); do \ @@ -461,14 +329,47 @@ endif sed -n 's/^# *DP: */ /p' $(patchdir)/$$i.diff >> pxxx; \ done # -$(srcdir)/move-if-change pxxx $@ - mv pxxx $@ -unpatch: -ifneq (,$(filter libgo-elf-relocations-sparc64, $(debian_patches))) - # uudecoded in $(patch_stamp) rule - rm -f $(srcdir)/libgo/go/debug/elf/testdata/go-relocation-test-gcc620-sparc64.obj + : # generate the distro-defaults.h header + rm -f $(srcdir)/gcc/distro-defaults.h + echo '/* distro specific configuration injected by the distro build. */' \ + >> $(srcdir)/gcc/distro-defaults.h +ifeq ($(with_async_unwind),yes) + echo '#define DIST_DEFAULT_ASYNC_UNWIND 1' \ + >> $(srcdir)/gcc/distro-defaults.h +endif +ifeq ($(with_ssp)-$(with_ssp_default),yes-yes) + echo '#define DIST_DEFAULT_SSP 1' \ + >> $(srcdir)/gcc/distro-defaults.h + ifeq (,$(filter $(distrelease),dapper hardy lucid maverick natty oneiric precise quantal raring saucy trusty)) + echo '#define DIST_DEFAULT_SSP_STRONG 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif + echo '#define DIST_DEFAULT_FORMAT_SECURITY 1' \ + >> $(srcdir)/gcc/distro-defaults.h +endif +ifneq (,$(filter $(derivative),Ubuntu)) + ifneq (,$(findstring gcc-9, $(PKGSOURCE))) +# FIXME: this is directly patched +# echo '#define DIST_DEFAULT_FORTIFY_SOURCE 1' \ +# >> $(srcdir)/gcc/distro-defaults.h + endif + ifeq ($(with_stack_clash),yes) + echo '#define DIST_DEFAULT_STACK_CLASH 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif + ifeq ($(with_cf_protection),yes) + echo '#define DIST_DEFAULT_CF_PROTECTION 1' \ + >> $(srcdir)/gcc/distro-defaults.h + endif +else ifneq (,$(filter $(derivative),Debian)) + ifneq (,$(findstring gcc-9, $(PKGSOURCE))) + endif endif + mv pxxx $@ + +unpatch: QUILT_PATCHES=$(patchdir) \ quilt --quiltrc /dev/null pop -a -R || test $$? = 2 rm -rf .pc |