summaryrefslogtreecommitdiff
path: root/patches/gcc
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-12 05:00:32 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:56:29 (GMT)
commit5935d586e140b35398f45772d5749924dea7da57 (patch)
tree371d497ec06cba5afca65a5616bcb37f280481b7 /patches/gcc
parentd589df4ebebdd9e89a66dc788e23b3c3db5f23d5 (diff)
Convert gcc to new framework.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'patches/gcc')
-rw-r--r--patches/gcc/4.8.5/001_gcc_bug_62231.patch129
-rw-r--r--patches/gcc/4.8.5/002_gcc_bug_62231.patch18
-rw-r--r--patches/gcc/4.8.5/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional122
-rw-r--r--patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch13
-rw-r--r--patches/gcc/4.8.5/111-pr65730.patch37
-rw-r--r--patches/gcc/4.8.5/130-pr43538.patch25
-rw-r--r--patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch28
-rw-r--r--patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch138
-rw-r--r--patches/gcc/4.8.5/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch49
-rw-r--r--patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch104
-rw-r--r--patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch13
-rw-r--r--patches/gcc/4.8.5/841-PR57717-E500v2.patch23
-rw-r--r--patches/gcc/4.8.5/842-PR60155.patch111
-rw-r--r--patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch24
-rw-r--r--patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch273
-rw-r--r--patches/gcc/4.8.5/851-PR-other-56780.patch244
-rw-r--r--patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch290
-rw-r--r--patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch76
-rw-r--r--patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch33
-rw-r--r--patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch40
-rw-r--r--patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch73
-rw-r--r--patches/gcc/4.8.5/900-musl-support.patch648
-rw-r--r--patches/gcc/4.8.5/950-cygwin64.patch11
-rw-r--r--patches/gcc/4.9.4/001-gcc_bug_62231.patch129
-rw-r--r--patches/gcc/4.9.4/002-gcc_bug_62231.patch18
-rw-r--r--patches/gcc/4.9.4/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional122
-rw-r--r--patches/gcc/4.9.4/1100-msp430-string-literals.patch27
-rw-r--r--patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch13
-rw-r--r--patches/gcc/4.9.4/111-pr65730.patch34
-rw-r--r--patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch26
-rw-r--r--patches/gcc/4.9.4/130-pr43538.patch25
-rw-r--r--patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch28
-rw-r--r--patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch37
-rw-r--r--patches/gcc/4.9.4/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch104
-rw-r--r--patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch13
-rw-r--r--patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch166
-rw-r--r--patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch274
-rw-r--r--patches/gcc/4.9.4/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch287
-rw-r--r--patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch76
-rw-r--r--patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch33
-rw-r--r--patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch40
-rw-r--r--patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch169
-rw-r--r--patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch73
-rw-r--r--patches/gcc/4.9.4/880-nios2_legitimize_address.patch49
-rw-r--r--patches/gcc/4.9.4/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/4.9.4/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/4.9.4/900-musl-support.patch640
-rw-r--r--patches/gcc/4.9.4/901-microblaze-uclibc.patch21
-rw-r--r--patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/4.9.4/940-uclinux-enable-threads.patch20
-rw-r--r--patches/gcc/5.4.0/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch64
-rw-r--r--patches/gcc/5.4.0/1100-msp430-string-literals.patch81
-rw-r--r--patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch13
-rw-r--r--patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch29
-rw-r--r--patches/gcc/5.4.0/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch15
-rw-r--r--patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch166
-rw-r--r--patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch273
-rw-r--r--patches/gcc/5.4.0/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch290
-rw-r--r--patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch76
-rw-r--r--patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch31
-rw-r--r--patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch40
-rw-r--r--patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch174
-rw-r--r--patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch108
-rw-r--r--patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch67
-rw-r--r--patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch62
-rw-r--r--patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch35
-rw-r--r--patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--patches/gcc/5.4.0/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/5.4.0/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/5.4.0/892-microblaze-uclibc.patch24
-rw-r--r--patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch65
-rw-r--r--patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch32
-rw-r--r--patches/gcc/5.4.0/902-unwind-fix-for-musl.patch36
-rw-r--r--patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch80
-rw-r--r--patches/gcc/5.4.0/904-musl-libc-config.patch285
-rw-r--r--patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch130
-rw-r--r--patches/gcc/5.4.0/906-mips-musl-support.patch37
-rw-r--r--patches/gcc/5.4.0/907-x86-musl-support.patch45
-rw-r--r--patches/gcc/5.4.0/908-arm-musl-support.patch45
-rw-r--r--patches/gcc/5.4.0/909-aarch64-musl-support.patch33
-rw-r--r--patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch28
-rw-r--r--patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/5.4.0/940-uclinux-enable-threads.patch19
-rw-r--r--patches/gcc/6.3.0/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch28
-rw-r--r--patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch13
-rw-r--r--patches/gcc/6.3.0/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch15
-rw-r--r--patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch69
-rw-r--r--patches/gcc/6.3.0/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch62
-rw-r--r--patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch318
-rw-r--r--patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch35
-rw-r--r--patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--patches/gcc/6.3.0/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/6.3.0/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch60
-rw-r--r--patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch1944
-rw-r--r--patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch59
-rw-r--r--patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch17
-rw-r--r--patches/gcc/6.3.0/900-libgfortran-missing-include.patch10
-rw-r--r--patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch28
-rw-r--r--patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/6.3.0/940-uclinux-enable-threads.patch19
-rw-r--r--patches/gcc/6.3.0/951-bionic-ndk.patch58
-rw-r--r--patches/gcc/6.3.0/952-bionic-errno.patch19
-rw-r--r--patches/gcc/6.3.0/970-crystax.patch551
-rw-r--r--patches/gcc/6.3.0/971-crystax.patch25
-rw-r--r--patches/gcc/6.3.0/972-crystax.patch302
-rw-r--r--patches/gcc/6.3.0/973-crystax.patch20
-rw-r--r--patches/gcc/6.3.0/974-crystax.patch24
-rw-r--r--patches/gcc/6.3.0/975-crystax.patch31
-rw-r--r--patches/gcc/6.3.0/976-crystax.patch21
-rw-r--r--patches/gcc/6.3.0/977-crystax.patch33
-rw-r--r--patches/gcc/7.1.0/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch13
-rw-r--r--patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/7.1.0/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--patches/gcc/7.1.0/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/7.1.0/900-libgfortran-missing-include.patch10
-rw-r--r--patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch28
-rw-r--r--patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/7.1.0/951-bionic-ndk.patch58
-rw-r--r--patches/gcc/7.1.0/952-bionic-errno.patch19
-rw-r--r--patches/gcc/7.1.0/970-crystax.patch553
-rw-r--r--patches/gcc/7.1.0/971-crystax.patch25
-rw-r--r--patches/gcc/7.1.0/972-crystax.patch302
-rw-r--r--patches/gcc/7.1.0/973-crystax.patch20
-rw-r--r--patches/gcc/7.1.0/974-crystax.patch24
-rw-r--r--patches/gcc/7.1.0/975-crystax.patch31
-rw-r--r--patches/gcc/7.1.0/976-crystax.patch21
-rw-r--r--patches/gcc/7.1.0/977-crystax.patch33
-rw-r--r--patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch129
-rw-r--r--patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch18
-rw-r--r--patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional122
-rw-r--r--patches/gcc/linaro-4.8-2015.06/111-pr65730.patch37
-rw-r--r--patches/gcc/linaro-4.8-2015.06/130-pr43538.patch25
-rw-r--r--patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch28
-rw-r--r--patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch138
-rw-r--r--patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch49
-rw-r--r--patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch104
-rw-r--r--patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch13
-rw-r--r--patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch23
-rw-r--r--patches/gcc/linaro-4.8-2015.06/842-PR60155.patch111
-rw-r--r--patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch24
-rw-r--r--patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch273
-rw-r--r--patches/gcc/linaro-4.8-2015.06/851-PR-other-56780.patch244
-rw-r--r--patches/gcc/linaro-4.8-2015.06/870-xtensa-add-mauto-litpools-option.patch290
-rw-r--r--patches/gcc/linaro-4.8-2015.06/871-xtensa-reimplement-register-spilling.patch76
-rw-r--r--patches/gcc/linaro-4.8-2015.06/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch33
-rw-r--r--patches/gcc/linaro-4.8-2015.06/873-xtensa-fix-_Unwind_GetCFA.patch40
-rw-r--r--patches/gcc/linaro-4.8-2015.06/874-gcc-xtensa-fix-fprintf-format-specifiers.patch73
-rw-r--r--patches/gcc/linaro-4.8-2015.06/900-musl-support.patch648
-rw-r--r--patches/gcc/linaro-4.8-2015.06/950-cygwin64.patch11
-rw-r--r--patches/gcc/linaro-4.9-2017.01/001-gcc_bug_62231.patch129
-rw-r--r--patches/gcc/linaro-4.9-2017.01/002-gcc_bug_62231.patch18
-rw-r--r--patches/gcc/linaro-4.9-2017.01/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/linaro-4.9-2017.01/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/linaro-4.9-2017.01/1000-powerpc-link-with-math-lib.patch.conditional122
-rw-r--r--patches/gcc/linaro-4.9-2017.01/1100-msp430-string-literals.patch27
-rw-r--r--patches/gcc/linaro-4.9-2017.01/111-pr65730.patch34
-rw-r--r--patches/gcc/linaro-4.9-2017.01/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch26
-rw-r--r--patches/gcc/linaro-4.9-2017.01/130-pr43538.patch25
-rw-r--r--patches/gcc/linaro-4.9-2017.01/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch28
-rw-r--r--patches/gcc/linaro-4.9-2017.01/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch37
-rw-r--r--patches/gcc/linaro-4.9-2017.01/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/linaro-4.9-2017.01/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch104
-rw-r--r--patches/gcc/linaro-4.9-2017.01/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/linaro-4.9-2017.01/830-arm_unbreak_armv4t.patch13
-rw-r--r--patches/gcc/linaro-4.9-2017.01/840-microblaze-enable-dwarf-eh-support.patch166
-rw-r--r--patches/gcc/linaro-4.9-2017.01/850-libstdcxx-uclibc-c99.patch274
-rw-r--r--patches/gcc/linaro-4.9-2017.01/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/linaro-4.9-2017.01/870-xtensa-add-mauto-litpools-option.patch287
-rw-r--r--patches/gcc/linaro-4.9-2017.01/871-xtensa-reimplement-register-spilling.patch76
-rw-r--r--patches/gcc/linaro-4.9-2017.01/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch33
-rw-r--r--patches/gcc/linaro-4.9-2017.01/873-xtensa-fix-_Unwind_GetCFA.patch40
-rw-r--r--patches/gcc/linaro-4.9-2017.01/874-xtensa-add-uclinux-support.patch169
-rw-r--r--patches/gcc/linaro-4.9-2017.01/875-gcc-xtensa-fix-fprintf-format-specifiers.patch73
-rw-r--r--patches/gcc/linaro-4.9-2017.01/880-nios2_legitimize_address.patch49
-rw-r--r--patches/gcc/linaro-4.9-2017.01/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/linaro-4.9-2017.01/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/linaro-4.9-2017.01/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/linaro-4.9-2017.01/940-uclinux-enable-threads.patch20
-rw-r--r--patches/gcc/linaro-5.4-2017.05/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/linaro-5.4-2017.05/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/linaro-5.4-2017.05/110-xtensa-implement-trap-pattern.patch64
-rw-r--r--patches/gcc/linaro-5.4-2017.05/1100-msp430-string-literals.patch81
-rw-r--r--patches/gcc/linaro-5.4-2017.05/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch29
-rw-r--r--patches/gcc/linaro-5.4-2017.05/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/linaro-5.4-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--patches/gcc/linaro-5.4-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--patches/gcc/linaro-5.4-2017.05/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/linaro-5.4-2017.05/830-arm_unbreak_armv4t.patch15
-rw-r--r--patches/gcc/linaro-5.4-2017.05/840-microblaze-enable-dwarf-eh-support.patch166
-rw-r--r--patches/gcc/linaro-5.4-2017.05/850-libstdcxx-uclibc-c99.patch273
-rw-r--r--patches/gcc/linaro-5.4-2017.05/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/linaro-5.4-2017.05/870-xtensa-add-mauto-litpools-option.patch290
-rw-r--r--patches/gcc/linaro-5.4-2017.05/871-xtensa-reimplement-register-spilling.patch76
-rw-r--r--patches/gcc/linaro-5.4-2017.05/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch31
-rw-r--r--patches/gcc/linaro-5.4-2017.05/873-xtensa-fix-_Unwind_GetCFA.patch40
-rw-r--r--patches/gcc/linaro-5.4-2017.05/874-xtensa-add-uclinux-support.patch174
-rw-r--r--patches/gcc/linaro-5.4-2017.05/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch108
-rw-r--r--patches/gcc/linaro-5.4-2017.05/876-xtensa-fix-libgcc-build-with-text-section-literals.patch67
-rw-r--r--patches/gcc/linaro-5.4-2017.05/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch62
-rw-r--r--patches/gcc/linaro-5.4-2017.05/878-xtensa-Fix-PR-target-78603.patch35
-rw-r--r--patches/gcc/linaro-5.4-2017.05/879-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--patches/gcc/linaro-5.4-2017.05/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/linaro-5.4-2017.05/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/linaro-5.4-2017.05/892-microblaze-uclibc.patch24
-rw-r--r--patches/gcc/linaro-5.4-2017.05/902-unwind-fix-for-musl.patch36
-rw-r--r--patches/gcc/linaro-5.4-2017.05/910-nios2-bad-multilib-default.patch28
-rw-r--r--patches/gcc/linaro-5.4-2017.05/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/linaro-5.4-2017.05/940-uclinux-enable-threads.patch19
-rw-r--r--patches/gcc/linaro-6.3-2017.05/100-uclibc-conf.patch15
-rw-r--r--patches/gcc/linaro-6.3-2017.05/1000-libtool-leave-framework-alone.patch14
-rw-r--r--patches/gcc/linaro-6.3-2017.05/301-missing-execinfo_h.patch13
-rw-r--r--patches/gcc/linaro-6.3-2017.05/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch160
-rw-r--r--patches/gcc/linaro-6.3-2017.05/380-gcc-plugin-POSIX-include-sys-select-h.patch11
-rw-r--r--patches/gcc/linaro-6.3-2017.05/810-arm-softfloat-libgcc.patch30
-rw-r--r--patches/gcc/linaro-6.3-2017.05/830-arm_unbreak_armv4t.patch15
-rw-r--r--patches/gcc/linaro-6.3-2017.05/860-cilk-wchar.patch56
-rw-r--r--patches/gcc/linaro-6.3-2017.05/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch62
-rw-r--r--patches/gcc/linaro-6.3-2017.05/871-xtensa-Fix-PR-target-78118.patch318
-rw-r--r--patches/gcc/linaro-6.3-2017.05/872-xtensa-Fix-PR-target-78603.patch35
-rw-r--r--patches/gcc/linaro-6.3-2017.05/873-gcc-xtensa-fix-fprintf-format-specifiers.patch74
-rw-r--r--patches/gcc/linaro-6.3-2017.05/890-fix-m68k-compile.patch15
-rw-r--r--patches/gcc/linaro-6.3-2017.05/891-fix-m68k-uclinux.patch18
-rw-r--r--patches/gcc/linaro-6.3-2017.05/892-libgcc-mkmap-symver-support-skip_underscore.patch60
-rw-r--r--patches/gcc/linaro-6.3-2017.05/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch1944
-rw-r--r--patches/gcc/linaro-6.3-2017.05/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch59
-rw-r--r--patches/gcc/linaro-6.3-2017.05/895-bfin-define-REENTRANT.patch17
-rw-r--r--patches/gcc/linaro-6.3-2017.05/900-libgfortran-missing-include.patch10
-rw-r--r--patches/gcc/linaro-6.3-2017.05/910-nios2-bad-multilib-default.patch28
-rw-r--r--patches/gcc/linaro-6.3-2017.05/930-libgcc-disable-split-stack-nothreads.patch14
-rw-r--r--patches/gcc/linaro-6.3-2017.05/940-uclinux-enable-threads.patch19
-rw-r--r--patches/gcc/linaro-6.3-2017.05/951-bionic-ndk.patch58
-rw-r--r--patches/gcc/linaro-6.3-2017.05/952-bionic-errno.patch19
-rw-r--r--patches/gcc/linaro-6.3-2017.05/970-crystax.patch551
-rw-r--r--patches/gcc/linaro-6.3-2017.05/971-crystax.patch25
-rw-r--r--patches/gcc/linaro-6.3-2017.05/972-crystax.patch302
-rw-r--r--patches/gcc/linaro-6.3-2017.05/973-crystax.patch20
-rw-r--r--patches/gcc/linaro-6.3-2017.05/974-crystax.patch24
-rw-r--r--patches/gcc/linaro-6.3-2017.05/975-crystax.patch31
-rw-r--r--patches/gcc/linaro-6.3-2017.05/976-crystax.patch21
-rw-r--r--patches/gcc/linaro-6.3-2017.05/977-crystax.patch33
273 files changed, 0 insertions, 24321 deletions
diff --git a/patches/gcc/4.8.5/001_gcc_bug_62231.patch b/patches/gcc/4.8.5/001_gcc_bug_62231.patch
deleted file mode 100644
index e7c9cf9..0000000
--- a/patches/gcc/4.8.5/001_gcc_bug_62231.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-As-applied. From:
-
-https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html
-
-Linked from bug62231 comment 4 there
-
-diff -durN a/gcc/defaults.h b/gcc/defaults.h
---- a/gcc/defaults.h 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/defaults.h 2014-12-15 13:26:13.498904465 -0800
-@@ -438,6 +438,11 @@
- #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
- #endif
-
-+/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
-+#ifndef DWARF_REG_TO_UNWIND_COLUMN
-+#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
-+#endif
-+
- /* Map register numbers held in the call frame info that gcc has
- collected using DWARF_FRAME_REGNUM to those that should be output in
- .debug_frame and .eh_frame. */
-diff -durN a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
---- a/gcc/dwarf2cfi.c 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/dwarf2cfi.c 2014-12-15 13:50:24.554883694 -0800
-@@ -225,7 +225,44 @@
- emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
- }
-
--/* Generate code to initialize the register size table. */
-+/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
-+ initialize the dwarf register size table entry corresponding to register
-+ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode
-+ to use for the size entry to initialize, and WROTE_RETURN_COLUMN needs to
-+ be set to true if the dwarf register number for REGNO is the dwarf return
-+ column number. */
-+
-+static
-+void init_one_dwarf_reg_size (int regno, enum machine_mode regmode,
-+ rtx table, enum machine_mode slotmode,
-+ bool *wrote_return_column)
-+{
-+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
-+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
-+ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
-+
-+ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
-+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
-+
-+ if (rnum >= DWARF_FRAME_REGISTERS)
-+ return;
-+
-+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
-+ {
-+ if (regmode == VOIDmode)
-+ return;
-+ *wrote_return_column = true;
-+ }
-+
-+ if (slotoffset < 0)
-+ return;
-+
-+ emit_move_insn (adjust_address (table, slotmode, slotoffset),
-+ gen_int_mode (regsize, slotmode));
-+}
-+
-+/* Generate code to initialize the dwarf register size table located
-+ at the provided ADDRESS. */
-
- void
- expand_builtin_init_dwarf_reg_sizes (tree address)
-@@ -238,30 +275,21 @@
-
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- {
-- unsigned int dnum = DWARF_FRAME_REGNUM (i);
-- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
--
-- if (rnum < DWARF_FRAME_REGISTERS)
-- {
-- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
-- enum machine_mode save_mode = reg_raw_mode[i];
-- HOST_WIDE_INT size;
--
-- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
-- save_mode = choose_hard_reg_mode (i, 1, true);
-- if (dnum == DWARF_FRAME_RETURN_COLUMN)
-- {
-- if (save_mode == VOIDmode)
-- continue;
-- wrote_return_column = true;
-- }
-- size = GET_MODE_SIZE (save_mode);
-- if (offset < 0)
-- continue;
-+ enum machine_mode save_mode = reg_raw_mode[i];
-+ rtx span;
-
-- emit_move_insn (adjust_address (mem, mode, offset),
-- gen_int_mode (size, mode));
-- }
-+ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
-+ if (!span)
-+ init_one_dwarf_reg_size (i, save_mode, mem, mode, &wrote_return_column);
-+ else
-+ {
-+ for (int si = 0; si < XVECLEN (span, 0); si++)
-+ {
-+ rtx reg = XVECEXP (span, 0, si);
-+ init_one_dwarf_reg_size
-+ (REGNO (reg), GET_MODE (reg), mem, mode, &wrote_return_column);
-+ }
-+ }
- }
-
- if (!wrote_return_column)
-diff -durN a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
---- a/libgcc/unwind-dw2.c 2013-05-31 16:21:46.000000000 -0700
-+++ b/libgcc/unwind-dw2.c 2014-12-15 13:26:13.570904866 -0800
-@@ -55,10 +55,6 @@
- #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
- #endif
-
--#ifndef DWARF_REG_TO_UNWIND_COLUMN
--#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
--#endif
--
- /* ??? For the public function interfaces, we tend to gcc_assert that the
- column numbers are in range. For the dwarf2 unwind info this does happen,
- although so far in a case that doesn't actually matter.
diff --git a/patches/gcc/4.8.5/002_gcc_bug_62231.patch b/patches/gcc/4.8.5/002_gcc_bug_62231.patch
deleted file mode 100644
index b970ebc..0000000
--- a/patches/gcc/4.8.5/002_gcc_bug_62231.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-As-applied. From:
-
-https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02605.html
-
-Linked from bug62231 comment 4 there
-
-diff -durN a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
---- a/gcc/config/rs6000/rs6000.c 2014-12-08 17:29:04.000000000 -0800
-+++ b/gcc/config/rs6000/rs6000.c 2014-12-15 14:44:46.568801843 -0800
-@@ -1673,7 +1673,7 @@
- SCmode so as to pass the value correctly in a pair of
- registers. */
- else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
-- && !DECIMAL_FLOAT_MODE_P (mode))
-+ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
- reg_size = UNITS_PER_FP_WORD;
-
- else
diff --git a/patches/gcc/4.8.5/100-uclibc-conf.patch b/patches/gcc/4.8.5/100-uclibc-conf.patch
deleted file mode 100644
index d56bf0a..0000000
--- a/patches/gcc/4.8.5/100-uclibc-conf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: gcc-4.8.0/contrib/regression/objs-gcc.sh
-===================================================================
---- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200
-+++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100
-@@ -106,6 +106,10 @@
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
diff --git a/patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch b/patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch
deleted file mode 100644
index 525592e..0000000
--- a/patches/gcc/4.8.5/1000-libtool-leave-framework-alone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-4.9.4/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
-+++ gcc-4.9.4/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
-@@ -36,6 +36,11 @@
- for arg
- do
- case $arg in
-+ -framework)
-+ # libtool handles this option. It should not be prefixed with
-+ # -Xcompiler, as that would split it from the argument that
-+ # follows.
-+ ;;
- -f*|--*)
- # Libtool does not ascribe any special meaning options
- # that begin with -f or with a double-dash. So, it will
diff --git a/patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional b/patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional
deleted file mode 100644
index b7094fe..0000000
--- a/patches/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional
+++ /dev/null
@@ -1,122 +0,0 @@
-http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
-
-On glibc the libc.so carries a copy of the math function copysignl() but
-on uClibc math functions like copysignl() live in libm. Since libgcc_s
-contains unresolved symbols, any attempt to link against libgcc_s
-without explicitely specifying -lm fails, resulting in a broken
-bootstrap of the compiler.
-
-Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
-
----
- libgcc/Makefile.in | 4 +++-
- libgcc/configure | 32 ++++++++++++++++++++++++++++++++
- libgcc/configure.ac | 21 +++++++++++++++++++++
- 3 files changed, 56 insertions(+), 1 deletion(-)
-
-Index: gcc-4.8.0/libgcc/Makefile.in
-===================================================================
---- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100
-+++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100
-@@ -41,6 +41,7 @@
- decimal_float = @decimal_float@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
-+LIBGCC_LIBM = @LIBGCC_LIBM@
-
- host_noncanonical = @host_noncanonical@
- target_noncanonical = @target_noncanonical@
-@@ -927,9 +928,10 @@
- @multilib_dir@,$(MULTIDIR),$(subst \
- @shlib_objs@,$(objects) libgcc.a,$(subst \
- @shlib_base_name@,libgcc_s,$(subst \
-+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
- @shlib_map_file@,$(mapfile),$(subst \
- @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
-- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
-+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
-
- libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
- # @multilib_flags@ is still needed because this may use
-Index: gcc-4.8.0/libgcc/configure
-===================================================================
---- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100
-+++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100
-@@ -564,6 +564,7 @@
- tmake_file
- sfp_machine_header
- set_use_emutls
-+LIBGCC_LIBM
- set_have_cc_tls
- vis_hide
- fixed_point
-@@ -4481,6 +4482,37 @@
- fi
- fi
-
-+# On powerpc libgcc_s references copysignl which is a libm function but
-+# glibc apparently also provides it via libc as opposed to uClibc where
-+# it lives in libm.
-+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
-+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
-+if test "${libgcc_cv_copysignl_lib+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ echo '#include <features.h>' > conftest.c
-+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
-+ libgcc_cv_copysignl_lib="-lc"
-+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }
-+ then
-+ libgcc_cv_copysignl_lib="-lm"
-+ fi
-+ rm -f conftest.*
-+
-+fi
-+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
-+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
-+
-+case /${libgcc_cv_copysignl_lib}/ in
-+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
-+ *) LIBGCC_LIBM= ;;
-+esac
-
- # Conditionalize the makefile for this target machine.
- tmake_file_=
-Index: gcc-4.8.0/libgcc/configure.ac
-===================================================================
---- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200
-+++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100
-@@ -326,6 +326,27 @@
- fi
- AC_SUBST(set_have_cc_tls)
-
-+# On powerpc libgcc_s references copysignl which is a libm function but
-+# glibc apparently also provides it via libc as opposed to uClibc where
-+# it lives in libm.
-+AC_CACHE_CHECK
-+ libgcc_cv_copysignl_lib,
-+ echo '#include <features.h>' > conftest.c
-+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
-+ libgcc_cv_copysignl_lib="-lc"
-+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
-+ then
-+ libgcc_cv_copysignl_lib="-lm"
-+ fi
-+ rm -f conftest.*
-+ ])
-+
-+case /${libgcc_cv_copysignl_lib}/ in
-+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
-+ *) LIBGCC_LIBM= ;;
-+esac
-+AC_SUBST(LIBGCC_LIBM)
-+
- # See if we have emulated thread-local storage.
- GCC_CHECK_EMUTLS
- set_use_emutls=
diff --git a/patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch b/patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/patches/gcc/4.8.5/111-alpha-bad-eh_frame.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
-
-diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha
-index 0b6ffb1..0c2f840 100644
---- a/libgcc/config/alpha/t-alpha
-+++ b/libgcc/config/alpha/t-alpha
-@@ -1,2 +1,6 @@
- # This is a support routine for longlong.h, used by libgcc2.c.
- LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
-+
-+# When GAS-generated unwind tables are created, they get created
-+# after the __FRAME_END__ terminator, which causes an ld error.
-+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
diff --git a/patches/gcc/4.8.5/111-pr65730.patch b/patches/gcc/4.8.5/111-pr65730.patch
deleted file mode 100644
index f195e30..0000000
--- a/patches/gcc/4.8.5/111-pr65730.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 10 Apr 2015 17:46:30 +0300
-Subject: [PATCH] Fix PR target/65730
-
-2015-05-20 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (init_alignment_context): Replace MULT
- by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT).
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452
-Changes to ChangeLog are dropped.
-
- gcc/config/xtensa/xtensa.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index eb039ba..7296e36 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem)
- if (ac->shift != NULL_RTX)
- {
- /* Shift is the byte count, but we need the bitcount. */
-- ac->shift = expand_simple_binop (SImode, MULT, ac->shift,
-- GEN_INT (BITS_PER_UNIT),
-+ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0);
-+ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift,
-+ GEN_INT (exact_log2 (BITS_PER_UNIT)),
- NULL_RTX, 1, OPTAB_DIRECT);
- ac->modemask = expand_simple_binop (SImode, ASHIFT,
- GEN_INT (GET_MODE_MASK (mode)),
---
-1.8.1.4
-
diff --git a/patches/gcc/4.8.5/130-pr43538.patch b/patches/gcc/4.8.5/130-pr43538.patch
deleted file mode 100644
index 19e57bb..0000000
--- a/patches/gcc/4.8.5/130-pr43538.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001
-From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 25 Apr 2014 08:03:08 +0000
-Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
-
- PR target/43538
- * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- config/mt-gnu | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/mt-gnu b/config/mt-gnu
-index 15bf417..5c696f5 100644
---- a/config/mt-gnu
-+++ b/config/mt-gnu
-@@ -1 +1 @@
--CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
-+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
---
-2.1.4
-
diff --git a/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 1c49fb0..0000000
--- a/patches/gcc/4.8.5/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 18 Nov 2014 22:12:52 +0000
-Subject: [PATCH] 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
-
- * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
- overwriting.
- (CXXFLAGS_FOR_TARGET): Similarly.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- config/mt-ospace | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/config/mt-ospace b/config/mt-ospace
-index 7f09104..ce29ff4 100644
---- a/config/mt-ospace
-+++ b/config/mt-ospace
-@@ -1,3 +1,3 @@
- # Build libraries optimizing for space, not speed.
-- CFLAGS_FOR_TARGET = -g -Os
-- CXXFLAGS_FOR_TARGET = -g -Os
-+ CFLAGS_FOR_TARGET += -g -Os
-+ CXXFLAGS_FOR_TARGET += -g -Os
---
-2.1.4
-
diff --git a/patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch b/patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch
deleted file mode 100644
index ac1d846..0000000
--- a/patches/gcc/4.8.5/132-build_gcc-5_with_gcc-6.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
-From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 25 Feb 2016 15:33:50 +0000
-Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- Backported from mainline
- 2016-02-19 Jakub Jelinek <jakub@redhat.com>
- Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * Make-lang.in: Invoke gperf with -L C++.
- * cfns.gperf: Remove prototypes for hash and libc_name_p
- inlines.
- * cfns.h: Regenerated.
- * except.c (nothrow_libfn_p): Adjust.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
-diff -urpN a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
---- a/gcc/cp/cfns.gperf 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/cp/cfns.gperf 2016-12-05 13:55:20.331616274 -0800
-@@ -1,3 +1,5 @@
-+%language=C++
-+%define class-name libc_name
- %{
- /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-@@ -16,14 +18,6 @@ for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
--#ifdef __GNUC__
--__inline
--#endif
--static unsigned int hash (const char *, unsigned int);
--#ifdef __GNUC__
--__inline
--#endif
--const char * libc_name_p (const char *, unsigned int);
- %}
- %%
- # The standard C library functions, for feeding to gperf; the result is used
-diff -urpN a/gcc/cp/cfns.h b/gcc/cp/cfns.h
---- a/gcc/cp/cfns.h 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/cp/cfns.h 2016-12-05 13:55:20.331616274 -0800
-@@ -1,5 +1,5 @@
--/* ANSI-C code produced by gperf version 3.0.3 */
--/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
-+/* C++ code produced by gperf version 3.0.4 */
-+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
-
- #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-@@ -28,7 +28,7 @@
- #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
- #endif
-
--#line 1 "cfns.gperf"
-+#line 3 "cfns.gperf"
-
- /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-@@ -47,25 +47,18 @@ for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
--#ifdef __GNUC__
--__inline
--#endif
--static unsigned int hash (const char *, unsigned int);
--#ifdef __GNUC__
--__inline
--#endif
--const char * libc_name_p (const char *, unsigned int);
- /* maximum key range = 391, duplicates = 0 */
-
--#ifdef __GNUC__
--__inline
--#else
--#ifdef __cplusplus
--inline
--#endif
--#endif
--static unsigned int
--hash (register const char *str, register unsigned int len)
-+class libc_name
-+{
-+private:
-+ static inline unsigned int hash (const char *str, unsigned int len);
-+public:
-+ static const char *libc_name_p (const char *str, unsigned int len);
-+};
-+
-+inline unsigned int
-+libc_name::hash (register const char *str, register unsigned int len)
- {
- static const unsigned short asso_values[] =
- {
-@@ -122,14 +115,8 @@ hash (register const char *str, register
- return hval + asso_values[(unsigned char)str[len - 1]];
- }
-
--#ifdef __GNUC__
--__inline
--#ifdef __GNUC_STDC_INLINE__
--__attribute__ ((__gnu_inline__))
--#endif
--#endif
- const char *
--libc_name_p (register const char *str, register unsigned int len)
-+libc_name::libc_name_p (register const char *str, register unsigned int len)
- {
- enum
- {
-diff -urpN a/gcc/cp/except.c b/gcc/cp/except.c
---- a/gcc/cp/except.c 2013-10-25 06:49:48.000000000 -0700
-+++ b/gcc/cp/except.c 2016-12-05 13:55:20.331616274 -0800
-@@ -1025,7 +1025,8 @@ nothrow_libfn_p (const_tree fn)
- unless the system headers are playing rename tricks, and if
- they are, we don't want to be confused by them. */
- id = DECL_NAME (fn);
-- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
-+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
-+ IDENTIFIER_LENGTH (id));
- }
-
- /* Returns nonzero if an exception of type FROM will be caught by a
-diff -urpN a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
---- a/gcc/cp/Make-lang.in 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/cp/Make-lang.in 2016-12-05 13:55:20.331616274 -0800
-@@ -115,7 +115,7 @@ else
- # deleting the $(srcdir)/cp/cfns.h file.
- $(srcdir)/cp/cfns.h:
- endif
-- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
-+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
- $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
-
- #
diff --git a/patches/gcc/4.8.5/301-missing-execinfo_h.patch b/patches/gcc/4.8.5/301-missing-execinfo_h.patch
deleted file mode 100644
index 00efda2..0000000
--- a/patches/gcc/4.8.5/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: gcc-4.8.0/boehm-gc/include/gc.h
-===================================================================
---- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
-+++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch b/patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch
deleted file mode 100644
index 35d5f50..0000000
--- a/patches/gcc/4.8.5/305-libmudflap-susv3-legacy.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Index: gcc-4.8.0/libmudflap/mf-hooks2.c
-===================================================================
---- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100
-+++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100
-@@ -424,7 +424,7 @@
- {
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
-- bzero (s, n);
-+ memset (s, 0, n);
- }
-
-
-@@ -434,7 +434,7 @@
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
- MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
-- bcopy (src, dest, n);
-+ memmove (dest, src, n);
- }
-
-
-@@ -444,7 +444,7 @@
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
- MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
-- return bcmp (s1, s2, n);
-+ return n == 0 ? 0 : memcmp (s1, s2, n);
- }
-
-
-@@ -453,7 +453,7 @@
- size_t n = strlen (s);
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
-- return index (s, c);
-+ return strchr (s, c);
- }
-
-
-@@ -462,7 +462,7 @@
- size_t n = strlen (s);
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
-- return rindex (s, c);
-+ return strrchr (s, c);
- }
-
- /* XXX: stpcpy, memccpy */
diff --git a/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
deleted file mode 100644
index 3cf66b2..0000000
--- a/patches/gcc/4.8.5/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff -urpN '--exclude=autom4te.cache' gcc-4.8.5.orig/gcc/configure gcc-4.8.5/gcc/configure
---- gcc-4.8.5.orig/gcc/configure 2014-12-08 03:29:43.000000000 -0800
-+++ gcc-4.8.5/gcc/configure 2017-02-11 16:57:27.424807994 -0800
-@@ -27364,6 +27364,9 @@ fi
-
-
- pluginlibs=
-+PICFLAG="-fPIC"
-+UNDEFINEDPREAMBLE="extern int X;"
-+UNDEFINEDCODE="return X == 0;"
-
- case "${host}" in
- *-*-darwin*)
-@@ -27375,6 +27378,11 @@ case "${host}" in
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -27487,23 +27495,23 @@ fi
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
-diff -urpN '--exclude=autom4te.cache' gcc-4.8.5.orig/gcc/configure.ac gcc-4.8.5/gcc/configure.ac
---- gcc-4.8.5.orig/gcc/configure.ac 2014-12-08 03:29:43.000000000 -0800
-+++ gcc-4.8.5/gcc/configure.ac 2017-02-11 16:57:27.424807994 -0800
-@@ -5243,6 +5243,9 @@ enable_plugin=$enableval,
- enable_plugin=yes; default_plugin=yes)
-
- pluginlibs=
-+PICFLAG="-fPIC"
-+UNDEFINEDPREAMBLE="extern int X;"
-+UNDEFINEDCODE="return X == 0;"
-
- case "${host}" in
- *-*-darwin*)
-@@ -5254,6 +5257,11 @@ case "${host}" in
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -5305,17 +5313,17 @@ if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- AC_MSG_CHECKING([for -fPIC -shared])
-+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
- AC_TRY_LINK(
-- [extern int X;],[return X == 0;],
-+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
- [AC_MSG_RESULT([yes]); have_pic_shared=yes],
- [AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
diff --git a/patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch b/patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch
deleted file mode 100644
index c8cb377..0000000
--- a/patches/gcc/4.8.5/810-arm-softfloat-libgcc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: gcc-4.8.0/gcc/config/arm/linux-elf.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100
-+++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100
-@@ -55,7 +55,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-Index: gcc-4.8.0/libgcc/config/arm/t-linux
-===================================================================
---- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100
-+++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100
-@@ -1,6 +1,11 @@
- LIB1ASMSRC = arm/lib1funcs.S
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
-+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
-+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
-+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
-+ _arm_fixsfsi _arm_fixunssfsi
-
- # Just for these, we omit the frame pointer since it makes such a big
- # difference.
diff --git a/patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch b/patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch
deleted file mode 100644
index 37f8f2a..0000000
--- a/patches/gcc/4.8.5/830-arm_unbreak_armv4t.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
-
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
- The ARM10TDMI core is the default for armv5t, so set
- SUBTARGET_CPU_DEFAULT to achieve this. */
- #undef SUBTARGET_CPU_DEFAULT
--#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
-
- /* TARGET_BIG_ENDIAN_DEFAULT is set in
- config.gcc for big endian configurations. */
diff --git a/patches/gcc/4.8.5/841-PR57717-E500v2.patch b/patches/gcc/4.8.5/841-PR57717-E500v2.patch
deleted file mode 100644
index a011e24..0000000
--- a/patches/gcc/4.8.5/841-PR57717-E500v2.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717
-
-Upstream-Status: Backport
-Signed-off-by: Julian Brown <Julian_Brown@mentor.com>
-[Gustavo: Update for gcc 4.8.3]
-
-fix for PR57717 (PowerPC E500v2)
-http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html
-
-diff -Nura gcc-4.8.3/gcc/config/rs6000/rs6000.c gcc-4.8.3-pr57717/gcc/config/rs6000/rs6000.c
---- gcc-4.8.3/gcc/config/rs6000/rs6000.c 2014-05-04 23:18:35.000000000 -0300
-+++ gcc-4.8.3-pr57717/gcc/config/rs6000/rs6000.c 2014-05-22 15:20:12.554270919 -0300
-@@ -7343,9 +7343,7 @@
- && GET_CODE (XEXP (x, 1)) == CONST_INT
- && reg_offset_p
- && !SPE_VECTOR_MODE (mode)
-- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode
-- || mode == DDmode || mode == TDmode
-- || mode == DImode))
-+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD)
- && (!VECTOR_MODE_P (mode) || VECTOR_MEM_NONE_P (mode)))
- {
- HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
diff --git a/patches/gcc/4.8.5/842-PR60155.patch b/patches/gcc/4.8.5/842-PR60155.patch
deleted file mode 100644
index 7bc2122..0000000
--- a/patches/gcc/4.8.5/842-PR60155.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
-Upstream status: in trunk.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
---- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726
-+++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134
-@@ -2502,6 +2502,65 @@
- }
- }
-
-+struct set_data
-+{
-+ rtx insn;
-+ const_rtx set;
-+ int nsets;
-+};
-+
-+/* Increment number of sets and record set in DATA. */
-+
-+static void
-+record_set_data (rtx dest, const_rtx set, void *data)
-+{
-+ struct set_data *s = (struct set_data *)data;
-+
-+ if (GET_CODE (set) == SET)
-+ {
-+ /* We allow insns having multiple sets, where all but one are
-+ dead as single set insns. In the common case only a single
-+ set is present, so we want to avoid checking for REG_UNUSED
-+ notes unless necessary. */
-+ if (s->nsets == 1
-+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
-+ && !side_effects_p (s->set))
-+ s->nsets = 0;
-+
-+ if (!s->nsets)
-+ {
-+ /* Record this set. */
-+ s->nsets += 1;
-+ s->set = set;
-+ }
-+ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
-+ || side_effects_p (set))
-+ s->nsets += 1;
-+ }
-+}
-+
-+static const_rtx
-+single_set_gcse (rtx insn)
-+{
-+ struct set_data s;
-+ rtx pattern;
-+
-+ gcc_assert (INSN_P (insn));
-+
-+ /* Optimize common case. */
-+ pattern = PATTERN (insn);
-+ if (GET_CODE (pattern) == SET)
-+ return pattern;
-+
-+ s.insn = insn;
-+ s.nsets = 0;
-+ note_stores (pattern, record_set_data, &s);
-+
-+ /* Considered invariant insns have exactly one set. */
-+ gcc_assert (s.nsets == 1);
-+ return s.set;
-+}
-+
- /* Emit move from SRC to DEST noting the equivalence with expression computed
- in INSN. */
-
-@@ -2509,7 +2568,8 @@
- gcse_emit_move_after (rtx dest, rtx src, rtx insn)
- {
- rtx new_rtx;
-- rtx set = single_set (insn), set2;
-+ const_rtx set = single_set_gcse (insn);
-+ rtx set2;
- rtx note;
- rtx eqv = NULL_RTX;
-
-@@ -3369,13 +3429,12 @@
- FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
- {
- rtx insn;
-- rtx set;
-+ const_rtx set;
-
- gcc_assert (!occr->deleted_p);
-
- insn = occr->insn;
-- set = single_set (insn);
-- gcc_assert (set);
-+ set = single_set_gcse (insn);
-
- /* Create a pseudo-reg to store the result of reaching
- expressions into. Get the mode for the new pseudo
-@@ -3456,10 +3515,8 @@
- {
- rtx reg;
- enum reg_class pressure_class;
-- rtx set = single_set (insn);
-+ const_rtx set = single_set_gcse (insn);
-
-- /* Considered invariant insns have only one set. */
-- gcc_assert (set != NULL_RTX);
- reg = SET_DEST (set);
- if (GET_CODE (reg) == SUBREG)
- reg = SUBREG_REG (reg);
diff --git a/patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch b/patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch
deleted file mode 100644
index afa650c..0000000
--- a/patches/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 845478644ba54a6947e9b224f2e5cd342e8257a9 Mon Sep 17 00:00:00 2001
-From: Andrew Hsieh <andrewhsieh@google.com>
-Date: Wed, 25 Jun 2014 22:13:48 -0700
-Subject: [PATCH] Fix a typo in vmlaq_lane_s32
-
-BUG=15526898
-
-Change-Id: I4e35a764d369d378808dab29beefe34d1f93249b
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
-
-diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
-index 73c7e7d..92b0119 100644
---- a/gcc/config/aarch64/arm_neon.h
-+++ b/gcc/config/aarch64/arm_neon.h
-@@ -9984,7 +9984,7 @@
- #define vmlaq_lane_s32(a, b, c, d) \
- __extension__ \
- ({ \
-- int32x4_t c_ = (c); \
-+ int32x2_t c_ = (c); \
- int32x4_t b_ = (b); \
- int32x4_t a_ = (a); \
- int32x4_t result; \
diff --git a/patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch b/patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch
deleted file mode 100644
index 792976f..0000000
--- a/patches/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-Allow C99-depending features of libstdc++ with uClibc
-
-The libstdc++ code is fairly restrictive on how it checks for C99
-compatibility: it requires *complete* C99 support to enable certain
-features. For example, uClibc provides a good number of C99 features,
-but not C99 complex number support. For this reason, libstdc++
-completely disables many the standard C++ methods that can in fact
-work because uClibc provides the necessary functions.
-
-This patch is similar and highly inspired from
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
-a way that doesn't involve changing the configure.ac script, as
-autoreconfiguring gcc is complicated. It simply relies on the fact
-that uClibc defines the __UCLIBC__ definition.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/libstdc++-v3/config/locale/generic/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -70,7 +70,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/config/locale/gnu/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/gnu/c_locale.h
-+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
-@@ -88,7 +88,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/include/bits/basic_string.h
-===================================================================
---- a/libstdc++-v3/include/bits/basic_string.h
-+++ b/libstdc++-v3/include/bits/basic_string.h
-@@ -2809,7 +2809,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
-+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \
- && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
-
- #include <ext/string_conversions.h>
-Index: b/libstdc++-v3/include/bits/locale_facets.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets.tcc
-@@ -987,7 +987,7 @@
- char __fbuf[16];
- __num_base::_S_format_float(__io, __fbuf, __mod);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- // First try a buffer perhaps big enough (most probably sufficient
- // for non-ios_base::fixed outputs)
- int __cs_size = __max_digits * 3;
-Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-@@ -572,7 +572,7 @@
- {
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- // First try a buffer perhaps big enough.
- int __cs_size = 64;
- char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
-Index: b/libstdc++-v3/include/c_compatibility/math.h
-===================================================================
---- a/libstdc++-v3/include/c_compatibility/math.h
-+++ b/libstdc++-v3/include/c_compatibility/math.h
-@@ -56,7 +56,7 @@
- using std::floor;
- using std::fmod;
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::fpclassify;
- using std::isfinite;
- using std::isinf;
-Index: b/libstdc++-v3/include/c_compatibility/wchar.h
-===================================================================
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -103,7 +103,7 @@
- using std::wmemset;
- using std::wcsftime;
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/c_global/cstdlib
-===================================================================
---- a/libstdc++-v3/include/c_global/cstdlib
-+++ b/libstdc++-v3/include/c_global/cstdlib
-@@ -182,7 +182,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef _Exit
- #undef llabs
-Index: b/libstdc++-v3/include/c_global/cwchar
-===================================================================
---- a/libstdc++-v3/include/c_global/cwchar
-+++ b/libstdc++-v3/include/c_global/cwchar
-@@ -232,7 +232,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef wcstold
- #undef wcstoll
-@@ -289,7 +289,7 @@
- using std::vwscanf;
- #endif
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/c_std/cstdio
-===================================================================
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -139,7 +139,7 @@
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
-Index: b/libstdc++-v3/include/c_std/cstdlib
-===================================================================
---- a/libstdc++-v3/include/c_std/cstdlib
-+++ b/libstdc++-v3/include/c_std/cstdlib
-@@ -180,7 +180,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef _Exit
- #undef llabs
-Index: b/libstdc++-v3/include/c_std/cwchar
-===================================================================
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -228,7 +228,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef wcstold
- #undef wcstoll
-Index: b/libstdc++-v3/include/ext/vstring.h
-===================================================================
---- a/libstdc++-v3/include/ext/vstring.h
-+++ b/libstdc++-v3/include/ext/vstring.h
-@@ -2571,7 +2571,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
-+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
-
- #include <ext/string_conversions.h>
-
-Index: b/libstdc++-v3/include/tr1/cstdio
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdio
-+++ b/libstdc++-v3/include/tr1/cstdio
-@@ -33,7 +33,7 @@
-
- #include <cstdio>
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-Index: b/libstdc++-v3/include/tr1/cstdlib
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdlib
-+++ b/libstdc++-v3/include/tr1/cstdlib
-@@ -35,7 +35,7 @@
-
- #if _GLIBCXX_HOSTED
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-Index: b/libstdc++-v3/include/tr1/cwchar
-===================================================================
---- a/libstdc++-v3/include/tr1/cwchar
-+++ b/libstdc++-v3/include/tr1/cwchar
-@@ -52,7 +52,7 @@
- using std::vwscanf;
- #endif
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/tr1/stdlib.h
-===================================================================
---- a/libstdc++-v3/include/tr1/stdlib.h
-+++ b/libstdc++-v3/include/tr1/stdlib.h
-@@ -33,7 +33,7 @@
-
- #if _GLIBCXX_HOSTED
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- using std::tr1::atoll;
- using std::tr1::strtoll;
-Index: b/libstdc++-v3/src/c++11/debug.cc
-===================================================================
---- a/libstdc++-v3/src/c++11/debug.cc
-+++ b/libstdc++-v3/src/c++11/debug.cc
-@@ -787,7 +787,7 @@
- int __n __attribute__ ((__unused__)),
- const char* __fmt, _Tp __s) const throw ()
- {
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- std::snprintf(__buf, __n, __fmt, __s);
- #else
- std::sprintf(__buf, __fmt, __s);
-Index: b/libstdc++-v3/include/c_global/cstdio
-===================================================================
---- a/libstdc++-v3/include/c_global/cstdio
-+++ b/libstdc++-v3/include/c_global/cstdio
-@@ -139,7 +139,7 @@
- using ::vsprintf;
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
diff --git a/patches/gcc/4.8.5/851-PR-other-56780.patch b/patches/gcc/4.8.5/851-PR-other-56780.patch
deleted file mode 100644
index feb4339..0000000
--- a/patches/gcc/4.8.5/851-PR-other-56780.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001
-From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 1 Jun 2013 00:20:49 +0000
-Subject: [PATCH] PR other/56780
-
-* libiberty/configure.ac: Move test for --enable-install-libiberty
-outside of the 'with_target_subdir' test so that it actually gets
-run. Add output messages to show the test result.
-* libiberty/configure: Regenerate.
-* libiberty/Makefile.in (install_to_libdir): Place the
-installation of the libiberty library in the same guard as that
-used for the headers to prevent it being installed unless
-requested via --enable-install-libiberty.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4
-
-libiberty: fix --enable-install-libiberty flag [PR 56780]
-
-Commit 199570 fixed the --disable-install-libiberty behavior, but it also
-added a bug where the enable path never works because the initial clear
-of target_header_dir wasn't deleted. So we end up initializing properly
-at the top only to reset it at the end all the time.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4
-
-[Romain
- squash the two upstream commits
- Remove the ChangeLog]
-Signed-off-by: Romain Naour <romain.naour@openwide.fr>
----
- libiberty/Makefile.in | 24 ++++++++++-----------
- libiberty/configure | 57 +++++++++++++++++++++++++++-----------------------
- libiberty/configure.ac | 47 ++++++++++++++++++++++-------------------
- 3 files changed, 68 insertions(+), 60 deletions(-)
-
-diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index f6a3ebd..75ff82d 100644
---- a/libiberty/Makefile.in
-+++ b/libiberty/Makefile.in
-@@ -355,19 +355,19 @@ install-strip: install
- # since it will be passed the multilib flags.
- MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
- install_to_libdir: all
-- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
-- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
-- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
-- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
- if test -n "${target_header_dir}"; then \
-- case "${target_header_dir}" in \
-- /*) thd=${target_header_dir};; \
-- *) thd=${includedir}/${target_header_dir};; \
-- esac; \
-- ${mkinstalldirs} $(DESTDIR)$${thd}; \
-- for h in ${INSTALLED_HEADERS}; do \
-- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
-- done; \
-+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
-+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
-+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
-+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
-+ case "${target_header_dir}" in \
-+ /*) thd=${target_header_dir};; \
-+ *) thd=${includedir}/${target_header_dir};; \
-+ esac; \
-+ ${mkinstalldirs} $(DESTDIR)$${thd}; \
-+ for h in ${INSTALLED_HEADERS}; do \
-+ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
-+ done; \
- fi
- @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-
-diff --git a/libiberty/configure b/libiberty/configure
-index 5367027..4feb95a 100755
---- a/libiberty/configure
-+++ b/libiberty/configure
-@@ -675,8 +675,8 @@ with_cross_host
- with_newlib
- enable_maintainer_mode
- enable_multilib
--enable_largefile
- enable_install_libiberty
-+enable_largefile
- '
- ac_precious_vars='build_alias
- host_alias
-@@ -1303,8 +1303,8 @@ Optional Features:
- enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --enable-multilib build many library versions (default)
-+ --enable-install-libiberty Install headers and library for end users
- --disable-largefile omit support for large files
-- --enable-install-libiberty Install headers for end users
-
- Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \
- cross_compiling=maybe
- fi
-
-+# We may wish to install the target headers somewhere.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5
-+$as_echo_n "checking whether to install libiberty headers and static library... " >&6; }
-+
-+# Check whether --enable-install-libiberty was given.
-+if test "${enable_install_libiberty+set}" = set; then :
-+ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
-+else
-+ enable_install_libiberty=no
-+fi
-+
-+# Option parsed, now set things appropriately.
-+case x"$enable_install_libiberty" in
-+ xyes|x)
-+ target_header_dir=libiberty
-+ ;;
-+ xno)
-+ target_header_dir=
-+ ;;
-+ *)
-+ # This could be sanity-checked in various ways...
-+ target_header_dir="${enable_install_libiberty}"
-+ ;;
-+esac
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5
-+$as_echo "$enable_install_libiberty" >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5
-+$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;}
-+
-
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
-@@ -5476,7 +5505,6 @@ fi
-
- setobjs=
- CHECK=
--target_header_dir=
- if test -n "${with_target_subdir}"; then
-
- # We are being configured as a target library. AC_REPLACE_FUNCS
-@@ -5759,29 +5787,6 @@ _ACEOF
-
- esac
-
-- # We may wish to install the target headers somewhere.
-- # Check whether --enable-install-libiberty was given.
--if test "${enable_install_libiberty+set}" = set; then :
-- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval
--else
-- enable_install_libiberty=no
--fi
--
-- # Option parsed, now set things appropriately.
-- case x"$enable_install_libiberty" in
-- xyes|x)
-- target_header_dir=libiberty
-- ;;
-- xno)
-- target_header_dir=
-- ;;
-- *)
-- # This could be sanity-checked in various ways...
-- target_header_dir="${enable_install_libiberty}"
-- ;;
-- esac
--
--
- else
-
- # Not a target library, so we set things up to run the test suite.
-diff --git a/libiberty/configure.ac b/libiberty/configure.ac
-index c763894..f17e6b6 100644
---- a/libiberty/configure.ac
-+++ b/libiberty/configure.ac
-@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \
- cross_compiling=maybe
- fi
-
-+# We may wish to install the target headers somewhere.
-+AC_MSG_CHECKING([whether to install libiberty headers and static library])
-+dnl install-libiberty is disabled by default
-+
-+AC_ARG_ENABLE(install-libiberty,
-+[ --enable-install-libiberty Install headers and library for end users],
-+enable_install_libiberty=$enableval,
-+enable_install_libiberty=no)dnl
-+
-+# Option parsed, now set things appropriately.
-+case x"$enable_install_libiberty" in
-+ xyes|x)
-+ target_header_dir=libiberty
-+ ;;
-+ xno)
-+ target_header_dir=
-+ ;;
-+ *)
-+ # This could be sanity-checked in various ways...
-+ target_header_dir="${enable_install_libiberty}"
-+ ;;
-+esac
-+AC_MSG_RESULT($enable_install_libiberty)
-+AC_MSG_NOTICE([target_header_dir = $target_header_dir])
-+
- GCC_NO_EXECUTABLES
- AC_PROG_CC
- AC_SYS_LARGEFILE
-@@ -380,7 +405,6 @@ fi
-
- setobjs=
- CHECK=
--target_header_dir=
- if test -n "${with_target_subdir}"; then
-
- # We are being configured as a target library. AC_REPLACE_FUNCS
-@@ -492,27 +516,6 @@ if test -n "${with_target_subdir}"; then
-
- esac
-
-- # We may wish to install the target headers somewhere.
-- AC_ARG_ENABLE(install-libiberty,
-- [ --enable-install-libiberty Install headers for end users],
-- enable_install_libiberty=$enableval,
-- enable_install_libiberty=no)dnl
--
-- # Option parsed, now set things appropriately.
-- case x"$enable_install_libiberty" in
-- xyes|x)
-- target_header_dir=libiberty
-- ;;
-- xno)
-- target_header_dir=
-- ;;
-- *)
-- # This could be sanity-checked in various ways...
-- target_header_dir="${enable_install_libiberty}"
-- ;;
-- esac
--
--
- else
-
- # Not a target library, so we set things up to run the test suite.
---
-1.9.3
-
diff --git a/patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch b/patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch
deleted file mode 100644
index aa1376c..0000000
--- a/patches/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Thu, 6 Aug 2015 01:16:02 +0300
-Subject: [PATCH] xtensa: add -mauto-litpools option
-
-With support from assembler this option allows compiling huge functions,
-where single literal pool at the beginning of a function may not be
-reachable by L32R instructions at its end.
-
-Currently assembler --auto-litpools option cannot deal with literals
-used from multiple locations separated by more than 256 KBytes of code.
-Don't turn constants into literals, instead use MOVI instruction to load
-them into registers and let the assembler turn them into literals as
-necessary.
-
-2015-08-12 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/constraints.md (define_constraint "Y"): New
- constraint.
- * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools.
- * config/xtensa/linux.h (ASM_SPEC): Likewise.
- * config/xtensa/predicates.md (move_operand): Match constants
- and symbols in the presence of TARGET_AUTO_LITPOOLS.
- * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow
- immediate references to TLS data.
- (xtensa_emit_move_sequence): Don't force constants to memory in
- the presence of TARGET_AUTO_LITPOOLS.
- (print_operand): Add 'y' format, same as default, but capable of
- printing SF mode constants as well.
- * config/xtensa/xtensa.md (movsi_internal, movhi_internal)
- (movsf_internal): Add movi pattern that loads literal.
- (movsf, movdf): Don't force constants to memory in the presence
- of TARGET_AUTO_LITPOOLS.
- (movdf_internal): Add 'Y' constraint.
- * config/xtensa/xtensa.opt (mauto-litpools): New option.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226828
-Changes to ChangeLogs and documentation are dropped.
-
- gcc/config/xtensa/constraints.md | 5 +++++
- gcc/config/xtensa/elf.h | 4 +++-
- gcc/config/xtensa/linux.h | 4 +++-
- gcc/config/xtensa/predicates.md | 3 ++-
- gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++-
- gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++----------------
- gcc/config/xtensa/xtensa.opt | 4 ++++
- 7 files changed, 54 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md
-index 30f4c1f..773d4f9 100644
---- a/gcc/config/xtensa/constraints.md
-+++ b/gcc/config/xtensa/constraints.md
-@@ -111,6 +111,11 @@
- (and (match_code "const_int")
- (match_test "xtensa_mask_immediate (ival)")))
-
-+(define_constraint "Y"
-+ "A constant that can be used in relaxed MOVI instructions."
-+ (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
-+ (match_test "TARGET_AUTO_LITPOOLS")))
-+
- ;; Memory constraints. Do not use define_memory_constraint here. Doing so
- ;; causes reload to force some constants into the constant pool, but since
- ;; the Xtensa constant pool can only be accessed with L32R instructions, it
-diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h
-index e59bede..12056f7 100644
---- a/gcc/config/xtensa/elf.h
-+++ b/gcc/config/xtensa/elf.h
-@@ -48,7 +48,9 @@ along with GCC; see the file COPYING3. If not see
- %{mtarget-align:--target-align} \
- %{mno-target-align:--no-target-align} \
- %{mlongcalls:--longcalls} \
-- %{mno-longcalls:--no-longcalls}"
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-
- #undef LIB_SPEC
- #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal"
-diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h
-index 675aacf..5b0243a 100644
---- a/gcc/config/xtensa/linux.h
-+++ b/gcc/config/xtensa/linux.h
-@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see
- %{mtarget-align:--target-align} \
- %{mno-target-align:--no-target-align} \
- %{mlongcalls:--longcalls} \
-- %{mno-longcalls:--no-longcalls}"
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-
-diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md
-index e02209e..d7dfa11 100644
---- a/gcc/config/xtensa/predicates.md
-+++ b/gcc/config/xtensa/predicates.md
-@@ -142,7 +142,8 @@
- (match_test "GET_MODE_CLASS (mode) == MODE_INT
- && xtensa_simm12b (INTVAL (op))"))
- (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
-- (match_test "TARGET_CONST16 && CONSTANT_P (op)
-+ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS)
-+ && CONSTANT_P (op)
- && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0")))))
-
- ;; Accept the floating point constant 1 in the appropriate mode.
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index eb039ba..206ff80 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -501,6 +501,9 @@ xtensa_valid_move (machine_mode mode, rtx *operands)
- {
- int dst_regnum = xt_true_regnum (operands[0]);
-
-+ if (xtensa_tls_referenced_p (operands[1]))
-+ return FALSE;
-+
- /* The stack pointer can only be assigned with a MOVSP opcode. */
- if (dst_regnum == STACK_POINTER_REGNUM)
- return !TARGET_WINDOWED_ABI
-@@ -1069,7 +1072,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode)
- return 1;
- }
-
-- if (! TARGET_CONST16)
-+ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16)
- {
- src = force_const_mem (SImode, src);
- operands[1] = src;
-@@ -2449,6 +2452,20 @@ print_operand (FILE *file, rtx x, int letter)
- }
- break;
-
-+ case 'y':
-+ if (GET_CODE (x) == CONST_DOUBLE &&
-+ GET_MODE (x) == SFmode)
-+ {
-+ REAL_VALUE_TYPE r;
-+ long l;
-+ REAL_VALUE_FROM_CONST_DOUBLE (r, x);
-+ REAL_VALUE_TO_TARGET_SINGLE (r, l);
-+ fprintf (file, "0x%08lx", l);
-+ break;
-+ }
-+
-+ /* fall through */
-+
- default:
- if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
- fprintf (file, "%s", reg_names[xt_true_regnum (x)]);
-diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
-index 6d84384..0e673a3 100644
---- a/gcc/config/xtensa/xtensa.md
-+++ b/gcc/config/xtensa/xtensa.md
-@@ -761,8 +761,8 @@
- })
-
- (define_insn "movsi_internal"
-- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A")
-- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))]
-+ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A")
-+ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))]
- "xtensa_valid_move (SImode, operands)"
- "@
- movi.n\t%0, %x1
-@@ -774,15 +774,16 @@
- mov\t%0, %1
- movsp\t%0, %1
- movi\t%0, %x1
-+ movi\t%0, %1
- const16\t%0, %t1\;const16\t%0, %b1
- %v1l32r\t%0, %1
- %v1l32i\t%0, %1
- %v0s32i\t%1, %0
- rsr\t%0, ACCLO
- wsr\t%1, ACCLO"
-- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr")
-+ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr")
- (set_attr "mode" "SI")
-- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")])
-+ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")])
-
- ;; 16-bit Integer moves
-
-@@ -796,21 +797,22 @@
- })
-
- (define_insn "movhi_internal"
-- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A")
-- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))]
-+ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A")
-+ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))]
- "xtensa_valid_move (HImode, operands)"
- "@
- movi.n\t%0, %x1
- mov.n\t%0, %1
- mov\t%0, %1
- movi\t%0, %x1
-+ movi\t%0, %1
- %v1l16ui\t%0, %1
- %v0s16i\t%1, %0
- rsr\t%0, ACCLO
- wsr\t%1, ACCLO"
-- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr")
-+ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr")
- (set_attr "mode" "HI")
-- (set_attr "length" "2,2,3,3,3,3,3,3")])
-+ (set_attr "length" "2,2,3,3,3,3,3,3,3")])
-
- ;; 8-bit Integer moves
-
-@@ -881,7 +883,7 @@
- (match_operand:SF 1 "general_operand" ""))]
- ""
- {
-- if (!TARGET_CONST16 && CONSTANT_P (operands[1]))
-+ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1]))
- operands[1] = force_const_mem (SFmode, operands[1]);
-
- if ((!register_operand (operands[0], SFmode)
-@@ -896,8 +898,8 @@
- })
-
- (define_insn "movsf_internal"
-- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U")
-- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))]
-+ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U")
-+ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))]
- "((register_operand (operands[0], SFmode)
- || register_operand (operands[1], SFmode))
- && !(FP_REG_P (xt_true_regnum (operands[0]))
-@@ -912,13 +914,14 @@
- mov\t%0, %1
- wfr\t%0, %1
- rfr\t%0, %1
-+ movi\t%0, %y1
- const16\t%0, %t1\;const16\t%0, %b1
- %v1l32r\t%0, %1
- %v1l32i\t%0, %1
- %v0s32i\t%1, %0"
-- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store")
-+ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store")
- (set_attr "mode" "SF")
-- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")])
-+ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")])
-
- (define_insn "*lsiu"
- [(set (match_operand:SF 0 "register_operand" "=f")
-@@ -991,7 +994,7 @@
- (match_operand:DF 1 "general_operand" ""))]
- ""
- {
-- if (CONSTANT_P (operands[1]) && !TARGET_CONST16)
-+ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS)
- operands[1] = force_const_mem (DFmode, operands[1]);
-
- if (!register_operand (operands[0], DFmode)
-@@ -1002,8 +1005,8 @@
- })
-
- (define_insn_and_split "movdf_internal"
-- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U")
-- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))]
-+ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U")
-+ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))]
- "register_operand (operands[0], DFmode)
- || register_operand (operands[1], DFmode)"
- "#"
-diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt
-index 2fd6cee..21c6e96 100644
---- a/gcc/config/xtensa/xtensa.opt
-+++ b/gcc/config/xtensa/xtensa.opt
-@@ -38,6 +38,10 @@ mtext-section-literals
- Target
- Intersperse literal pools with code in the text section
-
-+mauto-litpools
-+Target Report Mask(AUTO_LITPOOLS)
-+Relax literals in assembler and place them automatically in the text section
-+
- mserialize-volatile
- Target Report Mask(SERIALIZE_VOLATILE)
- -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions
---
-1.8.1.4
-
diff --git a/patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch b/patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch
deleted file mode 100644
index abc7a08..0000000
--- a/patches/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Mon, 10 Aug 2015 21:35:20 +0300
-Subject: [PATCH 1/3] xtensa: reimplement register spilling
-
-Spilling windowed registers in userspace is much easier, more portable,
-less error-prone and equally effective as in kernel. Now that register
-spilling syscall is considered obsolete in the xtensa linux kernel
-replace it with CALL12 followed by series of ENTRY in libgcc.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use
- CALL12 followed by series of ENTRY to spill windowed registers.
- (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill
- instead of making linux spill syscall.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226962
-
- libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 7 deletions(-)
-
-diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S
-index 3ac8c1d..2e678af 100644
---- a/libgcc/config/xtensa/lib2funcs.S
-+++ b/libgcc/config/xtensa/lib2funcs.S
-@@ -33,10 +33,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- .global __xtensa_libgcc_window_spill
- .type __xtensa_libgcc_window_spill,@function
- __xtensa_libgcc_window_spill:
-- entry sp, 32
-- movi a2, 0
-- syscall
-+ entry sp, 48
-+#if XCHAL_NUM_AREGS > 16
-+ call12 1f
-+ retw
-+ .align 4
-+1:
-+ .rept (XCHAL_NUM_AREGS - 24) / 12
-+ _entry sp, 48
-+ mov a12, a0
-+ .endr
-+ _entry sp, 16
-+#if XCHAL_NUM_AREGS % 12 == 0
-+ mov a4, a4
-+#elif XCHAL_NUM_AREGS % 12 == 4
-+ mov a8, a8
-+#elif XCHAL_NUM_AREGS % 12 == 8
-+ mov a12, a12
-+#endif
-+ retw
-+#else
-+ mov a8, a8
- retw
-+#endif
- .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill
-
-
-@@ -58,10 +77,7 @@ __xtensa_nonlocal_goto:
- entry sp, 32
-
- /* Flush registers. */
-- mov a5, a2
-- movi a2, 0
-- syscall
-- mov a2, a5
-+ call8 __xtensa_libgcc_window_spill
-
- /* Because the save area for a0-a3 is stored one frame below
- the one identified by a2, the only way to restore those
---
-1.8.1.4
-
diff --git a/patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
deleted file mode 100644
index f23a5c0..0000000
--- a/patches/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 14 Aug 2015 02:45:02 +0300
-Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
-
-This allows having exception cleanup code in binaries that don't
-register their unwind tables.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde
- with unwind-dw2-fde-dip.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226963
-
- libgcc/config/xtensa/t-xtensa | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/t-xtensa b/libgcc/config/xtensa/t-xtensa
-index 27399e6..66d0eb3 100644
---- a/libgcc/config/xtensa/t-xtensa
-+++ b/libgcc/config/xtensa/t-xtensa
-@@ -13,4 +13,4 @@ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 _udivsi3 _umodsi3 \
- LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S
-
- LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
-- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
-+ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
---
-1.8.1.4
-
diff --git a/patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch b/patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch
deleted file mode 100644
index dc40513..0000000
--- a/patches/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sat, 15 Aug 2015 05:12:11 +0300
-Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
-
-Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
-higher than what was actually used by code at context->ra. This results
-in invalid CFA value in signal frames and premature unwinding completion
-in forced unwinding used by uClibc NPTL thread cancellation.
-Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
-matching code that used them.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
- context->sp instead of context->cfa.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226964
-
- libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c
-index 35f7797..ef6b900 100644
---- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
-+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
-@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
- _Unwind_Word
- _Unwind_GetCFA (struct _Unwind_Context *context)
- {
-- return (_Unwind_Ptr) context->cfa;
-+ return (_Unwind_Ptr) context->sp;
- }
-
- /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */
---
-1.8.1.4
-
diff --git a/patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index 6013fef..0000000
--- a/patches/gcc/4.8.5/874-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 0343a584d6b5128908eabf1db43c70bed7114989 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 28 May 2017 19:56:56 -0700
-Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
-
-HOST_WIDE_INT may not be long as assumed in print_operand and
-xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
-format strings instead of %ld/0x%lx. This fixes incorrect assembly code
-generation by the compiler running on armhf host.
-
-2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (xtensa_emit_call): Use
- HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
- (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
- format string.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index dbc5bd3..466adb5 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1772,7 +1772,7 @@ xtensa_emit_call (int callop, rtx *operands)
- rtx tgt = operands[callop];
-
- if (GET_CODE (tgt) == CONST_INT)
-- sprintf (result, "call8\t0x%lx", INTVAL (tgt));
-+ sprintf (result, "call8\t" HOST_WIDE_INT_PRINT_HEX, INTVAL (tgt));
- else if (register_operand (tgt, VOIDmode))
- sprintf (result, "callx8\t%%%d", callop);
- else
-@@ -2347,14 +2347,14 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'L':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
- else
- output_operand_lossage ("invalid %%L value");
- break;
-
- case 'R':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
- else
- output_operand_lossage ("invalid %%R value");
- break;
-@@ -2368,7 +2368,7 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'd':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_operand_lossage ("invalid %%d value");
- break;
-@@ -2437,7 +2437,7 @@ print_operand (FILE *file, rtx x, int letter)
- else if (GET_CODE (x) == MEM)
- output_address (XEXP (x, 0));
- else if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_addr_const (file, x);
- }
---
-2.1.4
-
diff --git a/patches/gcc/4.8.5/900-musl-support.patch b/patches/gcc/4.8.5/900-musl-support.patch
deleted file mode 100644
index 6743a88..0000000
--- a/patches/gcc/4.8.5/900-musl-support.patch
+++ /dev/null
@@ -1,648 +0,0 @@
-Add musl support to gcc
-
-This patch comes from the musl-cross project at
-https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version:
-
- * the config.sub modifications have been removed, because Buildroot
- already overwrites all config.sub with a more recent config.sub
- that has musl support.
-
- * change to ensure that a dummy dynamic linker path
- MUSL_DYNAMIC_LINKER<foo> is defined for all architectures,
- otherwise building gcc for architectures not supported by musl was
- causing build failure. Bug reported upstream at
- https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on.
-
- * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic
- and only add the musl one as an addition, not as a replacement. Not
- doing this breaks C++ exception handling with glibc, because
- USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script
- not testing dl_iterate_phdr() on any system except Solaris.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[Gustavo: Update for gcc 4.8.3]
-
-Index: b/fixincludes/mkfixinc.sh
-===================================================================
---- a/fixincludes/mkfixinc.sh
-+++ b/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
-Index: b/gcc/config/aarch64/aarch64-linux.h
-===================================================================
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,12 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
-+/* The AArch64 port currently supports two dynamic linkers:
-+ - ld-linux-aarch64.so.1 - GLIBC dynamic linker
-+ - ld-musl-aarch64.so.1 - musl libc dynamic linker */
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1"
-
- #define CPP_SPEC "%{pthread:-D_REENTRANT}"
-
-Index: b/gcc/config/arm/linux-eabi.h
-===================================================================
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,6 +77,23 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-Index: b/gcc/config/i386/linux64.h
-===================================================================
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -30,3 +30,10 @@
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#undef MUSL_DYNAMIC_LINKERX32
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-Index: b/gcc/config/i386/linux.h
-===================================================================
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -21,3 +21,5 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-Index: b/gcc/config/linux.h
-===================================================================
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,10 +32,12 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -53,18 +55,21 @@
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -82,23 +87,32 @@
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
- #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
-
-+/* Musl dynamic linker paths must be defined on a per-architecture
-+ basis, for each architecture supported by Musl. However, in order
-+ to let other architectures continue to build with other C
-+ libraries, we provide a dummy definition of the following defines. */
-+#define MUSL_DYNAMIC_LINKER "invalid"
-+#define MUSL_DYNAMIC_LINKER32 "invalid"
-+#define MUSL_DYNAMIC_LINKER64 "invalid"
-+#define MUSL_DYNAMIC_LINKERX32 "invalid"
-+
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Determine whether the entire c99 runtime
- is present in the runtime library. */
- #undef TARGET_C99_FUNCTIONS
--#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
-+#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL)
-
- /* Whether we have sincos that follows the GNU extension. */
- #undef TARGET_HAS_SINCOS
-@@ -107,3 +121,74 @@
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
- #define TARGET_HAS_BIONIC (OPTION_BIONIC)
-+
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-Index: b/gcc/config/linux.opt
-===================================================================
---- a/gcc/config/linux.opt
-+++ b/gcc/config/linux.opt
-@@ -30,3 +30,7 @@
- muclibc
- Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
-+Use musl C library
-Index: b/gcc/config/microblaze/linux.h
-===================================================================
---- a/gcc/config/microblaze/linux.h
-+++ b/gcc/config/microblaze/linux.h
-@@ -25,7 +25,23 @@
- #undef TLS_NEEDS_GOT
- #define TLS_NEEDS_GOT 1
-
--#define DYNAMIC_LINKER "/lib/ld.so.1"
-+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
-+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
-+#endif
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
-+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
-+#else
-+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
-+#endif
-+
-+
- #undef SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
- { "dynamic_linker", DYNAMIC_LINKER }
-Index: b/gcc/config/mips/linux64.h
-===================================================================
---- a/gcc/config/mips/linux64.h
-+++ b/gcc/config/mips/linux64.h
-@@ -29,4 +29,4 @@
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER)
-Index: b/gcc/config/mips/linux.h
-===================================================================
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -18,3 +18,11 @@
- <http://www.gnu.org/licenses/>. */
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+
-+#if TARGET_ENDIAN_DEFAULT == 0 /* LE */
-+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
-+#endif
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1"
-Index: b/gcc/config/rs6000/linux64.h
-===================================================================
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -374,17 +374,23 @@
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
- #undef DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
-Index: b/gcc/config/rs6000/secureplt.h
-===================================================================
---- a/gcc/config/rs6000/secureplt.h
-+++ b/gcc/config/rs6000/secureplt.h
-@@ -18,3 +18,4 @@
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-Index: b/gcc/config/rs6000/sysv4.h
-===================================================================
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -537,6 +537,9 @@
- #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-
- /* Pass -G xxx to the compiler. */
- #define CC1_SPEC "%{G*} %(cc1_cpu)" \
-@@ -585,7 +588,8 @@
-
- /* Override the default target of the linker. */
- #define LINK_TARGET_SPEC \
-- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "")
-+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \
-+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
-
- /* Any specific OS flags. */
- #define LINK_OS_SPEC "\
-@@ -763,15 +767,18 @@
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-@@ -894,6 +901,7 @@
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-Index: b/gcc/config/sh/linux.h
-===================================================================
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -43,7 +43,15 @@
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
-+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */
-+#define MUSL_DYNAMIC_LINKER_E "eb"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E
-+#endif
-+
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-Index: b/gcc/config.gcc
-===================================================================
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -550,7 +550,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # Common parts for widely ported systems.
- case ${target} in
-@@ -653,6 +653,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2135,6 +2138,10 @@
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-Index: b/gcc/configure
-===================================================================
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -26936,6 +26940,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-Index: b/gcc/configure.ac
-===================================================================
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4848,6 +4852,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-Index: b/gcc/ginclude/stddef.h
-===================================================================
---- a/gcc/ginclude/stddef.h
-+++ b/gcc/ginclude/stddef.h
-@@ -181,6 +181,7 @@
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -197,6 +198,7 @@
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -214,6 +216,7 @@
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
-Index: b/libgcc/unwind-dw2-fde-dip.c
-===================================================================
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -75,6 +75,13 @@
- # define USE_PT_GNU_EH_FRAME
- #endif
-
-+/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure
-+ script. */
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR)
-+# define USE_PT_GNU_EH_FRAME
-+#endif
-+
- #if defined(USE_PT_GNU_EH_FRAME)
-
- #include <link.h>
-Index: b/libgomp/config/posix/time.c
-===================================================================
---- a/libgomp/config/posix/time.c
-+++ b/libgomp/config/posix/time.c
-@@ -28,6 +28,8 @@
- The following implementation uses the most simple POSIX routines.
- If present, POSIX 4 clocks should be used instead. */
-
-+#define _POSIX_C_SOURCE 199309L /* for clocks */
-+
- #include "libgomp.h"
- #include <unistd.h>
- #if TIME_WITH_SYS_TIME
-Index: b/libitm/config/arm/hwcap.cc
-===================================================================
---- a/libitm/config/arm/hwcap.cc
-+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-Index: b/libitm/config/linux/x86/tls.h
-===================================================================
---- a/libitm/config/linux/x86/tls.h
-+++ b/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
-Index: b/libstdc++-v3/configure.host
-===================================================================
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -264,6 +264,13 @@
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
-+
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
-@@ -272,6 +279,9 @@
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
diff --git a/patches/gcc/4.8.5/950-cygwin64.patch b/patches/gcc/4.8.5/950-cygwin64.patch
deleted file mode 100644
index 67182ee..0000000
--- a/patches/gcc/4.8.5/950-cygwin64.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gcc-4.8.5/gcc/config.host.orig 2017-02-10 20:45:10.425515700 -0800
-+++ gcc-4.8.5/gcc/config.host 2017-02-10 20:47:33.935525500 -0800
-@@ -214,7 +214,7 @@
- ;;
- esac
- ;;
-- i[34567]86-*-cygwin*)
-+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
- host_xm_file=i386/xm-cygwin.h
- out_host_hook_obj=host-cygwin.o
- host_xmake_file="${host_xmake_file} i386/x-cygwin"
diff --git a/patches/gcc/4.9.4/001-gcc_bug_62231.patch b/patches/gcc/4.9.4/001-gcc_bug_62231.patch
deleted file mode 100644
index e7c9cf9..0000000
--- a/patches/gcc/4.9.4/001-gcc_bug_62231.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-As-applied. From:
-
-https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html
-
-Linked from bug62231 comment 4 there
-
-diff -durN a/gcc/defaults.h b/gcc/defaults.h
---- a/gcc/defaults.h 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/defaults.h 2014-12-15 13:26:13.498904465 -0800
-@@ -438,6 +438,11 @@
- #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
- #endif
-
-+/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
-+#ifndef DWARF_REG_TO_UNWIND_COLUMN
-+#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
-+#endif
-+
- /* Map register numbers held in the call frame info that gcc has
- collected using DWARF_FRAME_REGNUM to those that should be output in
- .debug_frame and .eh_frame. */
-diff -durN a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
---- a/gcc/dwarf2cfi.c 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/dwarf2cfi.c 2014-12-15 13:50:24.554883694 -0800
-@@ -225,7 +225,44 @@
- emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
- }
-
--/* Generate code to initialize the register size table. */
-+/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
-+ initialize the dwarf register size table entry corresponding to register
-+ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode
-+ to use for the size entry to initialize, and WROTE_RETURN_COLUMN needs to
-+ be set to true if the dwarf register number for REGNO is the dwarf return
-+ column number. */
-+
-+static
-+void init_one_dwarf_reg_size (int regno, enum machine_mode regmode,
-+ rtx table, enum machine_mode slotmode,
-+ bool *wrote_return_column)
-+{
-+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
-+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
-+ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
-+
-+ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
-+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
-+
-+ if (rnum >= DWARF_FRAME_REGISTERS)
-+ return;
-+
-+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
-+ {
-+ if (regmode == VOIDmode)
-+ return;
-+ *wrote_return_column = true;
-+ }
-+
-+ if (slotoffset < 0)
-+ return;
-+
-+ emit_move_insn (adjust_address (table, slotmode, slotoffset),
-+ gen_int_mode (regsize, slotmode));
-+}
-+
-+/* Generate code to initialize the dwarf register size table located
-+ at the provided ADDRESS. */
-
- void
- expand_builtin_init_dwarf_reg_sizes (tree address)
-@@ -238,30 +275,21 @@
-
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- {
-- unsigned int dnum = DWARF_FRAME_REGNUM (i);
-- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
--
-- if (rnum < DWARF_FRAME_REGISTERS)
-- {
-- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
-- enum machine_mode save_mode = reg_raw_mode[i];
-- HOST_WIDE_INT size;
--
-- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
-- save_mode = choose_hard_reg_mode (i, 1, true);
-- if (dnum == DWARF_FRAME_RETURN_COLUMN)
-- {
-- if (save_mode == VOIDmode)
-- continue;
-- wrote_return_column = true;
-- }
-- size = GET_MODE_SIZE (save_mode);
-- if (offset < 0)
-- continue;
-+ enum machine_mode save_mode = reg_raw_mode[i];
-+ rtx span;
-
-- emit_move_insn (adjust_address (mem, mode, offset),
-- gen_int_mode (size, mode));
-- }
-+ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
-+ if (!span)
-+ init_one_dwarf_reg_size (i, save_mode, mem, mode, &wrote_return_column);
-+ else
-+ {
-+ for (int si = 0; si < XVECLEN (span, 0); si++)
-+ {
-+ rtx reg = XVECEXP (span, 0, si);
-+ init_one_dwarf_reg_size
-+ (REGNO (reg), GET_MODE (reg), mem, mode, &wrote_return_column);
-+ }
-+ }
- }
-
- if (!wrote_return_column)
-diff -durN a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
---- a/libgcc/unwind-dw2.c 2013-05-31 16:21:46.000000000 -0700
-+++ b/libgcc/unwind-dw2.c 2014-12-15 13:26:13.570904866 -0800
-@@ -55,10 +55,6 @@
- #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
- #endif
-
--#ifndef DWARF_REG_TO_UNWIND_COLUMN
--#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
--#endif
--
- /* ??? For the public function interfaces, we tend to gcc_assert that the
- column numbers are in range. For the dwarf2 unwind info this does happen,
- although so far in a case that doesn't actually matter.
diff --git a/patches/gcc/4.9.4/002-gcc_bug_62231.patch b/patches/gcc/4.9.4/002-gcc_bug_62231.patch
deleted file mode 100644
index b970ebc..0000000
--- a/patches/gcc/4.9.4/002-gcc_bug_62231.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-As-applied. From:
-
-https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02605.html
-
-Linked from bug62231 comment 4 there
-
-diff -durN a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
---- a/gcc/config/rs6000/rs6000.c 2014-12-08 17:29:04.000000000 -0800
-+++ b/gcc/config/rs6000/rs6000.c 2014-12-15 14:44:46.568801843 -0800
-@@ -1673,7 +1673,7 @@
- SCmode so as to pass the value correctly in a pair of
- registers. */
- else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
-- && !DECIMAL_FLOAT_MODE_P (mode))
-+ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
- reg_size = UNITS_PER_FP_WORD;
-
- else
diff --git a/patches/gcc/4.9.4/100-uclibc-conf.patch b/patches/gcc/4.9.4/100-uclibc-conf.patch
deleted file mode 100644
index d56bf0a..0000000
--- a/patches/gcc/4.9.4/100-uclibc-conf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: gcc-4.8.0/contrib/regression/objs-gcc.sh
-===================================================================
---- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200
-+++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100
-@@ -106,6 +106,10 @@
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
diff --git a/patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch b/patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch
deleted file mode 100644
index 525592e..0000000
--- a/patches/gcc/4.9.4/1000-libtool-leave-framework-alone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-4.9.4/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
-+++ gcc-4.9.4/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
-@@ -36,6 +36,11 @@
- for arg
- do
- case $arg in
-+ -framework)
-+ # libtool handles this option. It should not be prefixed with
-+ # -Xcompiler, as that would split it from the argument that
-+ # follows.
-+ ;;
- -f*|--*)
- # Libtool does not ascribe any special meaning options
- # that begin with -f or with a double-dash. So, it will
diff --git a/patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional b/patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional
deleted file mode 100644
index 5e0484f..0000000
--- a/patches/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional
+++ /dev/null
@@ -1,122 +0,0 @@
-http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
-
-On glibc the libc.so carries a copy of the math function copysignl() but
-on uClibc math functions like copysignl() live in libm. Since libgcc_s
-contains unresolved symbols, any attempt to link against libgcc_s
-without explicitely specifying -lm fails, resulting in a broken
-bootstrap of the compiler.
-
-Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
-
----
- libgcc/Makefile.in | 4 +++-
- libgcc/configure | 32 ++++++++++++++++++++++++++++++++
- libgcc/configure.ac | 21 +++++++++++++++++++++
- 3 files changed, 56 insertions(+), 1 deletion(-)
-
-Index: b/libgcc/Makefile.in
-===================================================================
---- a/libgcc/Makefile.in
-+++ b/libgcc/Makefile.in
-@@ -42,6 +42,7 @@
- enable_vtable_verify = @enable_vtable_verify@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
-+LIBGCC_LIBM = @LIBGCC_LIBM@
-
- host_noncanonical = @host_noncanonical@
- target_noncanonical = @target_noncanonical@
-@@ -943,9 +944,10 @@
- @multilib_dir@,$(MULTIDIR),$(subst \
- @shlib_objs@,$(objects) libgcc.a,$(subst \
- @shlib_base_name@,libgcc_s,$(subst \
-+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
- @shlib_map_file@,$(mapfile),$(subst \
- @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
-- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
-+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
-
- libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
- # @multilib_flags@ is still needed because this may use
-Index: b/libgcc/configure
-===================================================================
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -564,6 +564,7 @@
- tmake_file
- sfp_machine_header
- set_use_emutls
-+LIBGCC_LIBM
- set_have_cc_tls
- vis_hide
- fixed_point
-@@ -4535,6 +4536,37 @@
- fi
- fi
-
-+# On powerpc libgcc_s references copysignl which is a libm function but
-+# glibc apparently also provides it via libc as opposed to uClibc where
-+# it lives in libm.
-+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
-+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
-+if test "${libgcc_cv_copysignl_lib+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ echo '#include <features.h>' > conftest.c
-+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
-+ libgcc_cv_copysignl_lib="-lc"
-+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }
-+ then
-+ libgcc_cv_copysignl_lib="-lm"
-+ fi
-+ rm -f conftest.*
-+
-+fi
-+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
-+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
-+
-+case /${libgcc_cv_copysignl_lib}/ in
-+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
-+ *) LIBGCC_LIBM= ;;
-+esac
-
- # Conditionalize the makefile for this target machine.
- tmake_file_=
-Index: b/libgcc/configure.ac
-===================================================================
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -357,6 +357,27 @@
- fi
- AC_SUBST(set_have_cc_tls)
-
-+# On powerpc libgcc_s references copysignl which is a libm function but
-+# glibc apparently also provides it via libc as opposed to uClibc where
-+# it lives in libm.
-+AC_CACHE_CHECK
-+ libgcc_cv_copysignl_lib,
-+ echo '#include <features.h>' > conftest.c
-+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
-+ libgcc_cv_copysignl_lib="-lc"
-+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
-+ then
-+ libgcc_cv_copysignl_lib="-lm"
-+ fi
-+ rm -f conftest.*
-+ ])
-+
-+case /${libgcc_cv_copysignl_lib}/ in
-+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
-+ *) LIBGCC_LIBM= ;;
-+esac
-+AC_SUBST(LIBGCC_LIBM)
-+
- # See if we have emulated thread-local storage.
- GCC_CHECK_EMUTLS
- set_use_emutls=
diff --git a/patches/gcc/4.9.4/1100-msp430-string-literals.patch b/patches/gcc/4.9.4/1100-msp430-string-literals.patch
deleted file mode 100644
index 346842e..0000000
--- a/patches/gcc/4.9.4/1100-msp430-string-literals.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit 9d247a3d78b97c004e7ca5e7d6cc9964dba870c7
-Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed May 13 01:11:13 2015 +0000
-
- gcc/
- * config/mmix/mmix.c, config/msp430/msp430.c: Add space between
- string literal and macro name.
- gcc/ada/
- * sigtramp-vxworks.c: Add space between string literal and macro
- name.
-
- git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223106 138bc75d-0d04-0410-961f-82ee72b054a4
-
-[4.9 change: remove non-applicable parts of the patch]
-diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
-index bec168ca2ae..58d0efea1de 100644
---- a/gcc/config/msp430/msp430.c
-+++ b/gcc/config/msp430/msp430.c
-@@ -2248,7 +2248,7 @@ static struct
- }
- const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
-
- CSH ("slli", 1, 1, slli_1),
- CSH ("slll", 1, 1, slll_1),
diff --git a/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch b/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
-
-diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha
-index 0b6ffb1..0c2f840 100644
---- a/libgcc/config/alpha/t-alpha
-+++ b/libgcc/config/alpha/t-alpha
-@@ -1,2 +1,6 @@
- # This is a support routine for longlong.h, used by libgcc2.c.
- LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
-+
-+# When GAS-generated unwind tables are created, they get created
-+# after the __FRAME_END__ terminator, which causes an ld error.
-+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
diff --git a/patches/gcc/4.9.4/111-pr65730.patch b/patches/gcc/4.9.4/111-pr65730.patch
deleted file mode 100644
index 8a41fd2..0000000
--- a/patches/gcc/4.9.4/111-pr65730.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 10 Apr 2015 17:46:30 +0300
-Subject: [PATCH] Fix PR target/65730
-
-2015-05-20 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (init_alignment_context): Replace MULT
- by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT).
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452
-Changes to ChangeLog are dropped.
-
- gcc/config/xtensa/xtensa.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-Index: b/gcc/config/xtensa/xtensa.c
-===================================================================
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1436,8 +1436,9 @@
- if (ac->shift != NULL_RTX)
- {
- /* Shift is the byte count, but we need the bitcount. */
-- ac->shift = expand_simple_binop (SImode, MULT, ac->shift,
-- GEN_INT (BITS_PER_UNIT),
-+ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0);
-+ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift,
-+ GEN_INT (exact_log2 (BITS_PER_UNIT)),
- NULL_RTX, 1, OPTAB_DIRECT);
- ac->modemask = expand_simple_binop (SImode, ASHIFT,
- GEN_INT (GET_MODE_MASK (mode)),
diff --git a/patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
deleted file mode 100644
index bb77c4b..0000000
--- a/patches/gcc/4.9.4/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001
-From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
-Date: Fri, 6 Nov 2015 14:27:23 +0100
-Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit
-
-Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate
-64-bit binaries by default.
-
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
----
- gcc/config.gcc | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-Index: b/gcc/config.gcc
-===================================================================
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -441,7 +441,7 @@
- extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
- need_64bit_hwint=yes
- case x$with_cpu in
-- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
-+ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
- cpu_is_64bit=yes
- ;;
- esac
diff --git a/patches/gcc/4.9.4/130-pr43538.patch b/patches/gcc/4.9.4/130-pr43538.patch
deleted file mode 100644
index 19e57bb..0000000
--- a/patches/gcc/4.9.4/130-pr43538.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001
-From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 25 Apr 2014 08:03:08 +0000
-Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
-
- PR target/43538
- * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- config/mt-gnu | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/mt-gnu b/config/mt-gnu
-index 15bf417..5c696f5 100644
---- a/config/mt-gnu
-+++ b/config/mt-gnu
-@@ -1 +1 @@
--CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
-+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
---
-2.1.4
-
diff --git a/patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 1c49fb0..0000000
--- a/patches/gcc/4.9.4/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 18 Nov 2014 22:12:52 +0000
-Subject: [PATCH] 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
-
- * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
- overwriting.
- (CXXFLAGS_FOR_TARGET): Similarly.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- config/mt-ospace | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/config/mt-ospace b/config/mt-ospace
-index 7f09104..ce29ff4 100644
---- a/config/mt-ospace
-+++ b/config/mt-ospace
-@@ -1,3 +1,3 @@
- # Build libraries optimizing for space, not speed.
-- CFLAGS_FOR_TARGET = -g -Os
-- CXXFLAGS_FOR_TARGET = -g -Os
-+ CFLAGS_FOR_TARGET += -g -Os
-+ CXXFLAGS_FOR_TARGET += -g -Os
---
-2.1.4
-
diff --git a/patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch b/patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
deleted file mode 100644
index 55f3228..0000000
--- a/patches/gcc/4.9.4/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 3c536954a67a883630f4a7513a27f02a892c3dcb Mon Sep 17 00:00:00 2001
-From: Evgeniy Stepanov <eugeni.stepanov@gmail.com>
-Date: Tue, 21 Oct 2014 21:08:13 +0000
-Subject: [PATCH] [sanitizer] Fix build with _FILE_OFFSET_BITS=64.
-
-Sanitizer source is not affected by _FILE_OFFSET_BITS in general,
-but this one file must be built with 32-bit off_t. More details in the code.
-
-git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220328 91177308-0d34-0410-b5e6-96231b3b80d8
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
-index bbc1108..fc09522 100644
---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
-+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
-@@ -13,7 +13,15 @@
-
- #include "sanitizer_platform.h"
- #if SANITIZER_LINUX || SANITIZER_MAC
-+// Tests in this file assume that off_t-dependent data structures match the
-+// libc ABI. For example, struct dirent here is what readdir() function (as
-+// exported from libc) returns, and not the user-facing "dirent", which
-+// depends on _FILE_OFFSET_BITS setting.
-+// To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below.
-+#ifdef _FILE_OFFSET_BITS
-+#undef _FILE_OFFSET_BITS
-+#endif
-
- #include "sanitizer_internal_defs.h"
- #include "sanitizer_platform_limits_posix.h"
-
---
-2.1.4
-
diff --git a/patches/gcc/4.9.4/301-missing-execinfo_h.patch b/patches/gcc/4.9.4/301-missing-execinfo_h.patch
deleted file mode 100644
index 00efda2..0000000
--- a/patches/gcc/4.9.4/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: gcc-4.8.0/boehm-gc/include/gc.h
-===================================================================
---- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
-+++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
deleted file mode 100644
index c3bab15..0000000
--- a/patches/gcc/4.9.4/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff -urpN '--exclude=autom4te.cache' gcc-4.9.4.orig/gcc/configure gcc-4.9.4/gcc/configure
---- gcc-4.9.4.orig/gcc/configure 2016-05-22 01:53:32.000000000 -0700
-+++ gcc-4.9.4/gcc/configure 2017-02-11 16:54:52.879474293 -0800
-@@ -28058,6 +28058,9 @@ fi
-
-
- pluginlibs=
-+PICFLAG="-fPIC"
-+UNDEFINEDPREAMBLE="extern int X;"
-+UNDEFINEDCODE="return X == 0;"
-
- case "${host}" in
- *-*-darwin*)
-@@ -28069,6 +28072,11 @@ case "${host}" in
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -28181,23 +28189,23 @@ fi
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
-diff -urpN '--exclude=autom4te.cache' gcc-4.9.4.orig/gcc/configure.ac gcc-4.9.4/gcc/configure.ac
---- gcc-4.9.4.orig/gcc/configure.ac 2016-05-22 01:53:32.000000000 -0700
-+++ gcc-4.9.4/gcc/configure.ac 2017-02-11 16:49:59.820965424 -0800
-@@ -5583,6 +5583,9 @@ enable_plugin=$enableval,
- enable_plugin=yes; default_plugin=yes)
-
- pluginlibs=
-+PICFLAG="-fPIC"
-+UNDEFINEDPREAMBLE="extern int X;"
-+UNDEFINEDCODE="return X == 0;"
-
- case "${host}" in
- *-*-darwin*)
-@@ -5594,6 +5597,11 @@ case "${host}" in
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -5645,17 +5653,17 @@ if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- AC_MSG_CHECKING([for -fPIC -shared])
-+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
- AC_TRY_LINK(
-- [extern int X;],[return X == 0;],
-+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
- [AC_MSG_RESULT([yes]); have_pic_shared=yes],
- [AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
diff --git a/patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch b/patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch
deleted file mode 100644
index 5efa7fd..0000000
--- a/patches/gcc/4.9.4/810-arm-softfloat-libgcc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: b/gcc/config/arm/linux-elf.h
-===================================================================
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -60,7 +60,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-Index: b/libgcc/config/arm/t-linux
-===================================================================
---- a/libgcc/config/arm/t-linux
-+++ b/libgcc/config/arm/t-linux
-@@ -1,6 +1,11 @@
- LIB1ASMSRC = arm/lib1funcs.S
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
-+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
-+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
-+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
-+ _arm_fixsfsi _arm_fixunssfsi
-
- # Just for these, we omit the frame pointer since it makes such a big
- # difference.
diff --git a/patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch b/patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch
deleted file mode 100644
index 37f8f2a..0000000
--- a/patches/gcc/4.9.4/830-arm_unbreak_armv4t.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
-
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
- The ARM10TDMI core is the default for armv5t, so set
- SUBTARGET_CPU_DEFAULT to achieve this. */
- #undef SUBTARGET_CPU_DEFAULT
--#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
-
- /* TARGET_BIG_ENDIAN_DEFAULT is set in
- config.gcc for big endian configurations. */
diff --git a/patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch b/patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch
deleted file mode 100644
index 03fc47f..0000000
--- a/patches/gcc/4.9.4/840-microblaze-enable-dwarf-eh-support.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc
-
-From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001
-From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
-Date: Mon, 18 Jun 2012 20:18:13 +0200
-Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support.
-
-Changelog
-
-2013-03-18 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
- David Holsgrove <david.holsgrove@xilinx.com>
-
- * common/config/microblaze/microblaze-common.c: Remove
- TARGET_EXCEPT_UNWIND_INFO definition.
- * config/microblaze/microblaze-protos.h: Add
- microblaze_eh_return prototype.
- * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register,
- microblaze_expand_epilogue, microblaze_return_addr): Handle
- calls_eh_return
- (microblaze_eh_return): New function.
- * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET,
- EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX,
- ASM_PREFERRED_EH_DATA_FORMAT
- * gcc/config/microblaze/microblaze.md: Define eh_return pattern.
-
-Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
-Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
----
- gcc/common/config/microblaze/microblaze-common.c | 3 ---
- gcc/config/microblaze/microblaze-protos.h | 1 +
- gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++----
- gcc/config/microblaze/microblaze.h | 15 ++++++++++++
- gcc/config/microblaze/microblaze.md | 11 +++++++++
- 5 files changed, 52 insertions(+), 7 deletions(-)
-
-Index: b/gcc/common/config/microblaze/microblaze-common.c
-===================================================================
---- a/gcc/common/config/microblaze/microblaze-common.c
-+++ b/gcc/common/config/microblaze/microblaze-common.c
-@@ -37,7 +37,4 @@
- #undef TARGET_OPTION_OPTIMIZATION_TABLE
- #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
-
--#undef TARGET_EXCEPT_UNWIND_INFO
--#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
--
- struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
-Index: b/gcc/config/microblaze/microblaze-protos.h
-===================================================================
---- a/gcc/config/microblaze/microblaze-protos.h
-+++ b/gcc/config/microblaze/microblaze-protos.h
-@@ -54,6 +54,7 @@
- extern int symbol_mentioned_p (rtx);
- extern int label_mentioned_p (rtx);
- extern bool microblaze_cannot_force_const_mem (enum machine_mode, rtx);
-+extern void microblaze_eh_return (rtx op0);
- #endif /* RTX_CODE */
-
- /* Declare functions in microblaze-c.c. */
-Index: b/gcc/config/microblaze/microblaze.c
-===================================================================
---- a/gcc/config/microblaze/microblaze.c
-+++ b/gcc/config/microblaze/microblaze.c
-@@ -1906,6 +1906,11 @@
- if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
- return 1;
-
-+ if (crtl->calls_eh_return
-+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) {
-+ return 1;
-+ }
-+
- if (!crtl->is_leaf)
- {
- if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
-@@ -1933,6 +1938,13 @@
- return 1;
- }
-
-+ if (crtl->calls_eh_return
-+ && (regno == EH_RETURN_DATA_REGNO (0)
-+ || regno == EH_RETURN_DATA_REGNO (1)))
-+ {
-+ return 1;
-+ }
-+
- return 0;
- }
-
-@@ -2962,6 +2974,12 @@
- emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx));
- }
-
-+ if (crtl->calls_eh_return)
-+ emit_insn (gen_addsi3 (stack_pointer_rtx,
-+ stack_pointer_rtx,
-+ gen_rtx_raw_REG (SImode,
-+ MB_EH_STACKADJ_REGNUM)));
-+
- emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
- MB_ABI_SUB_RETURN_ADDR_REGNUM)));
- }
-@@ -3256,10 +3274,13 @@
- if (count != 0)
- return NULL_RTX;
-
-- return gen_rtx_PLUS (Pmode,
-- get_hard_reg_initial_val (Pmode,
-- MB_ABI_SUB_RETURN_ADDR_REGNUM),
-- GEN_INT (8));
-+ return get_hard_reg_initial_val (Pmode,
-+ MB_ABI_SUB_RETURN_ADDR_REGNUM);
-+}
-+
-+void microblaze_eh_return (rtx op0)
-+{
-+ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0));
- }
-
- /* Queue an .ident string in the queue of top-level asm statements.
-Index: b/gcc/config/microblaze/microblaze.h
-===================================================================
---- a/gcc/config/microblaze/microblaze.h
-+++ b/gcc/config/microblaze/microblaze.h
-@@ -184,6 +184,21 @@
- #define INCOMING_RETURN_ADDR_RTX \
- gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
-
-+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */
-+#define RETURN_ADDR_OFFSET (8)
-+
-+/* Describe how we implement __builtin_eh_return. */
-+#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM)
-+
-+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM
-+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM)
-+
-+/* Select a format to encode pointers in exception handling data. CODE
-+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
-+ true if the symbol may be affected by dynamic relocations. */
-+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
-+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
-+
- /* Use DWARF 2 debugging information by default. */
- #define DWARF2_DEBUGGING_INFO
- #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-Index: b/gcc/config/microblaze/microblaze.md
-===================================================================
---- a/gcc/config/microblaze/microblaze.md
-+++ b/gcc/config/microblaze/microblaze.md
-@@ -2261,4 +2261,15 @@
- (set_attr "mode" "SI")
- (set_attr "length" "4")])
-
-+; This is used in compiling the unwind routines.
-+(define_expand "eh_return"
-+ [(use (match_operand 0 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ microblaze_eh_return(operands[0]);
-+ DONE;
-+}")
-+
- (include "sync.md")
-+
diff --git a/patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch b/patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch
deleted file mode 100644
index 533d01f..0000000
--- a/patches/gcc/4.9.4/850-libstdcxx-uclibc-c99.patch
+++ /dev/null
@@ -1,274 +0,0 @@
-Allow C99-depending features of libstdc++ with uClibc
-
-The libstdc++ code is fairly restrictive on how it checks for C99
-compatibility: it requires *complete* C99 support to enable certain
-features. For example, uClibc provides a good number of C99 features,
-but not C99 complex number support. For this reason, libstdc++
-completely disables many the standard C++ methods that can in fact
-work because uClibc provides the necessary functions.
-
-This patch is similar and highly inspired from
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
-a way that doesn't involve changing the configure.ac script, as
-autoreconfiguring gcc is complicated. It simply relies on the fact
-that uClibc defines the __UCLIBC__ definition.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[Gustavo: update for 4.9.3]
-
-Index: b/libstdc++-v3/config/locale/generic/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -70,7 +70,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/config/locale/gnu/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/gnu/c_locale.h
-+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
-@@ -88,7 +88,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/include/bits/basic_string.h
-===================================================================
---- a/libstdc++-v3/include/bits/basic_string.h
-+++ b/libstdc++-v3/include/bits/basic_string.h
-@@ -2843,7 +2843,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
-+#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))
-
- #include <ext/string_conversions.h>
-
-Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-@@ -572,7 +572,7 @@
- {
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- // First try a buffer perhaps big enough.
- int __cs_size = 64;
- char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
-Index: b/libstdc++-v3/include/bits/locale_facets.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets.tcc
-@@ -987,7 +987,7 @@
- char __fbuf[16];
- __num_base::_S_format_float(__io, __fbuf, __mod);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- // First try a buffer perhaps big enough (most probably sufficient
- // for non-ios_base::fixed outputs)
- int __cs_size = __max_digits * 3;
-Index: b/libstdc++-v3/include/c_compatibility/math.h
-===================================================================
---- a/libstdc++-v3/include/c_compatibility/math.h
-+++ b/libstdc++-v3/include/c_compatibility/math.h
-@@ -56,7 +56,7 @@
- using std::floor;
- using std::fmod;
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::fpclassify;
- using std::isfinite;
- using std::isinf;
-Index: b/libstdc++-v3/include/c_compatibility/wchar.h
-===================================================================
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -103,7 +103,7 @@
- using std::wmemset;
- using std::wcsftime;
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/c_global/cstdio
-===================================================================
---- a/libstdc++-v3/include/c_global/cstdio
-+++ b/libstdc++-v3/include/c_global/cstdio
-@@ -146,7 +146,7 @@
- using ::vsprintf;
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
-Index: b/libstdc++-v3/include/c_global/cstdlib
-===================================================================
---- a/libstdc++-v3/include/c_global/cstdlib
-+++ b/libstdc++-v3/include/c_global/cstdlib
-@@ -182,7 +182,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef _Exit
- #undef llabs
-Index: b/libstdc++-v3/include/c_global/cwchar
-===================================================================
---- a/libstdc++-v3/include/c_global/cwchar
-+++ b/libstdc++-v3/include/c_global/cwchar
-@@ -232,7 +232,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef wcstold
- #undef wcstoll
-@@ -289,7 +289,7 @@
- using std::vwscanf;
- #endif
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/c_std/cstdio
-===================================================================
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
-Index: b/libstdc++-v3/include/c_std/cstdlib
-===================================================================
---- a/libstdc++-v3/include/c_std/cstdlib
-+++ b/libstdc++-v3/include/c_std/cstdlib
-@@ -180,7 +180,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef _Exit
- #undef llabs
-Index: b/libstdc++-v3/include/c_std/cwchar
-===================================================================
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -228,7 +228,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef wcstold
- #undef wcstoll
-Index: b/libstdc++-v3/include/ext/vstring.h
-===================================================================
---- a/libstdc++-v3/include/ext/vstring.h
-+++ b/libstdc++-v3/include/ext/vstring.h
-@@ -2680,7 +2680,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
-+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
-
- #include <ext/string_conversions.h>
-
-Index: b/libstdc++-v3/include/tr1/cstdio
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdio
-+++ b/libstdc++-v3/include/tr1/cstdio
-@@ -33,7 +33,7 @@
-
- #include <cstdio>
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-Index: b/libstdc++-v3/include/tr1/cstdlib
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdlib
-+++ b/libstdc++-v3/include/tr1/cstdlib
-@@ -35,7 +35,7 @@
-
- #if _GLIBCXX_HOSTED
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-Index: b/libstdc++-v3/include/tr1/cwchar
-===================================================================
---- a/libstdc++-v3/include/tr1/cwchar
-+++ b/libstdc++-v3/include/tr1/cwchar
-@@ -52,7 +52,7 @@
- using std::vwscanf;
- #endif
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/tr1/stdlib.h
-===================================================================
---- a/libstdc++-v3/include/tr1/stdlib.h
-+++ b/libstdc++-v3/include/tr1/stdlib.h
-@@ -33,7 +33,7 @@
-
- #if _GLIBCXX_HOSTED
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- using std::tr1::atoll;
- using std::tr1::strtoll;
-Index: b/libstdc++-v3/src/c++11/debug.cc
-===================================================================
---- a/libstdc++-v3/src/c++11/debug.cc
-+++ b/libstdc++-v3/src/c++11/debug.cc
-@@ -788,7 +788,7 @@
- int __n __attribute__ ((__unused__)),
- const char* __fmt, _Tp __s) const throw ()
- {
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- std::snprintf(__buf, __n, __fmt, __s);
- #else
- std::sprintf(__buf, __fmt, __s);
diff --git a/patches/gcc/4.9.4/860-cilk-wchar.patch b/patches/gcc/4.9.4/860-cilk-wchar.patch
deleted file mode 100644
index 1837405..0000000
--- a/patches/gcc/4.9.4/860-cilk-wchar.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] cilk: fix build without wchar
-
-When building against uClibc with wchar support disabled, WCHAR_MIN and
-WCHAR_MAX are not defined leading to compilation errors.
-
-Fix it by only including the wchar code if available.
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
- libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-Index: host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h
-===================================================================
---- host-gcc-final-4.9.2.orig/libcilkrts/include/cilk/reducer_min_max.h
-+++ host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h
-@@ -3154,7 +3154,9 @@
- CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
-@@ -3306,7 +3308,9 @@
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
-@@ -3432,7 +3436,9 @@
- CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
-@@ -3584,7 +3590,9 @@
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
diff --git a/patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch b/patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch
deleted file mode 100644
index 98c7b3f..0000000
--- a/patches/gcc/4.9.4/870-xtensa-add-mauto-litpools-option.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Thu, 6 Aug 2015 01:16:02 +0300
-Subject: [PATCH] xtensa: add -mauto-litpools option
-
-With support from assembler this option allows compiling huge functions,
-where single literal pool at the beginning of a function may not be
-reachable by L32R instructions at its end.
-
-Currently assembler --auto-litpools option cannot deal with literals
-used from multiple locations separated by more than 256 KBytes of code.
-Don't turn constants into literals, instead use MOVI instruction to load
-them into registers and let the assembler turn them into literals as
-necessary.
-
-2015-08-12 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/constraints.md (define_constraint "Y"): New
- constraint.
- * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools.
- * config/xtensa/linux.h (ASM_SPEC): Likewise.
- * config/xtensa/predicates.md (move_operand): Match constants
- and symbols in the presence of TARGET_AUTO_LITPOOLS.
- * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow
- immediate references to TLS data.
- (xtensa_emit_move_sequence): Don't force constants to memory in
- the presence of TARGET_AUTO_LITPOOLS.
- (print_operand): Add 'y' format, same as default, but capable of
- printing SF mode constants as well.
- * config/xtensa/xtensa.md (movsi_internal, movhi_internal)
- (movsf_internal): Add movi pattern that loads literal.
- (movsf, movdf): Don't force constants to memory in the presence
- of TARGET_AUTO_LITPOOLS.
- (movdf_internal): Add 'Y' constraint.
- * config/xtensa/xtensa.opt (mauto-litpools): New option.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226828
-Changes to ChangeLogs and documentation are dropped.
-
- gcc/config/xtensa/constraints.md | 5 +++++
- gcc/config/xtensa/elf.h | 4 +++-
- gcc/config/xtensa/linux.h | 4 +++-
- gcc/config/xtensa/predicates.md | 3 ++-
- gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++-
- gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++----------------
- gcc/config/xtensa/xtensa.opt | 4 ++++
- 7 files changed, 54 insertions(+), 20 deletions(-)
-
-Index: b/gcc/config/xtensa/constraints.md
-===================================================================
---- a/gcc/config/xtensa/constraints.md
-+++ b/gcc/config/xtensa/constraints.md
-@@ -111,6 +111,11 @@
- (and (match_code "const_int")
- (match_test "xtensa_mask_immediate (ival)")))
-
-+(define_constraint "Y"
-+ "A constant that can be used in relaxed MOVI instructions."
-+ (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
-+ (match_test "TARGET_AUTO_LITPOOLS")))
-+
- ;; Memory constraints. Do not use define_memory_constraint here. Doing so
- ;; causes reload to force some constants into the constant pool, but since
- ;; the Xtensa constant pool can only be accessed with L32R instructions, it
-Index: b/gcc/config/xtensa/elf.h
-===================================================================
---- a/gcc/config/xtensa/elf.h
-+++ b/gcc/config/xtensa/elf.h
-@@ -48,7 +48,9 @@
- %{mtarget-align:--target-align} \
- %{mno-target-align:--no-target-align} \
- %{mlongcalls:--longcalls} \
-- %{mno-longcalls:--no-longcalls}"
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-
- #undef LIB_SPEC
- #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal"
-Index: b/gcc/config/xtensa/linux.h
-===================================================================
---- a/gcc/config/xtensa/linux.h
-+++ b/gcc/config/xtensa/linux.h
-@@ -42,7 +42,9 @@
- %{mtarget-align:--target-align} \
- %{mno-target-align:--no-target-align} \
- %{mlongcalls:--longcalls} \
-- %{mno-longcalls:--no-longcalls}"
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-
-Index: b/gcc/config/xtensa/predicates.md
-===================================================================
---- a/gcc/config/xtensa/predicates.md
-+++ b/gcc/config/xtensa/predicates.md
-@@ -142,7 +142,8 @@
- (match_test "GET_MODE_CLASS (mode) == MODE_INT
- && xtensa_simm12b (INTVAL (op))"))
- (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
-- (match_test "TARGET_CONST16 && CONSTANT_P (op)
-+ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS)
-+ && CONSTANT_P (op)
- && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0")))))
-
- ;; Accept the floating point constant 1 in the appropriate mode.
-Index: b/gcc/config/xtensa/xtensa.c
-===================================================================
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -477,6 +477,9 @@
- {
- int dst_regnum = xt_true_regnum (operands[0]);
-
-+ if (xtensa_tls_referenced_p (operands[1]))
-+ return FALSE;
-+
- /* The stack pointer can only be assigned with a MOVSP opcode. */
- if (dst_regnum == STACK_POINTER_REGNUM)
- return (mode == SImode
-@@ -1044,7 +1047,7 @@
- return 1;
- }
-
-- if (! TARGET_CONST16)
-+ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16)
- {
- src = force_const_mem (SImode, src);
- operands[1] = src;
-@@ -2428,6 +2431,20 @@
- }
- break;
-
-+ case 'y':
-+ if (GET_CODE (x) == CONST_DOUBLE &&
-+ GET_MODE (x) == SFmode)
-+ {
-+ REAL_VALUE_TYPE r;
-+ long l;
-+ REAL_VALUE_FROM_CONST_DOUBLE (r, x);
-+ REAL_VALUE_TO_TARGET_SINGLE (r, l);
-+ fprintf (file, "0x%08lx", l);
-+ break;
-+ }
-+
-+ /* fall through */
-+
- default:
- if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
- fprintf (file, "%s", reg_names[xt_true_regnum (x)]);
-Index: b/gcc/config/xtensa/xtensa.md
-===================================================================
---- a/gcc/config/xtensa/xtensa.md
-+++ b/gcc/config/xtensa/xtensa.md
-@@ -799,8 +799,8 @@
- })
-
- (define_insn "movsi_internal"
-- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A")
-- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))]
-+ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A")
-+ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))]
- "xtensa_valid_move (SImode, operands)"
- "@
- movi.n\t%0, %x1
-@@ -812,15 +812,16 @@
- mov\t%0, %1
- movsp\t%0, %1
- movi\t%0, %x1
-+ movi\t%0, %1
- const16\t%0, %t1\;const16\t%0, %b1
- %v1l32r\t%0, %1
- %v1l32i\t%0, %1
- %v0s32i\t%1, %0
- rsr\t%0, ACCLO
- wsr\t%1, ACCLO"
-- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr")
-+ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr")
- (set_attr "mode" "SI")
-- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")])
-+ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")])
-
- ;; 16-bit Integer moves
-
-@@ -834,21 +835,22 @@
- })
-
- (define_insn "movhi_internal"
-- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A")
-- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))]
-+ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A")
-+ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))]
- "xtensa_valid_move (HImode, operands)"
- "@
- movi.n\t%0, %x1
- mov.n\t%0, %1
- mov\t%0, %1
- movi\t%0, %x1
-+ movi\t%0, %1
- %v1l16ui\t%0, %1
- %v0s16i\t%1, %0
- rsr\t%0, ACCLO
- wsr\t%1, ACCLO"
-- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr")
-+ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr")
- (set_attr "mode" "HI")
-- (set_attr "length" "2,2,3,3,3,3,3,3")])
-+ (set_attr "length" "2,2,3,3,3,3,3,3,3")])
-
- ;; 8-bit Integer moves
-
-@@ -919,7 +921,7 @@
- (match_operand:SF 1 "general_operand" ""))]
- ""
- {
-- if (!TARGET_CONST16 && CONSTANT_P (operands[1]))
-+ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1]))
- operands[1] = force_const_mem (SFmode, operands[1]);
-
- if ((!register_operand (operands[0], SFmode)
-@@ -934,8 +936,8 @@
- })
-
- (define_insn "movsf_internal"
-- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U")
-- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))]
-+ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U")
-+ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))]
- "((register_operand (operands[0], SFmode)
- || register_operand (operands[1], SFmode))
- && !(FP_REG_P (xt_true_regnum (operands[0]))
-@@ -950,13 +952,14 @@
- mov\t%0, %1
- wfr\t%0, %1
- rfr\t%0, %1
-+ movi\t%0, %y1
- const16\t%0, %t1\;const16\t%0, %b1
- %v1l32r\t%0, %1
- %v1l32i\t%0, %1
- %v0s32i\t%1, %0"
-- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store")
-+ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store")
- (set_attr "mode" "SF")
-- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")])
-+ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")])
-
- (define_insn "*lsiu"
- [(set (match_operand:SF 0 "register_operand" "=f")
-@@ -997,7 +1000,7 @@
- (match_operand:DF 1 "general_operand" ""))]
- ""
- {
-- if (CONSTANT_P (operands[1]) && !TARGET_CONST16)
-+ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS)
- operands[1] = force_const_mem (DFmode, operands[1]);
-
- if (!register_operand (operands[0], DFmode)
-@@ -1008,8 +1011,8 @@
- })
-
- (define_insn_and_split "movdf_internal"
-- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U")
-- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))]
-+ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U")
-+ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))]
- "register_operand (operands[0], DFmode)
- || register_operand (operands[1], DFmode)"
- "#"
-Index: b/gcc/config/xtensa/xtensa.opt
-===================================================================
---- a/gcc/config/xtensa/xtensa.opt
-+++ b/gcc/config/xtensa/xtensa.opt
-@@ -38,6 +38,10 @@
- Target
- Intersperse literal pools with code in the text section
-
-+mauto-litpools
-+Target Report Mask(AUTO_LITPOOLS)
-+Relax literals in assembler and place them automatically in the text section
-+
- mserialize-volatile
- Target Report Mask(SERIALIZE_VOLATILE)
- -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions
diff --git a/patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch b/patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch
deleted file mode 100644
index abc7a08..0000000
--- a/patches/gcc/4.9.4/871-xtensa-reimplement-register-spilling.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Mon, 10 Aug 2015 21:35:20 +0300
-Subject: [PATCH 1/3] xtensa: reimplement register spilling
-
-Spilling windowed registers in userspace is much easier, more portable,
-less error-prone and equally effective as in kernel. Now that register
-spilling syscall is considered obsolete in the xtensa linux kernel
-replace it with CALL12 followed by series of ENTRY in libgcc.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use
- CALL12 followed by series of ENTRY to spill windowed registers.
- (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill
- instead of making linux spill syscall.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226962
-
- libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 7 deletions(-)
-
-diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S
-index 3ac8c1d..2e678af 100644
---- a/libgcc/config/xtensa/lib2funcs.S
-+++ b/libgcc/config/xtensa/lib2funcs.S
-@@ -33,10 +33,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- .global __xtensa_libgcc_window_spill
- .type __xtensa_libgcc_window_spill,@function
- __xtensa_libgcc_window_spill:
-- entry sp, 32
-- movi a2, 0
-- syscall
-+ entry sp, 48
-+#if XCHAL_NUM_AREGS > 16
-+ call12 1f
-+ retw
-+ .align 4
-+1:
-+ .rept (XCHAL_NUM_AREGS - 24) / 12
-+ _entry sp, 48
-+ mov a12, a0
-+ .endr
-+ _entry sp, 16
-+#if XCHAL_NUM_AREGS % 12 == 0
-+ mov a4, a4
-+#elif XCHAL_NUM_AREGS % 12 == 4
-+ mov a8, a8
-+#elif XCHAL_NUM_AREGS % 12 == 8
-+ mov a12, a12
-+#endif
-+ retw
-+#else
-+ mov a8, a8
- retw
-+#endif
- .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill
-
-
-@@ -58,10 +77,7 @@ __xtensa_nonlocal_goto:
- entry sp, 32
-
- /* Flush registers. */
-- mov a5, a2
-- movi a2, 0
-- syscall
-- mov a2, a5
-+ call8 __xtensa_libgcc_window_spill
-
- /* Because the save area for a0-a3 is stored one frame below
- the one identified by a2, the only way to restore those
---
-1.8.1.4
-
diff --git a/patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
deleted file mode 100644
index f23a5c0..0000000
--- a/patches/gcc/4.9.4/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 14 Aug 2015 02:45:02 +0300
-Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
-
-This allows having exception cleanup code in binaries that don't
-register their unwind tables.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde
- with unwind-dw2-fde-dip.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226963
-
- libgcc/config/xtensa/t-xtensa | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/t-xtensa b/libgcc/config/xtensa/t-xtensa
-index 27399e6..66d0eb3 100644
---- a/libgcc/config/xtensa/t-xtensa
-+++ b/libgcc/config/xtensa/t-xtensa
-@@ -13,4 +13,4 @@ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 _udivsi3 _umodsi3 \
- LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S
-
- LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
-- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
-+ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
---
-1.8.1.4
-
diff --git a/patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch b/patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch
deleted file mode 100644
index dc40513..0000000
--- a/patches/gcc/4.9.4/873-xtensa-fix-_Unwind_GetCFA.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sat, 15 Aug 2015 05:12:11 +0300
-Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
-
-Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
-higher than what was actually used by code at context->ra. This results
-in invalid CFA value in signal frames and premature unwinding completion
-in forced unwinding used by uClibc NPTL thread cancellation.
-Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
-matching code that used them.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
- context->sp instead of context->cfa.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226964
-
- libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c
-index 35f7797..ef6b900 100644
---- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
-+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
-@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
- _Unwind_Word
- _Unwind_GetCFA (struct _Unwind_Context *context)
- {
-- return (_Unwind_Ptr) context->cfa;
-+ return (_Unwind_Ptr) context->sp;
- }
-
- /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */
---
-1.8.1.4
-
diff --git a/patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch b/patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch
deleted file mode 100644
index 881aec0..0000000
--- a/patches/gcc/4.9.4/874-xtensa-add-uclinux-support.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sat, 22 Aug 2015 08:44:26 +0300
-Subject: [PATCH] xtensa: add uclinux support
-
-2015-10-03 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config.gcc (xtensa*-*-uclinux*): New configuration.
- * config/xtensa/uclinux.h: New file.
- * config/xtensa/uclinux.opt: New file.
-
-libgcc/
- * config.host (xtensa*-*-uclinux*): New configuration.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r228450
-
- gcc/config.gcc | 5 ++++
- gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++
- gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++
- libgcc/config.host | 5 ++++
- 4 files changed, 111 insertions(+)
- create mode 100644 gcc/config/xtensa/uclinux.h
- create mode 100644 gcc/config/xtensa/uclinux.opt
-
-Index: b/gcc/config.gcc
-===================================================================
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2871,6 +2871,11 @@
- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
- tmake_file="${tmake_file} xtensa/t-xtensa"
- ;;
-+xtensa*-*-uclinux*)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
-+ tmake_file="${tmake_file} xtensa/t-xtensa"
-+ extra_options="${extra_options} xtensa/uclinux.opt"
-+ ;;
- am33_2.0-*-linux*)
- tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
- gas=yes gnu_ld=yes
-Index: b/gcc/config/xtensa/uclinux.h
-===================================================================
---- /dev/null
-+++ b/gcc/config/xtensa/uclinux.h
-@@ -0,0 +1,69 @@
-+/* Xtensa uClinux configuration.
-+ Derived from the configuration for GCC for Intel i386 running Linux.
-+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify it under
-+the terms of the GNU General Public License as published by the Free
-+Software Foundation; either version 3, or (at your option) any later
-+version.
-+
-+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-+WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ GNU_USER_TARGET_OS_CPP_BUILTINS (); \
-+ builtin_define ("__uClinux__"); \
-+ } \
-+ while (0)
-+
-+#undef SUBTARGET_CPP_SPEC
-+#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-+
-+#undef SIZE_TYPE
-+#define SIZE_TYPE "unsigned int"
-+
-+#undef PTRDIFF_TYPE
-+#define PTRDIFF_TYPE "int"
-+
-+#undef WCHAR_TYPE
-+#define WCHAR_TYPE "long int"
-+
-+#undef WCHAR_TYPE_SIZE
-+#define WCHAR_TYPE_SIZE 32
-+
-+#undef ASM_SPEC
-+#define ASM_SPEC \
-+ "%{mtext-section-literals:--text-section-literals} \
-+ %{mno-text-section-literals:--no-text-section-literals} \
-+ %{mtarget-align:--target-align} \
-+ %{mno-target-align:--no-target-align} \
-+ %{mlongcalls:--longcalls} \
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}"
-+
-+#undef LOCAL_LABEL_PREFIX
-+#define LOCAL_LABEL_PREFIX "."
-+
-+/* Always enable "-fpic" for Xtensa Linux. */
-+#define XTENSA_ALWAYS_PIC 1
-+
-+#undef TARGET_LIBC_HAS_FUNCTION
-+#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
-+
-+#undef DBX_REGISTER_NUMBER
-+
-Index: b/gcc/config/xtensa/uclinux.opt
-===================================================================
---- /dev/null
-+++ b/gcc/config/xtensa/uclinux.opt
-@@ -0,0 +1,32 @@
-+; Xtensa uClinux options.
-+
-+; Copyright (C) 2015 Free Software Foundation, Inc.
-+;
-+; This file is part of GCC.
-+;
-+; GCC is free software; you can redistribute it and/or modify it under
-+; the terms of the GNU General Public License as published by the Free
-+; Software Foundation; either version 3, or (at your option) any later
-+; version.
-+;
-+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+; for more details.
-+;
-+; You should have received a copy of the GNU General Public License
-+; along with GCC; see the file COPYING3. If not see
-+; <http://www.gnu.org/licenses/>.
-+
-+; See the GCC internals manual (options.texi) for a description of
-+; this file's format.
-+
-+; Please try to keep this file in ASCII collating order.
-+
-+elf2flt
-+Driver
-+
-+elf2flt=
-+Driver JoinedOrMissing
-+
-+; This comment is to ensure we retain the blank line above.
-Index: b/libgcc/config.host
-===================================================================
---- a/libgcc/config.host
-+++ b/libgcc/config.host
-@@ -1213,6 +1213,11 @@
- tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
- md_unwind_header=xtensa/linux-unwind.h
- ;;
-+xtensa*-*-uclinux*)
-+ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
-+ md_unwind_header=xtensa/linux-unwind.h
-+ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o"
-+ ;;
- am33_2.0-*-linux*)
- # Don't need crtbeginT.o from *-*-linux* default.
- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
diff --git a/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index 052ffc3..0000000
--- a/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 0f32ae7bc51725cd500e2877b571fd914d77852e Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 28 May 2017 19:56:56 -0700
-Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
-
-HOST_WIDE_INT may not be long as assumed in print_operand and
-xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
-format strings instead of %ld/0x%lx. This fixes incorrect assembly code
-generation by the compiler running on armhf host.
-
-2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (xtensa_emit_call): Use
- HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
- (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
- format string.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index d8c8298..3c00961 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1785,7 +1785,7 @@ xtensa_emit_call (int callop, rtx *operands)
- rtx tgt = operands[callop];
-
- if (GET_CODE (tgt) == CONST_INT)
-- sprintf (result, "call8\t0x%lx", INTVAL (tgt));
-+ sprintf (result, "call8\t" HOST_WIDE_INT_PRINT_HEX, INTVAL (tgt));
- else if (register_operand (tgt, VOIDmode))
- sprintf (result, "callx8\t%%%d", callop);
- else
-@@ -2360,14 +2360,14 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'L':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
- else
- output_operand_lossage ("invalid %%L value");
- break;
-
- case 'R':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
- else
- output_operand_lossage ("invalid %%R value");
- break;
-@@ -2381,7 +2381,7 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'd':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_operand_lossage ("invalid %%d value");
- break;
-@@ -2450,7 +2450,7 @@ print_operand (FILE *file, rtx x, int letter)
- else if (GET_CODE (x) == MEM)
- output_address (XEXP (x, 0));
- else if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_addr_const (file, x);
- }
---
-2.1.4
-
diff --git a/patches/gcc/4.9.4/880-nios2_legitimize_address.patch b/patches/gcc/4.9.4/880-nios2_legitimize_address.patch
deleted file mode 100644
index 4623f29..0000000
--- a/patches/gcc/4.9.4/880-nios2_legitimize_address.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From b0ea54f3f995754881e0ea6651133aa7b58eeaa2 Mon Sep 17 00:00:00 2001
-From: cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 22 Sep 2015 12:23:20 +0000
-Subject: [PATCH] nios2_legitimize_address 2015-09-22 Chung-Lin Tang
- <cltang@codesourcery.com>
-
- Backport from mainline
- 2015-09-22 Chung-Lin Tang <cltang@codesourcery.com>
-
- * config/nios2/nios2.c (nios2_legitimize_address): When handling
- 'reg + reloc' cases, allow first operand to be non-REG, and use
- force_reg() to enforce address pattern.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@228013 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Fixes:
-http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0
-
-[backported to 4.9.3]
-Signed-off-by: Romain Naour <romain.naour@gmail.com>
----
- gcc/config/nios2/nios2.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
-index 047b615..41dd6f9 100644
---- a/gcc/config/nios2/nios2.c
-+++ b/gcc/config/nios2/nios2.c
-@@ -1786,15 +1786,15 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
-
- Which will be output as '%tls_le(var+48)(r23)' in assembly. */
- if (GET_CODE (x) == PLUS
-- && GET_CODE (XEXP (x, 0)) == REG
- && GET_CODE (XEXP (x, 1)) == CONST)
- {
-- rtx unspec, offset, reg = XEXP (x, 0);
-+ rtx unspec, offset;
- split_const (XEXP (x, 1), &unspec, &offset);
- if (GET_CODE (unspec) == UNSPEC
- && !nios2_large_offset_p (XINT (unspec, 1))
- && offset != const0_rtx)
- {
-+ rtx reg = force_reg (Pmode, XEXP (x, 0));
- unspec = copy_rtx (unspec);
- XVECEXP (unspec, 0, 0)
- = plus_constant (Pmode, XVECEXP (unspec, 0, 0), INTVAL (offset));
---
-2.5.0
-
diff --git a/patches/gcc/4.9.4/890-fix-m68k-compile.patch b/patches/gcc/4.9.4/890-fix-m68k-compile.patch
deleted file mode 100644
index 140977b..0000000
--- a/patches/gcc/4.9.4/890-fix-m68k-compile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-remove unused header, which breaks the toolchain building
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-4.9.3.orig/libgcc/config/m68k/linux-atomic.c gcc-4.9.3/libgcc/config/m68k/linux-atomic.c
---- gcc-4.9.3.orig/libgcc/config/m68k/linux-atomic.c 2014-01-02 23:25:22.000000000 +0100
-+++ gcc-4.9.3/libgcc/config/m68k/linux-atomic.c 2016-03-18 22:24:40.000000000 +0100
-@@ -33,7 +33,6 @@
- using the kernel helper defined below. There is no support for
- 64-bit operations yet. */
-
--#include <asm/unistd.h>
- #include <stdbool.h>
-
- #ifndef __NR_atomic_cmpxchg_32
diff --git a/patches/gcc/4.9.4/891-fix-m68k-uclinux.patch b/patches/gcc/4.9.4/891-fix-m68k-uclinux.patch
deleted file mode 100644
index 4347642..0000000
--- a/patches/gcc/4.9.4/891-fix-m68k-uclinux.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-avoids internal compiler error while compiling linux-atomic.c
-See here:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-4.9.3.orig/libgcc/config.host gcc-4.9.3/libgcc/config.host
---- gcc-4.9.3.orig/libgcc/config.host 2014-03-27 16:40:31.000000000 +0100
-+++ gcc-4.9.3/libgcc/config.host 2016-04-05 16:20:53.422809885 +0200
-@@ -750,7 +750,7 @@
- m68k*-*-openbsd*)
- ;;
- m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
-- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
-+ tmake_file="$tmake_file m68k/t-floatlib"
- md_unwind_header=m68k/linux-unwind.h
- ;;
- m68k-*-linux*) # Motorola m68k's running GNU/Linux
diff --git a/patches/gcc/4.9.4/900-musl-support.patch b/patches/gcc/4.9.4/900-musl-support.patch
deleted file mode 100644
index a862d01..0000000
--- a/patches/gcc/4.9.4/900-musl-support.patch
+++ /dev/null
@@ -1,640 +0,0 @@
-Add musl support to gcc
-
-This patch comes from the musl-cross project at
-https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version:
-
- * the config.sub modifications have been removed, because Buildroot
- already overwrites all config.sub with a more recent config.sub
- that has musl support.
-
- * change to ensure that a dummy dynamic linker path
- MUSL_DYNAMIC_LINKER<foo> is defined for all architectures,
- otherwise building gcc for architectures not supported by musl was
- causing build failure. Bug reported upstream at
- https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on.
-
- * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic
- and only add the musl one as an addition, not as a replacement. Not
- doing this breaks C++ exception handling with glibc, because
- USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script
- not testing dl_iterate_phdr() on any system except Solaris.
-
-[Gustavo: remove upstream applied gcc/config/sh/sh.c chunk for 4.9.1]
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
-
-Index: b/fixincludes/mkfixinc.sh
-===================================================================
---- a/fixincludes/mkfixinc.sh
-+++ b/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
-Index: b/gcc/config.gcc
-===================================================================
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -594,7 +594,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -719,6 +719,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-@@ -2338,6 +2341,10 @@
- powerpc*-*-linux*paired*)
- tm_file="${tm_file} rs6000/750cl.h" ;;
- esac
-+ case ${target} in
-+ *-linux*-musl*)
-+ enable_secureplt=yes ;;
-+ esac
- if test x${enable_secureplt} = xyes; then
- tm_file="rs6000/secureplt.h ${tm_file}"
- fi
-Index: b/gcc/config/aarch64/aarch64-linux.h
-===================================================================
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -22,6 +22,8 @@
- #define GCC_AARCH64_LINUX_H
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1"
-
- #define CPP_SPEC "%{pthread:-D_REENTRANT}"
-
-Index: b/gcc/config/arm/linux-eabi.h
-===================================================================
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,6 +77,23 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-Index: b/gcc/config/i386/linux.h
-===================================================================
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -21,3 +21,5 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-Index: b/gcc/config/i386/linux64.h
-===================================================================
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -30,3 +30,10 @@
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#undef MUSL_DYNAMIC_LINKERX32
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-Index: b/gcc/config/linux.h
-===================================================================
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,10 +32,12 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -53,18 +55,21 @@
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -82,23 +87,103 @@
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
- #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
-
-+/* Musl dynamic linker paths must be defined on a per-architecture
-+ basis, for each architecture supported by Musl. However, in order
-+ to let other architectures continue to build with other C
-+ libraries, we provide a dummy definition of the following defines. */
-+#define MUSL_DYNAMIC_LINKER "invalid"
-+#define MUSL_DYNAMIC_LINKER32 "invalid"
-+#define MUSL_DYNAMIC_LINKER64 "invalid"
-+#define MUSL_DYNAMIC_LINKERX32 "invalid"
-+
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKER32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
- #define TARGET_HAS_BIONIC (OPTION_BIONIC)
-
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-+
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
- /* This is a *uclinux* target. We don't define below macros to normal linux
- versions, because doing so would require *uclinux* targets to include
-Index: b/gcc/config/linux.opt
-===================================================================
---- a/gcc/config/linux.opt
-+++ b/gcc/config/linux.opt
-@@ -30,3 +30,7 @@
- muclibc
- Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
-+Use musl C library
-Index: b/gcc/config/microblaze/linux.h
-===================================================================
---- a/gcc/config/microblaze/linux.h
-+++ b/gcc/config/microblaze/linux.h
-@@ -28,7 +28,23 @@
- #undef TLS_NEEDS_GOT
- #define TLS_NEEDS_GOT 1
-
--#define DYNAMIC_LINKER "/lib/ld.so.1"
-+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */
-+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
-+#endif
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
-+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
-+#else
-+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
-+#endif
-+
-+
- #undef SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
- { "dynamic_linker", DYNAMIC_LINKER }
-Index: b/gcc/config/rs6000/linux64.h
-===================================================================
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -371,17 +371,23 @@
- #endif
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
- #undef DEFAULT_ASM_ENDIAN
- #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
-Index: b/gcc/config/rs6000/secureplt.h
-===================================================================
---- a/gcc/config/rs6000/secureplt.h
-+++ b/gcc/config/rs6000/secureplt.h
-@@ -18,3 +18,4 @@
- <http://www.gnu.org/licenses/>. */
-
- #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
-+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
-Index: b/gcc/config/rs6000/sysv4.h
-===================================================================
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -537,6 +537,9 @@
- #ifndef CC1_SECURE_PLT_DEFAULT_SPEC
- #define CC1_SECURE_PLT_DEFAULT_SPEC ""
- #endif
-+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
-+#define LINK_SECURE_PLT_DEFAULT_SPEC ""
-+#endif
-
- /* Pass -G xxx to the compiler. */
- #define CC1_SPEC "%{G*} %(cc1_cpu)" \
-@@ -585,7 +588,8 @@
-
- /* Override the default target of the linker. */
- #define LINK_TARGET_SPEC \
-- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "")
-+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \
-+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
-
- /* Any specific OS flags. */
- #define LINK_OS_SPEC "\
-@@ -763,15 +767,18 @@
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-@@ -894,6 +901,7 @@
- { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
- { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
- { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
-+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \
- { "cpp_os_ads", CPP_OS_ADS_SPEC }, \
- { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
- { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
-Index: b/gcc/config/sh/linux.h
-===================================================================
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -43,7 +43,15 @@
-
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
-
-+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */
-+#define MUSL_DYNAMIC_LINKER_E "eb"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E
-+#endif
-+
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1"
-
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-Index: b/gcc/configure
-===================================================================
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27601,6 +27601,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-Index: b/gcc/configure.ac
-===================================================================
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5173,6 +5173,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-Index: b/gcc/ginclude/stddef.h
-===================================================================
---- a/gcc/ginclude/stddef.h
-+++ b/gcc/ginclude/stddef.h
-@@ -181,6 +181,7 @@
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -197,6 +198,7 @@
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -214,6 +216,7 @@
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
-Index: b/libgcc/unwind-dw2-fde-dip.c
-===================================================================
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -73,6 +73,13 @@
- && defined(TARGET_DL_ITERATE_PHDR) \
- && defined(__sun__) && defined(__svr4__)
- # define USE_PT_GNU_EH_FRAME
-+ #endif
-+
-+/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure
-+ script. */
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR)
-+# define USE_PT_GNU_EH_FRAME
- #endif
-
- #if defined(USE_PT_GNU_EH_FRAME)
-Index: b/libgomp/config/posix/time.c
-===================================================================
---- a/libgomp/config/posix/time.c
-+++ b/libgomp/config/posix/time.c
-@@ -28,6 +28,8 @@
- The following implementation uses the most simple POSIX routines.
- If present, POSIX 4 clocks should be used instead. */
-
-+#define _POSIX_C_SOURCE 199309L /* for clocks */
-+
- #include "libgomp.h"
- #include <unistd.h>
- #if TIME_WITH_SYS_TIME
-Index: b/libitm/config/arm/hwcap.cc
-===================================================================
---- a/libitm/config/arm/hwcap.cc
-+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,11 @@
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-Index: b/libitm/config/linux/x86/tls.h
-===================================================================
---- a/libitm/config/linux/x86/tls.h
-+++ b/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
-Index: b/libstdc++-v3/configure.host
-===================================================================
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -266,6 +266,13 @@
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
-+
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
-@@ -274,6 +281,9 @@
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
-Index: b/gcc/config/mips/linux64.h
-===================================================================
---- a/gcc/config/mips/linux64.h
-+++ b/gcc/config/mips/linux64.h
-@@ -41,4 +41,4 @@
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER)
-Index: b/gcc/config/mips/linux.h
-===================================================================
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -23,3 +23,11 @@
- #undef UCLIBC_DYNAMIC_LINKER
- #define UCLIBC_DYNAMIC_LINKER \
- "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+
-+#if TARGET_ENDIAN_DEFAULT == 0 /* LE */
-+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}"
-+#endif
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
diff --git a/patches/gcc/4.9.4/901-microblaze-uclibc.patch b/patches/gcc/4.9.4/901-microblaze-uclibc.patch
deleted file mode 100644
index 82c44e1..0000000
--- a/patches/gcc/4.9.4/901-microblaze-uclibc.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Add dynamic linker support for uClibc
-
-Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
-
-diff -Nur gcc-4.9.3.orig/gcc/config/microblaze/linux.h gcc-4.9.3/gcc/config/microblaze/linux.h
---- gcc-4.9.3.orig/gcc/config/microblaze/linux.h 2016-06-04 21:21:09.430646655 +0200
-+++ gcc-4.9.3/gcc/config/microblaze/linux.h 2016-06-04 21:21:44.596003509 +0200
-@@ -36,10 +36,13 @@
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1"
-+#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-
- #if DEFAULT_LIBC == LIBC_MUSL
- #define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER
-+#elif DEFAULT_LIBC == LIBC_UCLIBC
-+#define DYNAMIC_LINKER UCLIBC_DYNAMIC_LINKER
- #else
- #define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
- #endif
diff --git a/patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch b/patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch
deleted file mode 100644
index 670cf8d..0000000
--- a/patches/gcc/4.9.4/930-libgcc-disable-split-stack-nothreads.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-disable split-stack for non-thread builds
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-4.9.3.orig/libgcc/config/t-stack gcc-4.9.3/libgcc/config/t-stack
---- gcc-4.9.3.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
-+++ gcc-4.9.3/libgcc/config/t-stack 2016-03-07 01:34:32.000000000 +0100
-@@ -1,4 +1,6 @@
- # Makefile fragment to provide generic support for -fsplit-stack.
- # This should be used in config.host for any host which supports
- # -fsplit-stack.
-+ifeq ($(enable_threads),yes)
- LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
-+endif
diff --git a/patches/gcc/4.9.4/940-uclinux-enable-threads.patch b/patches/gcc/4.9.4/940-uclinux-enable-threads.patch
deleted file mode 100644
index 5108147..0000000
--- a/patches/gcc/4.9.4/940-uclinux-enable-threads.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Enable POSIX threads for uClinux targets
-Reported upstream:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-Index: b/gcc/config.gcc
-===================================================================
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -810,6 +810,9 @@
- *-*-uclinux*)
- extra_options="$extra_options gnu-user.opt"
- use_gcc_stdint=wrap
-+ case ${enable_threads} in
-+ "" | yes | posix) thread_file='posix' ;;
-+ esac
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
- ;;
- *-*-rdos*)
diff --git a/patches/gcc/5.4.0/100-uclibc-conf.patch b/patches/gcc/5.4.0/100-uclibc-conf.patch
deleted file mode 100644
index 73d1f0d..0000000
--- a/patches/gcc/5.4.0/100-uclibc-conf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: b/contrib/regression/objs-gcc.sh
-===================================================================
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
diff --git a/patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch b/patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch
deleted file mode 100644
index 0f4912a..0000000
--- a/patches/gcc/5.4.0/1000-libtool-leave-framework-alone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-5.4.0/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
-+++ gcc-5.4.0/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
-@@ -36,6 +36,11 @@
- for arg
- do
- case $arg in
-+ -framework)
-+ # libtool handles this option. It should not be prefixed with
-+ # -Xcompiler, as that would split it from the argument that
-+ # follows.
-+ ;;
- -f*|--*|-static-lib*|-shared-lib*|-B*)
- # Libtool does not ascribe any special meaning options
- # that begin with -f or with a double-dash. So, it will
diff --git a/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch b/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
deleted file mode 100644
index 3304532..0000000
--- a/patches/gcc/5.4.0/110-xtensa-implement-trap-pattern.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From d462e776df56a72f68545054f6d722bf447f0519 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Mon, 8 Jun 2015 22:29:11 +0300
-Subject: [PATCH] xtensa: implement trap pattern
-
-gcc/
- * config/xtensa/xtensa.h (TARGET_DEBUG): New definition.
- * config/xtensa/xtensa.md (define_attr "type"): New type "trap".
- (define_insn "trap"): New definition.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.h | 1 +
- gcc/config/xtensa/xtensa.md | 15 ++++++++++++++-
- 2 files changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
-index 011411c..584080b 100644
---- a/gcc/config/xtensa/xtensa.h
-+++ b/gcc/config/xtensa/xtensa.h
-@@ -67,6 +67,7 @@ extern unsigned xtensa_current_frame_size;
- #define TARGET_THREADPTR XCHAL_HAVE_THREADPTR
- #define TARGET_LOOPS XCHAL_HAVE_LOOPS
- #define TARGET_WINDOWED_ABI (XSHAL_ABI == XTHAL_ABI_WINDOWED)
-+#define TARGET_DEBUG XCHAL_HAVE_DEBUG
-
- #define TARGET_DEFAULT \
- ((XCHAL_HAVE_L32R ? 0 : MASK_CONST16) | \
-diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
-index 6d84384..a577aa3 100644
---- a/gcc/config/xtensa/xtensa.md
-+++ b/gcc/config/xtensa/xtensa.md
-@@ -86,7 +86,7 @@
- ;; Attributes.
-
- (define_attr "type"
-- "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,entry"
-+ "unknown,jump,call,load,store,move,arith,multi,nop,farith,fmadd,fconv,fload,fstore,mul16,mul32,div32,mac16,rsr,wsr,entry,trap"
- (const_string "unknown"))
-
- (define_attr "mode"
-@@ -1764,6 +1764,19 @@
- [(set_attr "length" "0")
- (set_attr "type" "nop")])
-
-+(define_insn "trap"
-+ [(trap_if (const_int 1) (const_int 0))]
-+ ""
-+{
-+ if (TARGET_DEBUG)
-+ return "break\t1, 15";
-+ else
-+ return (TARGET_DENSITY ? "ill.n" : "ill");
-+}
-+ [(set_attr "type" "trap")
-+ (set_attr "mode" "none")
-+ (set_attr "length" "3")])
-+
- ;; Setting up a frame pointer is tricky for Xtensa because GCC doesn't
- ;; know if a frame pointer is required until the reload pass, and
- ;; because there may be an incoming argument value in the hard frame
---
-1.8.1.4
-
diff --git a/patches/gcc/5.4.0/1100-msp430-string-literals.patch b/patches/gcc/5.4.0/1100-msp430-string-literals.patch
deleted file mode 100644
index 819d6d2..0000000
--- a/patches/gcc/5.4.0/1100-msp430-string-literals.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-commit 9d247a3d78b97c004e7ca5e7d6cc9964dba870c7
-Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed May 13 01:11:13 2015 +0000
-
- gcc/
- * config/mmix/mmix.c, config/msp430/msp430.c: Add space between
- string literal and macro name.
- gcc/ada/
- * sigtramp-vxworks.c: Add space between string literal and macro
- name.
-
- git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223106 138bc75d-0d04-0410-961f-82ee72b054a4
-
-diff --git a/gcc/ada/sigtramp-vxworks.c b/gcc/ada/sigtramp-vxworks.c
-index 2119296dc1d..c697626a03e 100644
---- a/gcc/ada/sigtramp-vxworks.c
-+++ b/gcc/ada/sigtramp-vxworks.c
-@@ -342,16 +342,16 @@ CR("") \
- TCR("# Allocate frame and save the non-volatile") \
- TCR("# registers we're going to modify") \
- TCR("mov ip, sp") \
--TCR("stmfd sp!, {r"S(CFA_REG)", fp, ip, lr, pc}") \
-+TCR("stmfd sp!, {r" S(CFA_REG)", fp, ip, lr, pc}") \
- TCR("# Setup CFA_REG = context, which we'll retrieve as our CFA value") \
--TCR("ldr r"S(CFA_REG)", [ip]") \
-+TCR("ldr r" S(CFA_REG)", [ip]") \
- TCR("") \
- TCR("# Call the real handler. The signo, siginfo and sigcontext") \
- TCR("# arguments are the same as those we received in r0, r1 and r2") \
- TCR("sub fp, ip, #4") \
- TCR("blx r3") \
- TCR("# Restore our callee-saved items, release our frame and return") \
--TCR("ldmfd sp, {r"S(CFA_REG)", fp, sp, pc}")
-+TCR("ldmfd sp, {r" S(CFA_REG)", fp, sp, pc}")
-
- #else
- Not_implemented;
-diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
-index 6e991207dbc..e0699854e25 100644
---- a/gcc/config/mmix/mmix.c
-+++ b/gcc/config/mmix/mmix.c
-@@ -2520,7 +2520,7 @@ mmix_output_shiftvalue_op_from_str (FILE *stream,
- if (! mmix_shiftable_wyde_value (value))
- {
- char s[sizeof ("0xffffffffffffffff")];
-- sprintf (s, "%#"PRIx64, value);
-+ sprintf (s, "%#" PRIx64, value);
- internal_error ("MMIX Internal: %s is not a shiftable int", s);
- }
-
-@@ -2562,7 +2562,7 @@ mmix_output_octa (FILE *stream, int64_t value, int do_begin_end)
- fprintf (stream, "#" HOST_WIDE_INT_PRINT_HEX_PURE,
- (HOST_WIDE_INT) value);
- else /* Need to avoid the hex output; there's no ...WIDEST...HEX_PURE. */
-- fprintf (stream, "%"PRIu64, value);
-+ fprintf (stream, "%" PRIu64, value);
-
- if (do_begin_end)
- fprintf (stream, "\n");
-@@ -2579,7 +2579,7 @@ mmix_output_shifted_value (FILE *stream, int64_t value)
- if (! mmix_shiftable_wyde_value (value))
- {
- char s[16+2+1];
-- sprintf (s, "%#"PRIx64, value);
-+ sprintf (s, "%#" PRIx64, value);
- internal_error ("MMIX Internal: %s is not a shiftable int", s);
- }
-
-diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
-index bec168ca2ae..58d0efea1de 100644
---- a/gcc/config/msp430/msp430.c
-+++ b/gcc/config/msp430/msp430.c
-@@ -2248,7 +2248,7 @@ static struct
- }
- const_shift_helpers[] =
- {
--#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G }
-+#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G }
-
- CSH ("slli", 1, 1, slli_1),
- CSH ("slll", 1, 1, slll_1),
diff --git a/patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch b/patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/patches/gcc/5.4.0/111-alpha-bad-eh_frame.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
-
-diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha
-index 0b6ffb1..0c2f840 100644
---- a/libgcc/config/alpha/t-alpha
-+++ b/libgcc/config/alpha/t-alpha
-@@ -1,2 +1,6 @@
- # This is a support routine for longlong.h, used by libgcc2.c.
- LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
-+
-+# When GAS-generated unwind tables are created, they get created
-+# after the __FRAME_END__ terminator, which causes an ld error.
-+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
diff --git a/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
deleted file mode 100644
index c11ad35..0000000
--- a/patches/gcc/5.4.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001
-From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
-Date: Fri, 6 Nov 2015 14:27:23 +0100
-Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit
-
-Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate
-64-bit binaries by default.
-
-Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
----
- gcc/config.gcc | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 4a7cbd2..9cc765e 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -439,7 +439,7 @@ powerpc*-*-*)
- cpu_type=rs6000
- extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h"
- case x$with_cpu in
-- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
-+ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
- cpu_is_64bit=yes
- ;;
- esac
---
-2.6.2
-
diff --git a/patches/gcc/5.4.0/301-missing-execinfo_h.patch b/patches/gcc/5.4.0/301-missing-execinfo_h.patch
deleted file mode 100644
index 2d0e7ba..0000000
--- a/patches/gcc/5.4.0/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: b/boehm-gc/include/gc.h
-===================================================================
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
deleted file mode 100644
index d8986d5..0000000
--- a/patches/gcc/5.4.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4
---- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000
-+++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000
-@@ -20,6 +20,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -30,6 +33,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -81,17 +89,17 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- AC_MSG_CHECKING([for -fPIC -shared])
-+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
- AC_TRY_LINK(
-- [extern int X;],[return X == 0;],
-+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
- [AC_MSG_RESULT([yes]); have_pic_shared=yes],
- [AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
-diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure
---- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000
-+++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000
-@@ -28386,6 +28386,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -28396,6 +28399,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -28508,23 +28516,23 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
-diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure
---- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000
-+++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000
-@@ -14500,6 +14500,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -14510,6 +14513,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -14622,23 +14630,23 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
diff --git a/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
deleted file mode 100644
index 12ef48e..0000000
--- a/patches/gcc/5.4.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc
---- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000
-+++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000
-@@ -21,6 +21,7 @@
- #include <string>
- #include <unistd.h>
- #include <sys/types.h>
-+#include <sys/select.h>
- #include <string.h>
- #include <errno.h>
- #include "marshall.hh"
diff --git a/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch b/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch
deleted file mode 100644
index 5efa7fd..0000000
--- a/patches/gcc/5.4.0/810-arm-softfloat-libgcc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: b/gcc/config/arm/linux-elf.h
-===================================================================
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -60,7 +60,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-Index: b/libgcc/config/arm/t-linux
-===================================================================
---- a/libgcc/config/arm/t-linux
-+++ b/libgcc/config/arm/t-linux
-@@ -1,6 +1,11 @@
- LIB1ASMSRC = arm/lib1funcs.S
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
-+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
-+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
-+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
-+ _arm_fixsfsi _arm_fixunssfsi
-
- # Just for these, we omit the frame pointer since it makes such a big
- # difference.
diff --git a/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch b/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch
deleted file mode 100644
index b730059..0000000
--- a/patches/gcc/5.4.0/830-arm_unbreak_armv4t.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
-
-Index: b/gcc/config/arm/linux-eabi.h
-===================================================================
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
- The ARM10TDMI core is the default for armv5t, so set
- SUBTARGET_CPU_DEFAULT to achieve this. */
- #undef SUBTARGET_CPU_DEFAULT
--#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
-
- /* TARGET_BIG_ENDIAN_DEFAULT is set in
- config.gcc for big endian configurations. */
diff --git a/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch b/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
deleted file mode 100644
index 9d29090..0000000
--- a/patches/gcc/5.4.0/840-microblaze-enable-dwarf-eh-support.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc
-
-From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001
-From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
-Date: Mon, 18 Jun 2012 20:18:13 +0200
-Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support.
-
-Changelog
-
-2013-03-18 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
- David Holsgrove <david.holsgrove@xilinx.com>
-
- * common/config/microblaze/microblaze-common.c: Remove
- TARGET_EXCEPT_UNWIND_INFO definition.
- * config/microblaze/microblaze-protos.h: Add
- microblaze_eh_return prototype.
- * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register,
- microblaze_expand_epilogue, microblaze_return_addr): Handle
- calls_eh_return
- (microblaze_eh_return): New function.
- * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET,
- EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX,
- ASM_PREFERRED_EH_DATA_FORMAT
- * gcc/config/microblaze/microblaze.md: Define eh_return pattern.
-
-Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
-Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
----
- gcc/common/config/microblaze/microblaze-common.c | 3 ---
- gcc/config/microblaze/microblaze-protos.h | 1 +
- gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++----
- gcc/config/microblaze/microblaze.h | 15 ++++++++++++
- gcc/config/microblaze/microblaze.md | 11 +++++++++
- 5 files changed, 52 insertions(+), 7 deletions(-)
-
-Index: b/gcc/common/config/microblaze/microblaze-common.c
-===================================================================
---- a/gcc/common/config/microblaze/microblaze-common.c
-+++ b/gcc/common/config/microblaze/microblaze-common.c
-@@ -37,7 +37,4 @@
- #undef TARGET_OPTION_OPTIMIZATION_TABLE
- #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
-
--#undef TARGET_EXCEPT_UNWIND_INFO
--#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
--
- struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
-Index: b/gcc/config/microblaze/microblaze-protos.h
-===================================================================
---- a/gcc/config/microblaze/microblaze-protos.h
-+++ b/gcc/config/microblaze/microblaze-protos.h
-@@ -56,6 +56,7 @@
- extern int symbol_mentioned_p (rtx);
- extern int label_mentioned_p (rtx);
- extern bool microblaze_cannot_force_const_mem (machine_mode, rtx);
-+extern void microblaze_eh_return (rtx op0);
- #endif /* RTX_CODE */
-
- /* Declare functions in microblaze-c.c. */
-Index: b/gcc/config/microblaze/microblaze.c
-===================================================================
---- a/gcc/config/microblaze/microblaze.c
-+++ b/gcc/config/microblaze/microblaze.c
-@@ -1959,6 +1959,11 @@
- if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM))
- return 1;
-
-+ if (crtl->calls_eh_return
-+ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) {
-+ return 1;
-+ }
-+
- if (!crtl->is_leaf)
- {
- if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM)
-@@ -1986,6 +1991,13 @@
- return 1;
- }
-
-+ if (crtl->calls_eh_return
-+ && (regno == EH_RETURN_DATA_REGNO (0)
-+ || regno == EH_RETURN_DATA_REGNO (1)))
-+ {
-+ return 1;
-+ }
-+
- return 0;
- }
-
-@@ -3067,6 +3079,12 @@
- emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx));
- }
-
-+ if (crtl->calls_eh_return)
-+ emit_insn (gen_addsi3 (stack_pointer_rtx,
-+ stack_pointer_rtx,
-+ gen_rtx_raw_REG (SImode,
-+ MB_EH_STACKADJ_REGNUM)));
-+
- emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST +
- MB_ABI_SUB_RETURN_ADDR_REGNUM)));
- }
-@@ -3364,10 +3382,13 @@
- if (count != 0)
- return NULL_RTX;
-
-- return gen_rtx_PLUS (Pmode,
-- get_hard_reg_initial_val (Pmode,
-- MB_ABI_SUB_RETURN_ADDR_REGNUM),
-- GEN_INT (8));
-+ return get_hard_reg_initial_val (Pmode,
-+ MB_ABI_SUB_RETURN_ADDR_REGNUM);
-+}
-+
-+void microblaze_eh_return (rtx op0)
-+{
-+ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0));
- }
-
- /* Queue an .ident string in the queue of top-level asm statements.
-Index: b/gcc/config/microblaze/microblaze.h
-===================================================================
---- a/gcc/config/microblaze/microblaze.h
-+++ b/gcc/config/microblaze/microblaze.h
-@@ -184,6 +184,21 @@
- #define INCOMING_RETURN_ADDR_RTX \
- gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM)
-
-+/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */
-+#define RETURN_ADDR_OFFSET (8)
-+
-+/* Describe how we implement __builtin_eh_return. */
-+#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM)
-+
-+#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM
-+#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM)
-+
-+/* Select a format to encode pointers in exception handling data. CODE
-+ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
-+ true if the symbol may be affected by dynamic relocations. */
-+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
-+ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
-+
- /* Use DWARF 2 debugging information by default. */
- #define DWARF2_DEBUGGING_INFO
- #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-Index: b/gcc/config/microblaze/microblaze.md
-===================================================================
---- a/gcc/config/microblaze/microblaze.md
-+++ b/gcc/config/microblaze/microblaze.md
-@@ -2272,4 +2272,15 @@
- (set_attr "mode" "SI")
- (set_attr "length" "4")])
-
-+; This is used in compiling the unwind routines.
-+(define_expand "eh_return"
-+ [(use (match_operand 0 "general_operand" ""))]
-+ ""
-+ "
-+{
-+ microblaze_eh_return(operands[0]);
-+ DONE;
-+}")
-+
- (include "sync.md")
-+
diff --git a/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch b/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
deleted file mode 100644
index 9e97d94..0000000
--- a/patches/gcc/5.4.0/850-libstdcxx-uclibc-c99.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-Allow C99-depending features of libstdc++ with uClibc
-
-The libstdc++ code is fairly restrictive on how it checks for C99
-compatibility: it requires *complete* C99 support to enable certain
-features. For example, uClibc provides a good number of C99 features,
-but not C99 complex number support. For this reason, libstdc++
-completely disables many the standard C++ methods that can in fact
-work because uClibc provides the necessary functions.
-
-This patch is similar and highly inspired from
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
-a way that doesn't involve changing the configure.ac script, as
-autoreconfiguring gcc is complicated. It simply relies on the fact
-that uClibc defines the __UCLIBC__ definition.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/libstdc++-v3/config/locale/generic/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -70,7 +70,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/config/locale/gnu/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/gnu/c_locale.h
-+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
-@@ -88,7 +88,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/include/bits/basic_string.h
-===================================================================
---- a/libstdc++-v3/include/bits/basic_string.h
-+++ b/libstdc++-v3/include/bits/basic_string.h
-@@ -5239,7 +5239,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99)
-+#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))
-
- #include <ext/string_conversions.h>
-
-Index: b/libstdc++-v3/include/bits/locale_facets.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets.tcc
-@@ -992,7 +992,7 @@
- char __fbuf[16];
- __num_base::_S_format_float(__io, __fbuf, __mod);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- // Precision is always used except for hexfloat format.
- const bool __use_prec =
- (__io.flags() & ios_base::floatfield) != ios_base::floatfield;
-Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc
-@@ -578,7 +578,7 @@
- {
- const locale __loc = __io.getloc();
- const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc);
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- // First try a buffer perhaps big enough.
- int __cs_size = 64;
- char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
-Index: b/libstdc++-v3/include/c_compatibility/math.h
-===================================================================
---- a/libstdc++-v3/include/c_compatibility/math.h
-+++ b/libstdc++-v3/include/c_compatibility/math.h
-@@ -56,7 +56,7 @@
- using std::floor;
- using std::fmod;
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::fpclassify;
- using std::isfinite;
- using std::isinf;
-Index: b/libstdc++-v3/include/c_compatibility/wchar.h
-===================================================================
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -103,7 +103,7 @@
- using std::wmemset;
- using std::wcsftime;
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/c_global/cstdlib
-===================================================================
---- a/libstdc++-v3/include/c_global/cstdlib
-+++ b/libstdc++-v3/include/c_global/cstdlib
-@@ -195,7 +195,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef _Exit
- #undef llabs
-Index: b/libstdc++-v3/include/c_global/cwchar
-===================================================================
---- a/libstdc++-v3/include/c_global/cwchar
-+++ b/libstdc++-v3/include/c_global/cwchar
-@@ -232,7 +232,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef wcstold
- #undef wcstoll
-@@ -289,7 +289,7 @@
- using std::vwscanf;
- #endif
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/c_std/cstdio
-===================================================================
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@
- using ::vsprintf;
- } // namespace std
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
-Index: b/libstdc++-v3/include/c_std/cstdlib
-===================================================================
---- a/libstdc++-v3/include/c_std/cstdlib
-+++ b/libstdc++-v3/include/c_std/cstdlib
-@@ -192,7 +192,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef _Exit
- #undef llabs
-Index: b/libstdc++-v3/include/c_std/cwchar
-===================================================================
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -228,7 +228,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef wcstold
- #undef wcstoll
-Index: b/libstdc++-v3/include/ext/vstring.h
-===================================================================
---- a/libstdc++-v3/include/ext/vstring.h
-+++ b/libstdc++-v3/include/ext/vstring.h
-@@ -2680,7 +2680,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99))
-+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)))
-
- #include <ext/string_conversions.h>
-
-Index: b/libstdc++-v3/include/tr1/cstdio
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdio
-+++ b/libstdc++-v3/include/tr1/cstdio
-@@ -33,7 +33,7 @@
-
- #include <cstdio>
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-Index: b/libstdc++-v3/include/tr1/cstdlib
-===================================================================
---- a/libstdc++-v3/include/tr1/cstdlib
-+++ b/libstdc++-v3/include/tr1/cstdlib
-@@ -35,7 +35,7 @@
-
- #if _GLIBCXX_HOSTED
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- namespace std _GLIBCXX_VISIBILITY(default)
- {
-Index: b/libstdc++-v3/include/tr1/cwchar
-===================================================================
---- a/libstdc++-v3/include/tr1/cwchar
-+++ b/libstdc++-v3/include/tr1/cwchar
-@@ -52,7 +52,7 @@
- using std::vwscanf;
- #endif
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- using std::wcstold;
- using std::wcstoll;
- using std::wcstoull;
-Index: b/libstdc++-v3/include/tr1/stdlib.h
-===================================================================
---- a/libstdc++-v3/include/tr1/stdlib.h
-+++ b/libstdc++-v3/include/tr1/stdlib.h
-@@ -33,7 +33,7 @@
-
- #if _GLIBCXX_HOSTED
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- using std::tr1::atoll;
- using std::tr1::strtoll;
-Index: b/libstdc++-v3/src/c++11/debug.cc
-===================================================================
---- a/libstdc++-v3/src/c++11/debug.cc
-+++ b/libstdc++-v3/src/c++11/debug.cc
-@@ -788,7 +788,7 @@
- int __n __attribute__ ((__unused__)),
- const char* __fmt, _Tp __s) const throw ()
- {
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- std::snprintf(__buf, __n, __fmt, __s);
- #else
- std::sprintf(__buf, __fmt, __s);
-Index: b/libstdc++-v3/include/c_global/cstdio
-===================================================================
---- a/libstdc++-v3/include/c_global/cstdio
-+++ b/libstdc++-v3/include/c_global/cstdio
-@@ -146,7 +146,7 @@
- using ::vsprintf;
- } // namespace
-
--#if _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
-
- #undef snprintf
- #undef vfscanf
diff --git a/patches/gcc/5.4.0/860-cilk-wchar.patch b/patches/gcc/5.4.0/860-cilk-wchar.patch
deleted file mode 100644
index 1d9916f..0000000
--- a/patches/gcc/5.4.0/860-cilk-wchar.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] cilk: fix build without wchar
-
-When building against uClibc with wchar support disabled, WCHAR_MIN and
-WCHAR_MAX are not defined leading to compilation errors.
-
-Fix it by only including the wchar code if available.
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
- libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-Index: b/libcilkrts/include/cilk/reducer_min_max.h
-===================================================================
---- a/libcilkrts/include/cilk/reducer_min_max.h
-+++ b/libcilkrts/include/cilk/reducer_min_max.h
-@@ -3154,7 +3154,9 @@
- CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
-@@ -3306,7 +3308,9 @@
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
-@@ -3432,7 +3436,9 @@
- CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
-@@ -3584,7 +3590,9 @@
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
diff --git a/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch b/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
deleted file mode 100644
index aa1376c..0000000
--- a/patches/gcc/5.4.0/870-xtensa-add-mauto-litpools-option.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Thu, 6 Aug 2015 01:16:02 +0300
-Subject: [PATCH] xtensa: add -mauto-litpools option
-
-With support from assembler this option allows compiling huge functions,
-where single literal pool at the beginning of a function may not be
-reachable by L32R instructions at its end.
-
-Currently assembler --auto-litpools option cannot deal with literals
-used from multiple locations separated by more than 256 KBytes of code.
-Don't turn constants into literals, instead use MOVI instruction to load
-them into registers and let the assembler turn them into literals as
-necessary.
-
-2015-08-12 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/constraints.md (define_constraint "Y"): New
- constraint.
- * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools.
- * config/xtensa/linux.h (ASM_SPEC): Likewise.
- * config/xtensa/predicates.md (move_operand): Match constants
- and symbols in the presence of TARGET_AUTO_LITPOOLS.
- * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow
- immediate references to TLS data.
- (xtensa_emit_move_sequence): Don't force constants to memory in
- the presence of TARGET_AUTO_LITPOOLS.
- (print_operand): Add 'y' format, same as default, but capable of
- printing SF mode constants as well.
- * config/xtensa/xtensa.md (movsi_internal, movhi_internal)
- (movsf_internal): Add movi pattern that loads literal.
- (movsf, movdf): Don't force constants to memory in the presence
- of TARGET_AUTO_LITPOOLS.
- (movdf_internal): Add 'Y' constraint.
- * config/xtensa/xtensa.opt (mauto-litpools): New option.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226828
-Changes to ChangeLogs and documentation are dropped.
-
- gcc/config/xtensa/constraints.md | 5 +++++
- gcc/config/xtensa/elf.h | 4 +++-
- gcc/config/xtensa/linux.h | 4 +++-
- gcc/config/xtensa/predicates.md | 3 ++-
- gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++-
- gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++----------------
- gcc/config/xtensa/xtensa.opt | 4 ++++
- 7 files changed, 54 insertions(+), 20 deletions(-)
-
-diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md
-index 30f4c1f..773d4f9 100644
---- a/gcc/config/xtensa/constraints.md
-+++ b/gcc/config/xtensa/constraints.md
-@@ -111,6 +111,11 @@
- (and (match_code "const_int")
- (match_test "xtensa_mask_immediate (ival)")))
-
-+(define_constraint "Y"
-+ "A constant that can be used in relaxed MOVI instructions."
-+ (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
-+ (match_test "TARGET_AUTO_LITPOOLS")))
-+
- ;; Memory constraints. Do not use define_memory_constraint here. Doing so
- ;; causes reload to force some constants into the constant pool, but since
- ;; the Xtensa constant pool can only be accessed with L32R instructions, it
-diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h
-index e59bede..12056f7 100644
---- a/gcc/config/xtensa/elf.h
-+++ b/gcc/config/xtensa/elf.h
-@@ -48,7 +48,9 @@ along with GCC; see the file COPYING3. If not see
- %{mtarget-align:--target-align} \
- %{mno-target-align:--no-target-align} \
- %{mlongcalls:--longcalls} \
-- %{mno-longcalls:--no-longcalls}"
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-
- #undef LIB_SPEC
- #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal"
-diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h
-index 675aacf..5b0243a 100644
---- a/gcc/config/xtensa/linux.h
-+++ b/gcc/config/xtensa/linux.h
-@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see
- %{mtarget-align:--target-align} \
- %{mno-target-align:--no-target-align} \
- %{mlongcalls:--longcalls} \
-- %{mno-longcalls:--no-longcalls}"
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-
-diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md
-index e02209e..d7dfa11 100644
---- a/gcc/config/xtensa/predicates.md
-+++ b/gcc/config/xtensa/predicates.md
-@@ -142,7 +142,8 @@
- (match_test "GET_MODE_CLASS (mode) == MODE_INT
- && xtensa_simm12b (INTVAL (op))"))
- (and (match_code "const_int,const_double,const,symbol_ref,label_ref")
-- (match_test "TARGET_CONST16 && CONSTANT_P (op)
-+ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS)
-+ && CONSTANT_P (op)
- && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0")))))
-
- ;; Accept the floating point constant 1 in the appropriate mode.
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index eb039ba..206ff80 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -501,6 +501,9 @@ xtensa_valid_move (machine_mode mode, rtx *operands)
- {
- int dst_regnum = xt_true_regnum (operands[0]);
-
-+ if (xtensa_tls_referenced_p (operands[1]))
-+ return FALSE;
-+
- /* The stack pointer can only be assigned with a MOVSP opcode. */
- if (dst_regnum == STACK_POINTER_REGNUM)
- return !TARGET_WINDOWED_ABI
-@@ -1069,7 +1072,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode)
- return 1;
- }
-
-- if (! TARGET_CONST16)
-+ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16)
- {
- src = force_const_mem (SImode, src);
- operands[1] = src;
-@@ -2449,6 +2452,20 @@ print_operand (FILE *file, rtx x, int letter)
- }
- break;
-
-+ case 'y':
-+ if (GET_CODE (x) == CONST_DOUBLE &&
-+ GET_MODE (x) == SFmode)
-+ {
-+ REAL_VALUE_TYPE r;
-+ long l;
-+ REAL_VALUE_FROM_CONST_DOUBLE (r, x);
-+ REAL_VALUE_TO_TARGET_SINGLE (r, l);
-+ fprintf (file, "0x%08lx", l);
-+ break;
-+ }
-+
-+ /* fall through */
-+
- default:
- if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
- fprintf (file, "%s", reg_names[xt_true_regnum (x)]);
-diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
-index 6d84384..0e673a3 100644
---- a/gcc/config/xtensa/xtensa.md
-+++ b/gcc/config/xtensa/xtensa.md
-@@ -761,8 +761,8 @@
- })
-
- (define_insn "movsi_internal"
-- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A")
-- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))]
-+ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A")
-+ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))]
- "xtensa_valid_move (SImode, operands)"
- "@
- movi.n\t%0, %x1
-@@ -774,15 +774,16 @@
- mov\t%0, %1
- movsp\t%0, %1
- movi\t%0, %x1
-+ movi\t%0, %1
- const16\t%0, %t1\;const16\t%0, %b1
- %v1l32r\t%0, %1
- %v1l32i\t%0, %1
- %v0s32i\t%1, %0
- rsr\t%0, ACCLO
- wsr\t%1, ACCLO"
-- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr")
-+ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr")
- (set_attr "mode" "SI")
-- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")])
-+ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")])
-
- ;; 16-bit Integer moves
-
-@@ -796,21 +797,22 @@
- })
-
- (define_insn "movhi_internal"
-- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A")
-- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))]
-+ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A")
-+ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))]
- "xtensa_valid_move (HImode, operands)"
- "@
- movi.n\t%0, %x1
- mov.n\t%0, %1
- mov\t%0, %1
- movi\t%0, %x1
-+ movi\t%0, %1
- %v1l16ui\t%0, %1
- %v0s16i\t%1, %0
- rsr\t%0, ACCLO
- wsr\t%1, ACCLO"
-- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr")
-+ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr")
- (set_attr "mode" "HI")
-- (set_attr "length" "2,2,3,3,3,3,3,3")])
-+ (set_attr "length" "2,2,3,3,3,3,3,3,3")])
-
- ;; 8-bit Integer moves
-
-@@ -881,7 +883,7 @@
- (match_operand:SF 1 "general_operand" ""))]
- ""
- {
-- if (!TARGET_CONST16 && CONSTANT_P (operands[1]))
-+ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1]))
- operands[1] = force_const_mem (SFmode, operands[1]);
-
- if ((!register_operand (operands[0], SFmode)
-@@ -896,8 +898,8 @@
- })
-
- (define_insn "movsf_internal"
-- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U")
-- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))]
-+ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U")
-+ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))]
- "((register_operand (operands[0], SFmode)
- || register_operand (operands[1], SFmode))
- && !(FP_REG_P (xt_true_regnum (operands[0]))
-@@ -912,13 +914,14 @@
- mov\t%0, %1
- wfr\t%0, %1
- rfr\t%0, %1
-+ movi\t%0, %y1
- const16\t%0, %t1\;const16\t%0, %b1
- %v1l32r\t%0, %1
- %v1l32i\t%0, %1
- %v0s32i\t%1, %0"
-- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store")
-+ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store")
- (set_attr "mode" "SF")
-- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")])
-+ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")])
-
- (define_insn "*lsiu"
- [(set (match_operand:SF 0 "register_operand" "=f")
-@@ -991,7 +994,7 @@
- (match_operand:DF 1 "general_operand" ""))]
- ""
- {
-- if (CONSTANT_P (operands[1]) && !TARGET_CONST16)
-+ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS)
- operands[1] = force_const_mem (DFmode, operands[1]);
-
- if (!register_operand (operands[0], DFmode)
-@@ -1002,8 +1005,8 @@
- })
-
- (define_insn_and_split "movdf_internal"
-- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U")
-- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))]
-+ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U")
-+ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))]
- "register_operand (operands[0], DFmode)
- || register_operand (operands[1], DFmode)"
- "#"
-diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt
-index 2fd6cee..21c6e96 100644
---- a/gcc/config/xtensa/xtensa.opt
-+++ b/gcc/config/xtensa/xtensa.opt
-@@ -38,6 +38,10 @@ mtext-section-literals
- Target
- Intersperse literal pools with code in the text section
-
-+mauto-litpools
-+Target Report Mask(AUTO_LITPOOLS)
-+Relax literals in assembler and place them automatically in the text section
-+
- mserialize-volatile
- Target Report Mask(SERIALIZE_VOLATILE)
- -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions
---
-1.8.1.4
-
diff --git a/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch b/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
deleted file mode 100644
index 4056f8b..0000000
--- a/patches/gcc/5.4.0/871-xtensa-reimplement-register-spilling.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 40507bf199440082ed69b777986d50c31efe2520 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Mon, 10 Aug 2015 21:35:20 +0300
-Subject: [PATCH 1/3] xtensa: reimplement register spilling
-
-Spilling windowed registers in userspace is much easier, more portable,
-less error-prone and equally effective as in kernel. Now that register
-spilling syscall is considered obsolete in the xtensa linux kernel
-replace it with CALL12 followed by series of ENTRY in libgcc.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use
- CALL12 followed by series of ENTRY to spill windowed registers.
- (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill
- instead of making linux spill syscall.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226962
-
- libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++-------
- 1 file changed, 23 insertions(+), 7 deletions(-)
-
-diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S
-index 4d451c8..ef0703f 100644
---- a/libgcc/config/xtensa/lib2funcs.S
-+++ b/libgcc/config/xtensa/lib2funcs.S
-@@ -34,10 +34,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- .global __xtensa_libgcc_window_spill
- .type __xtensa_libgcc_window_spill,@function
- __xtensa_libgcc_window_spill:
-- entry sp, 32
-- movi a2, 0
-- syscall
-+ entry sp, 48
-+#if XCHAL_NUM_AREGS > 16
-+ call12 1f
-+ retw
-+ .align 4
-+1:
-+ .rept (XCHAL_NUM_AREGS - 24) / 12
-+ _entry sp, 48
-+ mov a12, a0
-+ .endr
-+ _entry sp, 16
-+#if XCHAL_NUM_AREGS % 12 == 0
-+ mov a4, a4
-+#elif XCHAL_NUM_AREGS % 12 == 4
-+ mov a8, a8
-+#elif XCHAL_NUM_AREGS % 12 == 8
-+ mov a12, a12
-+#endif
- retw
-+#else
-+ mov a8, a8
-+ retw
-+#endif
- .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill
- #endif
-
-@@ -61,10 +80,7 @@ __xtensa_nonlocal_goto:
- entry sp, 32
-
- /* Flush registers. */
-- mov a5, a2
-- movi a2, 0
-- syscall
-- mov a2, a5
-+ call8 __xtensa_libgcc_window_spill
-
- /* Because the save area for a0-a3 is stored one frame below
- the one identified by a2, the only way to restore those
---
-1.8.1.4
-
diff --git a/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
deleted file mode 100644
index 9707f68..0000000
--- a/patches/gcc/5.4.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7d7a85f75ba218df4a4226e95865fc8fa561cb86 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 14 Aug 2015 02:45:02 +0300
-Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
-
-This allows having exception cleanup code in binaries that don't
-register their unwind tables.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde
- with unwind-dw2-fde-dip.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226963
-
- libgcc/config/xtensa/t-windowed | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
-index 7d9e9db..a99156c 100644
---- a/libgcc/config/xtensa/t-windowed
-+++ b/libgcc/config/xtensa/t-windowed
-@@ -1,2 +1,2 @@
- LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
-- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
-+ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
---
-1.8.1.4
-
diff --git a/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch b/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
deleted file mode 100644
index 2d8eb7c..0000000
--- a/patches/gcc/5.4.0/873-xtensa-fix-_Unwind_GetCFA.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From b33905dc310f475ddbde4c9fb7230724b2068a2b Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sat, 15 Aug 2015 05:12:11 +0300
-Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA
-
-Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
-higher than what was actually used by code at context->ra. This results
-in invalid CFA value in signal frames and premature unwinding completion
-in forced unwinding used by uClibc NPTL thread cancellation.
-Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
-matching code that used them.
-
-2015-08-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
- context->sp instead of context->cfa.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r226964
-
- libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c
-index 82b0e63..8e579c7 100644
---- a/libgcc/config/xtensa/unwind-dw2-xtensa.c
-+++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c
-@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
- _Unwind_Word
- _Unwind_GetCFA (struct _Unwind_Context *context)
- {
-- return (_Unwind_Ptr) context->cfa;
-+ return (_Unwind_Ptr) context->sp;
- }
-
- /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */
---
-1.8.1.4
-
diff --git a/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch b/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
deleted file mode 100644
index 23db3d8..0000000
--- a/patches/gcc/5.4.0/874-xtensa-add-uclinux-support.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sat, 22 Aug 2015 08:44:26 +0300
-Subject: [PATCH] xtensa: add uclinux support
-
-2015-10-03 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config.gcc (xtensa*-*-uclinux*): New configuration.
- * config/xtensa/uclinux.h: New file.
- * config/xtensa/uclinux.opt: New file.
-
-libgcc/
- * config.host (xtensa*-*-uclinux*): New configuration.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: r228450
-
- gcc/config.gcc | 5 ++++
- gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++
- gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++
- libgcc/config.host | 5 ++++
- 4 files changed, 111 insertions(+)
- create mode 100644 gcc/config/xtensa/uclinux.h
- create mode 100644 gcc/config/xtensa/uclinux.opt
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index c52f5a8..56797bd 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2995,6 +2995,11 @@ xtensa*-*-linux*)
- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
- tmake_file="${tmake_file} xtensa/t-xtensa"
- ;;
-+xtensa*-*-uclinux*)
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
-+ tmake_file="${tmake_file} xtensa/t-xtensa"
-+ extra_options="${extra_options} xtensa/uclinux.opt"
-+ ;;
- am33_2.0-*-linux*)
- tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
- gas=yes gnu_ld=yes
-diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h
-new file mode 100644
-index 0000000..4606020
---- /dev/null
-+++ b/gcc/config/xtensa/uclinux.h
-@@ -0,0 +1,69 @@
-+/* Xtensa uClinux configuration.
-+ Derived from the configuration for GCC for Intel i386 running Linux.
-+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify it under
-+the terms of the GNU General Public License as published by the Free
-+Software Foundation; either version 3, or (at your option) any later
-+version.
-+
-+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-+WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ GNU_USER_TARGET_OS_CPP_BUILTINS (); \
-+ builtin_define ("__uClinux__"); \
-+ } \
-+ while (0)
-+
-+#undef SUBTARGET_CPP_SPEC
-+#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-+
-+#undef SIZE_TYPE
-+#define SIZE_TYPE "unsigned int"
-+
-+#undef PTRDIFF_TYPE
-+#define PTRDIFF_TYPE "int"
-+
-+#undef WCHAR_TYPE
-+#define WCHAR_TYPE "long int"
-+
-+#undef WCHAR_TYPE_SIZE
-+#define WCHAR_TYPE_SIZE 32
-+
-+#undef ASM_SPEC
-+#define ASM_SPEC \
-+ "%{mtext-section-literals:--text-section-literals} \
-+ %{mno-text-section-literals:--no-text-section-literals} \
-+ %{mtarget-align:--target-align} \
-+ %{mno-target-align:--no-target-align} \
-+ %{mlongcalls:--longcalls} \
-+ %{mno-longcalls:--no-longcalls} \
-+ %{mauto-litpools:--auto-litpools} \
-+ %{mno-auto-litpools:--no-auto-litpools}"
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}"
-+
-+#undef LOCAL_LABEL_PREFIX
-+#define LOCAL_LABEL_PREFIX "."
-+
-+/* Always enable "-fpic" for Xtensa Linux. */
-+#define XTENSA_ALWAYS_PIC 1
-+
-+#undef TARGET_LIBC_HAS_FUNCTION
-+#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
-+
-+#undef DBX_REGISTER_NUMBER
-+
-diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt
-new file mode 100644
-index 0000000..95ef777
---- /dev/null
-+++ b/gcc/config/xtensa/uclinux.opt
-@@ -0,0 +1,32 @@
-+; Xtensa uClinux options.
-+
-+; Copyright (C) 2015 Free Software Foundation, Inc.
-+;
-+; This file is part of GCC.
-+;
-+; GCC is free software; you can redistribute it and/or modify it under
-+; the terms of the GNU General Public License as published by the Free
-+; Software Foundation; either version 3, or (at your option) any later
-+; version.
-+;
-+; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-+; WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+; for more details.
-+;
-+; You should have received a copy of the GNU General Public License
-+; along with GCC; see the file COPYING3. If not see
-+; <http://www.gnu.org/licenses/>.
-+
-+; See the GCC internals manual (options.texi) for a description of
-+; this file's format.
-+
-+; Please try to keep this file in ASCII collating order.
-+
-+elf2flt
-+Driver
-+
-+elf2flt=
-+Driver JoinedOrMissing
-+
-+; This comment is to ensure we retain the blank line above.
-diff --git a/libgcc/config.host b/libgcc/config.host
-index 2c64756..2ee92c1 100644
---- a/libgcc/config.host
-+++ b/libgcc/config.host
-@@ -1295,6 +1295,11 @@ xtensa*-*-linux*)
- tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
- md_unwind_header=xtensa/linux-unwind.h
- ;;
-+xtensa*-*-uclinux*)
-+ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
-+ md_unwind_header=xtensa/linux-unwind.h
-+ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o"
-+ ;;
- am33_2.0-*-linux*)
- # Don't need crtbeginT.o from *-*-linux* default.
- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
---
-1.8.1.4
-
diff --git a/patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch b/patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
deleted file mode 100644
index d128596..0000000
--- a/patches/gcc/5.4.0/875-xtensa-fix-xtensa_fallback_frame_state-for-call0-ABI.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 7d3692c6933f7ff87bf110dede8e33e922b164c6 Mon Sep 17 00:00:00 2001
-From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 15 Sep 2015 19:30:32 +0000
-Subject: [PATCH] xtensa: fix xtensa_fallback_frame_state for call0 ABI
-
-2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New
- definition.
- (DWARF_FRAME_REGISTERS): Reserve space for one extra register in
- call0 ABI.
-
-libgcc/
- * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state):
- Add support for call0 ABI.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227809 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.h | 4 +++-
- libgcc/config/xtensa/linux-unwind.h | 30 ++++++++++++++++++++++++++++--
- 2 files changed, 31 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
-index 584080b..e165def 100644
---- a/gcc/config/xtensa/xtensa.h
-+++ b/gcc/config/xtensa/xtensa.h
-@@ -813,7 +813,9 @@ typedef struct xtensa_args
- for debugging. */
- #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 0)
- #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (0)
--#define DWARF_FRAME_REGISTERS 16
-+#define DWARF_ALT_FRAME_RETURN_COLUMN 16
-+#define DWARF_FRAME_REGISTERS (DWARF_ALT_FRAME_RETURN_COLUMN \
-+ + (TARGET_WINDOWED_ABI ? 0 : 1))
- #define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) + 2 : INVALID_REGNUM)
- #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
- (flag_pic \
-diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
-index 9daf738..9a67b5d 100644
---- a/libgcc/config/xtensa/linux-unwind.h
-+++ b/libgcc/config/xtensa/linux-unwind.h
-@@ -52,7 +52,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define ENTRY_BYTE 0x36
- #endif
-
--#ifdef __XTENSA_WINDOWED_ABI__
- #define MD_FALLBACK_FRAME_STATE_FOR xtensa_fallback_frame_state
-
- static _Unwind_Reason_Code
-@@ -61,6 +60,10 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
- {
- unsigned char *pc = context->ra;
- struct sigcontext *sc;
-+#if defined(__XTENSA_CALL0_ABI__)
-+ _Unwind_Ptr new_cfa;
-+ int i;
-+#endif
-
- struct rt_sigframe {
- siginfo_t info;
-@@ -76,6 +79,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
- || pc[5] != SYSC_BYTE2)
- return _URC_END_OF_STACK;
-
-+#if defined(__XTENSA_WINDOWED_ABI__)
- rt_ = context->sp;
- sc = &rt_->uc.uc_mcontext;
- fs->signal_regs = (_Unwind_Word *) sc->sc_a;
-@@ -90,11 +94,33 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
- }
- else
- fs->signal_ra = sc->sc_pc;
-+#elif defined(__XTENSA_CALL0_ABI__)
-+ rt_ = context->cfa;
-+ sc = &rt_->uc.uc_mcontext;
-+
-+ new_cfa = (_Unwind_Ptr) sc;
-+ fs->regs.cfa_how = CFA_REG_OFFSET;
-+ fs->regs.cfa_reg = __LIBGCC_STACK_POINTER_REGNUM__;
-+ fs->regs.cfa_offset = new_cfa - (_Unwind_Ptr) context->cfa;
-+
-+ for (i = 0; i < 16; i++)
-+ {
-+ fs->regs.reg[i].how = REG_SAVED_OFFSET;
-+ fs->regs.reg[i].loc.offset = (_Unwind_Ptr) &(sc->sc_a[i]) - new_cfa;
-+ }
-+
-+ fs->regs.reg[__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__].how =
-+ REG_SAVED_VAL_OFFSET;
-+ fs->regs.reg[__LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__].loc.offset =
-+ (_Unwind_Ptr) (sc->sc_pc) - new_cfa;
-+ fs->retaddr_column = __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__;
-+#else
-+#error Unsupported Xtensa ABI
-+#endif
-
- fs->signal_frame = 1;
- return _URC_NO_REASON;
- }
-
--#endif /* __XTENSA_WINDOWED_ABI__ */
-
- #endif /* ifdef inhibit_libc */
---
-2.1.4
-
diff --git a/patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch b/patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
deleted file mode 100644
index 4b2334a..0000000
--- a/patches/gcc/5.4.0/876-xtensa-fix-libgcc-build-with-text-section-literals.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 44fbad9f8bed55f690f251b530ab38df1e696d95 Mon Sep 17 00:00:00 2001
-From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 17 Feb 2016 20:21:48 +0000
-Subject: [PATCH] xtensa: fix libgcc build with --text-section-literals
-
-Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux
-don't start with leaf_entry, so they need explicit .literal_position,
-otherwise libgcc build fails in the presence of --text-section-literals.
-
-2016-02-17 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
- .literal_position before the function.
- * config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
- Likewise.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233505 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- libgcc/config/xtensa/ieee754-df.S | 2 ++
- libgcc/config/xtensa/ieee754-sf.S | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/libgcc/config/xtensa/ieee754-df.S b/libgcc/config/xtensa/ieee754-df.S
-index a7ae209..26f2abd 100644
---- a/libgcc/config/xtensa/ieee754-df.S
-+++ b/libgcc/config/xtensa/ieee754-df.S
-@@ -606,6 +606,7 @@ __subdf3:
- #define XCHAL_NO_MUL 1
- #endif
-
-+ .literal_position
- __muldf3_aux:
-
- /* Handle unusual cases (zeros, subnormals, NaNs and Infinities).
-@@ -1216,6 +1217,7 @@ __muldf3:
-
- #ifdef L_divdf3
-
-+ .literal_position
- /* Division */
- __divdf3_aux:
-
-diff --git a/libgcc/config/xtensa/ieee754-sf.S b/libgcc/config/xtensa/ieee754-sf.S
-index 7e397dc..a5e6e3c 100644
---- a/libgcc/config/xtensa/ieee754-sf.S
-+++ b/libgcc/config/xtensa/ieee754-sf.S
-@@ -487,6 +487,7 @@ __subsf3:
- #define XCHAL_NO_MUL 1
- #endif
-
-+ .literal_position
- __mulsf3_aux:
-
- /* Handle unusual cases (zeros, subnormals, NaNs and Infinities).
-@@ -884,6 +885,7 @@ __mulsf3:
-
- #ifdef L_divsf3
-
-+ .literal_position
- /* Division */
- __divsf3_aux:
-
---
-2.1.4
-
diff --git a/patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch b/patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
deleted file mode 100644
index 6e0ce6e..0000000
--- a/patches/gcc/5.4.0/877-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From d28554ee61a1ab1263274d66386e4051bca0ce05 Mon Sep 17 00:00:00 2001
-From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 18 Oct 2016 19:12:19 +0000
-Subject: [PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets
-
-Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
-xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
-LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.
-
-This fixes build for elf target with windowed xtensa core that currently
-breaks with the following error message:
-
- unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory
-
-2016-10-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
- definition.
- * config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
- definition.
- * config/xtensa/t-windowed (LIB2ADDEH): Use
- LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
- or xtensa/t-linux.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241313 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- libgcc/config/xtensa/t-elf | 2 ++
- libgcc/config/xtensa/t-linux | 2 ++
- libgcc/config/xtensa/t-windowed | 2 +-
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/t-elf b/libgcc/config/xtensa/t-elf
-index 59d5121..967cf9b 100644
---- a/libgcc/config/xtensa/t-elf
-+++ b/libgcc/config/xtensa/t-elf
-@@ -3,3 +3,5 @@ CRTSTUFF_T_CFLAGS += -mlongcalls
- CRTSTUFF_T_CFLAGS_S += -mlongcalls
-
- HOST_LIBGCC2_CFLAGS += -mlongcalls
-+
-+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde.c
-diff --git a/libgcc/config/xtensa/t-linux b/libgcc/config/xtensa/t-linux
-index 6f4ae89..412ecca 100644
---- a/libgcc/config/xtensa/t-linux
-+++ b/libgcc/config/xtensa/t-linux
-@@ -1 +1,3 @@
- SHLIB_MAPFILES += $(srcdir)/config/xtensa/libgcc-glibc.ver
-+
-+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde-dip.c
-diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
-index a99156c..f140136 100644
---- a/libgcc/config/xtensa/t-windowed
-+++ b/libgcc/config/xtensa/t-windowed
-@@ -1,2 +1,2 @@
- LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
-- $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
-+ $(LIB2ADDEH_XTENSA_UNWIND_DW2_FDE) $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
---
-2.1.4
-
diff --git a/patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch b/patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch
deleted file mode 100644
index 4646d3c..0000000
--- a/patches/gcc/5.4.0/878-xtensa-Fix-PR-target-78603.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From b18fe564ed233ee0965b3a980edc5dbe069b80ea Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 29 Nov 2016 13:09:17 -0800
-Subject: [PATCH] xtensa: Fix PR target/78603
-
-2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
- overhead loop start between a call and its CALL_ARG_LOCATION
- note.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 206ff80..36ab1e3 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -4182,7 +4182,10 @@ hwloop_optimize (hwloop_info loop)
- entry_after = BB_END (entry_bb);
- while (DEBUG_INSN_P (entry_after)
- || (NOTE_P (entry_after)
-- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
-+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
-+ /* Make sure we don't split a call and its corresponding
-+ CALL_ARG_LOCATION note. */
-+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
- entry_after = PREV_INSN (entry_after);
-
- emit_insn_after (seq, entry_after);
---
-2.1.4
-
diff --git a/patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index e75e258..0000000
--- a/patches/gcc/5.4.0/879-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 1117c8be9e712f778739d751aa61038794437d7d Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 28 May 2017 19:56:56 -0700
-Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
-
-HOST_WIDE_INT may not be long as assumed in print_operand and
-xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
-format strings instead of %ld/0x%lx. This fixes incorrect assembly code
-generation by the compiler running on armhf host.
-
-2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (xtensa_emit_call): Use
- HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
- (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
- format string.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 36ab1e3..8e62d63 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1811,7 +1811,8 @@ xtensa_emit_call (int callop, rtx *operands)
- rtx tgt = operands[callop];
-
- if (GET_CODE (tgt) == CONST_INT)
-- sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
-+ sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
-+ WINDOW_SIZE, INTVAL (tgt));
- else if (register_operand (tgt, VOIDmode))
- sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
- else
-@@ -2382,14 +2383,14 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'L':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
- else
- output_operand_lossage ("invalid %%L value");
- break;
-
- case 'R':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
- else
- output_operand_lossage ("invalid %%R value");
- break;
-@@ -2403,7 +2404,7 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'd':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_operand_lossage ("invalid %%d value");
- break;
-@@ -2472,7 +2473,7 @@ print_operand (FILE *file, rtx x, int letter)
- else if (GET_CODE (x) == MEM)
- output_address (XEXP (x, 0));
- else if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_addr_const (file, x);
- }
---
-2.1.4
-
diff --git a/patches/gcc/5.4.0/890-fix-m68k-compile.patch b/patches/gcc/5.4.0/890-fix-m68k-compile.patch
deleted file mode 100644
index 6e63de0..0000000
--- a/patches/gcc/5.4.0/890-fix-m68k-compile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-remove unused header, which breaks the toolchain building
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c
---- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100
-+++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100
-@@ -33,7 +33,6 @@
- using the kernel helper defined below. There is no support for
- 64-bit operations yet. */
-
--#include <asm/unistd.h>
- #include <stdbool.h>
-
- #ifndef __NR_atomic_cmpxchg_32
diff --git a/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch b/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
deleted file mode 100644
index 4e186bd..0000000
--- a/patches/gcc/5.4.0/891-fix-m68k-uclinux.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-avoids internal compiler error while compiling linux-atomic.c
-See here:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
---- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200
-+++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200
-@@ -794,7 +794,7 @@
- m68k*-*-openbsd*)
- ;;
- m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
-- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
-+ tmake_file="$tmake_file m68k/t-floatlib"
- md_unwind_header=m68k/linux-unwind.h
- ;;
- m68k-*-linux*) # Motorola m68k's running GNU/Linux
diff --git a/patches/gcc/5.4.0/892-microblaze-uclibc.patch b/patches/gcc/5.4.0/892-microblaze-uclibc.patch
deleted file mode 100644
index a8eb5a6..0000000
--- a/patches/gcc/5.4.0/892-microblaze-uclibc.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Add dynamic linker support for uClibc
-
-Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
-
-diff -Nur gcc-5.3.0.orig/gcc/config/microblaze/linux.h gcc-5.3.0/gcc/config/microblaze/linux.h
---- gcc-5.3.0.orig/gcc/config/microblaze/linux.h 2015-05-28 16:08:19.000000000 +0200
-+++ gcc-5.3.0/gcc/config/microblaze/linux.h 2016-05-13 09:21:01.579262885 +0200
-@@ -28,7 +28,15 @@
- #undef TLS_NEEDS_GOT
- #define TLS_NEEDS_GOT 1
-
--#define DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+
-+#if DEFAULT_LIBC == LIBC_UCLIBC
-+#define DYNAMIC_LINKER UCLIBC_DYNAMIC_LINKER
-+#else
-+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
-+#endif
-+
- #undef SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
- { "dynamic_linker", DYNAMIC_LINKER }
diff --git a/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch b/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
deleted file mode 100644
index fdf4ee7..0000000
--- a/patches/gcc/5.4.0/900-libitm-fixes-for-musl-support.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000)
-Subject: libitm fixes for musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338
-
-libitm fixes for musl support
-
-On behalf of Szabolcs.Nagy@arm.com
-
-2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
-
- * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
- * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/libitm/config/arm/hwcap.cc
-===================================================================
---- a/libitm/config/arm/hwcap.cc
-+++ b/libitm/config/arm/hwcap.cc
-@@ -40,7 +40,7 @@
-
- #ifdef __linux__
- #include <unistd.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <elf.h>
-
- static void __attribute__((constructor))
-Index: b/libitm/config/linux/x86/tls.h
-===================================================================
---- a/libitm/config/linux/x86/tls.h
-+++ b/libitm/config/linux/x86/tls.h
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
diff --git a/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch b/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
deleted file mode 100644
index 13c08d6..0000000
--- a/patches/gcc/5.4.0/901-fixincludes-update-for-musl-support.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000)
-Subject: fixincludes update for musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d
-
-fixincludes update for musl support
-
-On behalf of Szabolcs.Nagy@arm.com
-
-2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
-
- * mkfixinc.sh: Add *-musl* with no fixes.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/fixincludes/mkfixinc.sh
-===================================================================
---- a/fixincludes/mkfixinc.sh
-+++ b/fixincludes/mkfixinc.sh
-@@ -19,7 +19,8 @@
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
diff --git a/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch b/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch
deleted file mode 100644
index ef47054..0000000
--- a/patches/gcc/5.4.0/902-unwind-fix-for-musl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000)
-Subject: unwind fix for musl
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4
-
-unwind fix for musl
-
-On behalf of szabolcs.nagy@arm.com
-
-2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
- Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
- Linux if target provides dl_iterate_phdr.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/libgcc/unwind-dw2-fde-dip.c
-===================================================================
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -59,6 +59,12 @@
-
- #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
- && defined(TARGET_DL_ITERATE_PHDR) \
-+ && defined(__linux__)
-+# define USE_PT_GNU_EH_FRAME
-+#endif
-+
-+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-+ && defined(TARGET_DL_ITERATE_PHDR) \
- && (defined(__DragonFly__) || defined(__FreeBSD__))
- # define ElfW __ElfN
- # define USE_PT_GNU_EH_FRAME
diff --git a/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
deleted file mode 100644
index c852131..0000000
--- a/patches/gcc/5.4.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000)
-Subject: libstdc++, libgfortran gthr workaround for musl
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61
-
-libstdc++, libgfortran gthr workaround for musl
-
-On behalf of szabolcs.nagy@arm.com
-
-[libstdc++-v3/]
-2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define.
- * configure.host (os_include_dir): Set to "os/generic" for linux-musl*.
-
-[libgfortran/]
-2015-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*.
- * configure: Regenerate.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/libgfortran/acinclude.m4
-===================================================================
---- a/libgfortran/acinclude.m4
-+++ b/libgfortran/acinclude.m4
-@@ -100,7 +100,7 @@
- [Define to 1 if the target supports #pragma weak])
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
- AC_DEFINE(GTHREAD_USE_WEAK, 0,
- [Define to 0 if the target shouldn't use #pragma weak])
- ;;
-Index: b/libgfortran/configure
-===================================================================
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -26447,7 +26447,7 @@
-
- fi
- case "$host" in
-- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
-+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
-
- $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
-
-Index: b/libstdc++-v3/config/os/generic/os_defines.h
-===================================================================
---- a/libstdc++-v3/config/os/generic/os_defines.h
-+++ b/libstdc++-v3/config/os/generic/os_defines.h
-@@ -33,4 +33,9 @@
- // System-specific #define, typedefs, corrections, etc, go here. This
- // file will come before all others.
-
-+// Disable the weak reference logic in gthr.h for os/generic because it
-+// is broken on every platform unless there is implementation specific
-+// workaround in gthr-posix.h and at link-time for static linking.
-+#define _GLIBCXX_GTHREAD_USE_WEAK 0
-+
- #endif
-Index: b/libstdc++-v3/configure.host
-===================================================================
---- a/libstdc++-v3/configure.host
-+++ b/libstdc++-v3/configure.host
-@@ -271,6 +271,9 @@
- freebsd*)
- os_include_dir="os/bsd/freebsd"
- ;;
-+ linux-musl*)
-+ os_include_dir="os/generic"
-+ ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
diff --git a/patches/gcc/5.4.0/904-musl-libc-config.patch b/patches/gcc/5.4.0/904-musl-libc-config.patch
deleted file mode 100644
index 8549140..0000000
--- a/patches/gcc/5.4.0/904-musl-libc-config.patch
+++ /dev/null
@@ -1,285 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 8 May 2015 08:25:47 +0000 (+0000)
-Subject: [PATCH 2/13] musl libc config
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb
-
-[PATCH 2/13] musl libc config
-
-2015-05-08 Gregor Richards <gregor.richards@uwaterloo.ca>
- Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config.gcc (LIBC_MUSL): New tm_defines macro.
- * config/linux.h (OPTION_MUSL): Define.
- (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,)
- (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,)
- (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
- (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
- (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
- * config/linux.opt (mmusl): New option.
- * doc/invoke.texi (GNU/Linux Options): Document -mmusl.
- * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
- (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
- * configure: Regenerate.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/gcc/config.gcc
-===================================================================
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -575,7 +575,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # 32-bit x86 processors supported by --with-arch=. Each processor
- # MUST be separated by exactly one space.
-@@ -720,6 +720,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-Index: b/gcc/config/linux.h
-===================================================================
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,10 +32,12 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -50,21 +52,25 @@
- } while (0)
-
- /* Determine which dynamic linker to use depending on whether GLIBC or
-- uClibc or Bionic is the default C library and whether
-- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-+ uClibc or Bionic or musl is the default C library and whether
-+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
-+ the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -81,24 +87,100 @@
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
- #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32"
-+/* Should be redefined for each target that supports musl. */
-+#define MUSL_DYNAMIC_LINKER "/dev/null"
-+#define MUSL_DYNAMIC_LINKER32 "/dev/null"
-+#define MUSL_DYNAMIC_LINKER64 "/dev/null"
-+#define MUSL_DYNAMIC_LINKERX32 "/dev/null"
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Whether we have Bionic libc runtime */
- #undef TARGET_HAS_BIONIC
- #define TARGET_HAS_BIONIC (OPTION_BIONIC)
-
-+/* musl avoids problematic includes by rearranging the include directories.
-+ * Unfortunately, this is mostly duplicated from cppdefault.c */
-+#if DEFAULT_LIBC == LIBC_MUSL
-+#define INCLUDE_DEFAULTS_MUSL_GPP \
-+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
-+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
-+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
-+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
-+
-+#ifdef LOCAL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
-+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_LOCAL
-+#endif
-+
-+#ifdef PREFIX_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_PREFIX
-+#endif
-+
-+#ifdef CROSS_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_CROSS \
-+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#ifdef TOOL_INCLUDE_DIR
-+#define INCLUDE_DEFAULTS_MUSL_TOOL \
-+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_TOOL
-+#endif
-+
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
-+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
-+#else
-+#define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#endif
-+
-+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
-+# undef INCLUDE_DEFAULTS_MUSL_LOCAL
-+# define INCLUDE_DEFAULTS_MUSL_LOCAL
-+# undef INCLUDE_DEFAULTS_MUSL_NATIVE
-+# define INCLUDE_DEFAULTS_MUSL_NATIVE
-+#else
-+# undef INCLUDE_DEFAULTS_MUSL_CROSS
-+# define INCLUDE_DEFAULTS_MUSL_CROSS
-+#endif
-+
-+#undef INCLUDE_DEFAULTS
-+#define INCLUDE_DEFAULTS \
-+ { \
-+ INCLUDE_DEFAULTS_MUSL_GPP \
-+ INCLUDE_DEFAULTS_MUSL_PREFIX \
-+ INCLUDE_DEFAULTS_MUSL_CROSS \
-+ INCLUDE_DEFAULTS_MUSL_TOOL \
-+ INCLUDE_DEFAULTS_MUSL_NATIVE \
-+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
-+ { 0, 0, 0, 0, 0, 0 } \
-+ }
-+#endif
-+
- #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
- /* This is a *uclinux* target. We don't define below macros to normal linux
- versions, because doing so would require *uclinux* targets to include
-Index: b/gcc/config/linux.opt
-===================================================================
---- a/gcc/config/linux.opt
-+++ b/gcc/config/linux.opt
-@@ -28,5 +28,9 @@
- Use GNU C library
-
- muclibc
--Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
-+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic)
-+Use musl C library
-Index: b/gcc/configure
-===================================================================
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27809,6 +27813,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-Index: b/gcc/configure.ac
-===================================================================
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5298,6 +5302,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
- GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-Index: b/gcc/doc/invoke.texi
-===================================================================
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -667,7 +667,7 @@
- -mcpu=@var{cpu}}
-
- @emph{GNU/Linux Options}
--@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol
-+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol
- -tno-android-cc -tno-android-ld}
-
- @emph{H8/300 Options}
-@@ -15324,13 +15324,19 @@
- @item -mglibc
- @opindex mglibc
- Use the GNU C library. This is the default except
--on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets.
-+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and
-+@samp{*-*-linux-*android*} targets.
-
- @item -muclibc
- @opindex muclibc
- Use uClibc C library. This is the default on
- @samp{*-*-linux-*uclibc*} targets.
-
-+@item -mmusl
-+@opindex mmusl
-+Use the musl C library. This is the default on
-+@samp{*-*-linux-*musl*} targets.
-+
- @item -mbionic
- @opindex mbionic
- Use Bionic C library. This is the default on
diff --git a/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch b/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch
deleted file mode 100644
index 92e7436..0000000
--- a/patches/gcc/5.4.0/905-add-musl-support-to-gcc.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 8 May 2015 08:30:40 +0000 (+0000)
-Subject: [PATCH 0/13] Add musl support to GCC
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e
-
-[PATCH 0/13] Add musl support to GCC
-
-2015-05-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/glibc-stdint.h (OPTION_MUSL): Define.
- (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE):
- Change the definition based on OPTION_MUSL for 64 bit targets.
- * config/linux.h (OPTION_MUSL): Redefine.
- * config/alpha/linux.h (OPTION_MUSL): Redefine.
- * config/rs6000/linux.h (OPTION_MUSL): Redefine.
- * config/rs6000/linux64.h (OPTION_MUSL): Redefine.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/gcc/config/alpha/linux.h
-===================================================================
---- a/gcc/config/alpha/linux.h
-+++ b/gcc/config/alpha/linux.h
-@@ -61,10 +61,14 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- /* Determine what functions are present at the runtime;
-Index: b/gcc/config/glibc-stdint.h
-===================================================================
---- a/gcc/config/glibc-stdint.h
-+++ b/gcc/config/glibc-stdint.h
-@@ -22,6 +22,12 @@
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-+/* Systems using musl libc should use this header and make sure
-+ OPTION_MUSL is defined correctly before using the TYPE macros. */
-+#ifndef OPTION_MUSL
-+#define OPTION_MUSL 0
-+#endif
-+
- #define SIG_ATOMIC_TYPE "int"
-
- #define INT8_TYPE "signed char"
-@@ -43,12 +49,12 @@
- #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-
- #define INT_FAST8_TYPE "signed char"
--#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
--#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
-+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
-+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int")
- #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
- #define UINT_FAST8_TYPE "unsigned char"
--#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
--#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
-+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int")
- #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
-
- #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
-Index: b/gcc/config/linux.h
-===================================================================
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -32,11 +32,13 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
- #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
- #define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
-Index: b/gcc/config/rs6000/linux.h
-===================================================================
---- a/gcc/config/rs6000/linux.h
-+++ b/gcc/config/rs6000/linux.h
-@@ -30,10 +30,14 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- /* Determine what functions are present at the runtime;
-Index: b/gcc/config/rs6000/linux64.h
-===================================================================
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -299,10 +299,14 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#undef OPTION_MUSL
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- /* Determine what functions are present at the runtime;
diff --git a/patches/gcc/5.4.0/906-mips-musl-support.patch b/patches/gcc/5.4.0/906-mips-musl-support.patch
deleted file mode 100644
index 6b473f9..0000000
--- a/patches/gcc/5.4.0/906-mips-musl-support.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 8 May 2015 15:16:50 +0000 (+0000)
-Subject: [PATCH 6/13] mips musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8
-
-[PATCH 6/13] mips musl support
-
-2015-05-08 Gregor Richards <gregor.richards@uwaterloo.ca>
- Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define.
- (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define.
- (GNU_USER_DYNAMIC_LINKERN32): Update.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/gcc/config/mips/linux.h
-===================================================================
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -37,7 +37,13 @@
- #define UCLIBC_DYNAMIC_LINKERN32 \
- "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
-+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
-+
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
diff --git a/patches/gcc/5.4.0/907-x86-musl-support.patch b/patches/gcc/5.4.0/907-x86-musl-support.patch
deleted file mode 100644
index 3f2fe5d..0000000
--- a/patches/gcc/5.4.0/907-x86-musl-support.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 15 May 2015 13:20:01 +0000 (+0000)
-Subject: [PATCH 9/13] x86 musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c
-
-[PATCH 9/13] x86 musl support
-
-On behalf of Szabolcs Nagy.
-
-2015-05-15 Gregor Richards <gregor.richards@uwaterloo.ca>
-
- * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define.
- * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
- (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/gcc/config/i386/linux.h
-===================================================================
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -21,3 +21,6 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-Index: b/gcc/config/i386/linux64.h
-===================================================================
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -30,3 +30,10 @@
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#undef MUSL_DYNAMIC_LINKER32
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#undef MUSL_DYNAMIC_LINKER64
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#undef MUSL_DYNAMIC_LINKERX32
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
diff --git a/patches/gcc/5.4.0/908-arm-musl-support.patch b/patches/gcc/5.4.0/908-arm-musl-support.patch
deleted file mode 100644
index 906355a..0000000
--- a/patches/gcc/5.4.0/908-arm-musl-support.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 27 May 2015 13:17:11 +0000 (+0000)
-Subject: [PATCH 4/13] arm musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4
-
-[PATCH 4/13] arm musl support
-
-On behalf of szabolcs.nagy@arm.com
-
-2015-05-27 Gregor Richards <gregor.richards@uwaterloo.ca>
-
- * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/gcc/config/arm/linux-eabi.h
-===================================================================
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,6 +77,23 @@
- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
-
-+/* For ARM musl currently supports four dynamic linkers:
-+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
-+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
-+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
-+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
-+ musl does not support the legacy OABI mode.
-+ All the dynamic linkers live in /lib.
-+ We default to soft-float, EL. */
-+#undef MUSL_DYNAMIC_LINKER
-+#if TARGET_BIG_ENDIAN_DEFAULT
-+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
-+#else
-+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
-+#endif
-+#define MUSL_DYNAMIC_LINKER \
-+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
diff --git a/patches/gcc/5.4.0/909-aarch64-musl-support.patch b/patches/gcc/5.4.0/909-aarch64-musl-support.patch
deleted file mode 100644
index 3d032f5..0000000
--- a/patches/gcc/5.4.0/909-aarch64-musl-support.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Wed, 27 May 2015 16:46:39 +0000 (+0000)
-Subject: [PATCH 3/13] aarch64 musl support
-X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78
-
-[PATCH 3/13] aarch64 musl support
-
-gcc/Changelog:
-
-2015-05-27 Gregor Richards <gregor.richards@uwaterloo.ca>
- Szabolcs Nagy <szabolcs.nagy@arm.com>
-
- * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4
----
-
-Index: b/gcc/config/aarch64/aarch64-linux.h
-===================================================================
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -23,6 +23,9 @@
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+
- #undef ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
-
diff --git a/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch b/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
deleted file mode 100644
index d94697f..0000000
--- a/patches/gcc/5.4.0/910-nios2-bad-multilib-default.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -urpN gcc-5.3.0.orig/gcc/config/nios2/nios2.h gcc-5.3.0/gcc/config/nios2/nios2.h
---- gcc-5.3.0.orig/gcc/config/nios2/nios2.h 2016-04-18 10:32:41.046254061 -0700
-+++ gcc-5.3.0/gcc/config/nios2/nios2.h 2016-04-18 10:37:25.998841674 -0700
-@@ -55,11 +55,11 @@
- #if TARGET_ENDIAN_DEFAULT == 0
- # define ASM_SPEC "%{!meb:-EL} %{meb:-EB}"
- # define LINK_SPEC_ENDIAN "%{!meb:-EL} %{meb:-EB}"
--# define MULTILIB_DEFAULTS { "EL" }
-+# define MULTILIB_DEFAULTS { "mel" }
- #else
- # define ASM_SPEC "%{!mel:-EB} %{mel:-EL}"
- # define LINK_SPEC_ENDIAN "%{!mel:-EB} %{mel:-EL}"
--# define MULTILIB_DEFAULTS { "EB" }
-+# define MULTILIB_DEFAULTS { "meb" }
- #endif
-
- #define LINK_SPEC LINK_SPEC_ENDIAN \
-diff -urpN gcc-5.3.0.orig/gcc/config/nios2/t-nios2 gcc-5.3.0/gcc/config/nios2/t-nios2
---- gcc-5.3.0.orig/gcc/config/nios2/t-nios2 2016-04-18 10:32:41.046254061 -0700
-+++ gcc-5.3.0/gcc/config/nios2/t-nios2 2016-04-18 10:36:41.091312157 -0700
-@@ -22,6 +22,5 @@
- # MULTILIB_DIRNAMES = nomul mulx fpu-60-1 fpu-60-2
- # MULTILIB_EXCEPTIONS =
-
--# MULTILIB_OPTIONS += EL/EB
-+# MULTILIB_OPTIONS += mel/meb
- # MULTILIB_DIRNAMES += le be
--# MULTILIB_MATCHES += EL=mel EB=meb
diff --git a/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch b/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch
deleted file mode 100644
index 07f9a73..0000000
--- a/patches/gcc/5.4.0/930-libgcc-disable-split-stack-nothreads.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-disable split-stack for non-thread builds
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
---- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
-+++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100
-@@ -1,4 +1,6 @@
- # Makefile fragment to provide generic support for -fsplit-stack.
- # This should be used in config.host for any host which supports
- # -fsplit-stack.
-+ifeq ($(enable_threads),yes)
- LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
-+endif
diff --git a/patches/gcc/5.4.0/940-uclinux-enable-threads.patch b/patches/gcc/5.4.0/940-uclinux-enable-threads.patch
deleted file mode 100644
index 490a55b..0000000
--- a/patches/gcc/5.4.0/940-uclinux-enable-threads.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Enable POSIX threads for uClinux targets
-Reported upstream:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
---- gcc-5.4.0.orig/gcc/config.gcc 2015-09-10 16:17:53.000000000 +0200
-+++ gcc-5.4.0/gcc/config.gcc 2016-07-01 21:26:02.772958441 +0200
-@@ -808,6 +808,9 @@
- *-*-uclinux*)
- extra_options="$extra_options gnu-user.opt"
- use_gcc_stdint=wrap
-+ case ${enable_threads} in
-+ "" | yes | posix) thread_file='posix' ;;
-+ esac
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
- ;;
- *-*-rdos*)
diff --git a/patches/gcc/6.3.0/100-uclibc-conf.patch b/patches/gcc/6.3.0/100-uclibc-conf.patch
deleted file mode 100644
index 73d1f0d..0000000
--- a/patches/gcc/6.3.0/100-uclibc-conf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: b/contrib/regression/objs-gcc.sh
-===================================================================
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
diff --git a/patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch b/patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch
deleted file mode 100644
index bce09eb..0000000
--- a/patches/gcc/6.3.0/1000-libtool-leave-framework-alone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-6.2.0/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
-+++ gcc-6.2.0/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
-@@ -36,6 +36,11 @@
- for arg
- do
- case $arg in
-+ -framework)
-+ # libtool handles this option. It should not be prefixed with
-+ # -Xcompiler, as that would split it from the argument that
-+ # follows.
-+ ;;
- -f*|--*|-static-lib*|-shared-lib*|-B*)
- # Libtool does not ascribe any special meaning options
- # that begin with -f or with a double-dash. So, it will
diff --git a/patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch b/patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch
deleted file mode 100644
index c012719..0000000
--- a/patches/gcc/6.3.0/1100-ubsan-fix-check-empty-string.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001
-From: kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 3 Sep 2016 10:57:05 +0000
-Subject: [PATCH] gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty
- string.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
-
----
- gcc/ubsan.c | 2 +-
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
-Index: gcc-6.3.0/gcc/ubsan.c
-===================================================================
---- gcc-6.3.0.orig/gcc/ubsan.c
-+++ gcc-6.3.0/gcc/ubsan.c
-@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
-
- expanded_location xloc = expand_location (loc);
- if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
-- || xloc.file == '\0' || xloc.file[0] == '\xff'
-+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
- || xloc.file[1] == '\xff')
- return false;
-
diff --git a/patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch b/patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/patches/gcc/6.3.0/111-alpha-bad-eh_frame.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
-
-diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha
-index 0b6ffb1..0c2f840 100644
---- a/libgcc/config/alpha/t-alpha
-+++ b/libgcc/config/alpha/t-alpha
-@@ -1,2 +1,6 @@
- # This is a support routine for longlong.h, used by libgcc2.c.
- LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
-+
-+# When GAS-generated unwind tables are created, they get created
-+# after the __FRAME_END__ terminator, which causes an ld error.
-+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
diff --git a/patches/gcc/6.3.0/301-missing-execinfo_h.patch b/patches/gcc/6.3.0/301-missing-execinfo_h.patch
deleted file mode 100644
index 2d0e7ba..0000000
--- a/patches/gcc/6.3.0/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: b/boehm-gc/include/gc.h
-===================================================================
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
deleted file mode 100644
index d8986d5..0000000
--- a/patches/gcc/6.3.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4
---- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000
-+++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000
-@@ -20,6 +20,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -30,6 +33,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -81,17 +89,17 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- AC_MSG_CHECKING([for -fPIC -shared])
-+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
- AC_TRY_LINK(
-- [extern int X;],[return X == 0;],
-+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
- [AC_MSG_RESULT([yes]); have_pic_shared=yes],
- [AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
-diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure
---- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000
-+++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000
-@@ -28386,6 +28386,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -28396,6 +28399,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -28508,23 +28516,23 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
-diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure
---- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000
-+++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000
-@@ -14500,6 +14500,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -14510,6 +14513,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -14622,23 +14630,23 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
diff --git a/patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
deleted file mode 100644
index 12ef48e..0000000
--- a/patches/gcc/6.3.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc
---- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000
-+++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000
-@@ -21,6 +21,7 @@
- #include <string>
- #include <unistd.h>
- #include <sys/types.h>
-+#include <sys/select.h>
- #include <string.h>
- #include <errno.h>
- #include "marshall.hh"
diff --git a/patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch b/patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch
deleted file mode 100644
index 5efa7fd..0000000
--- a/patches/gcc/6.3.0/810-arm-softfloat-libgcc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: b/gcc/config/arm/linux-elf.h
-===================================================================
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -60,7 +60,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-Index: b/libgcc/config/arm/t-linux
-===================================================================
---- a/libgcc/config/arm/t-linux
-+++ b/libgcc/config/arm/t-linux
-@@ -1,6 +1,11 @@
- LIB1ASMSRC = arm/lib1funcs.S
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
-+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
-+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
-+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
-+ _arm_fixsfsi _arm_fixunssfsi
-
- # Just for these, we omit the frame pointer since it makes such a big
- # difference.
diff --git a/patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch b/patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch
deleted file mode 100644
index b730059..0000000
--- a/patches/gcc/6.3.0/830-arm_unbreak_armv4t.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
-
-Index: b/gcc/config/arm/linux-eabi.h
-===================================================================
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
- The ARM10TDMI core is the default for armv5t, so set
- SUBTARGET_CPU_DEFAULT to achieve this. */
- #undef SUBTARGET_CPU_DEFAULT
--#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
-
- /* TARGET_BIG_ENDIAN_DEFAULT is set in
- config.gcc for big endian configurations. */
diff --git a/patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch b/patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch
deleted file mode 100644
index af9fb1d..0000000
--- a/patches/gcc/6.3.0/831-ARM-PR-target-70473-Reduce-size-of-Cortex-A8-automat.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 07453188b18a2cbe815917dbb893b4ebfdd793b6 Mon Sep 17 00:00:00 2001
-From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 26 Aug 2016 10:23:20 +0000
-Subject: [PATCH] [ARM] PR target/70473: Reduce size of Cortex-A8 automaton
-
- PR target/70473
- * config/arm/cortex-a8-neon.md (cortex_a8_vfp_muld): Reduce
- reservation duration to 15 cycles.
- (cortex_a8_vfp_macs): Likewise.
- (cortex_a8_vfp_macd): Likewise.
- (cortex_a8_vfp_divs): Likewise.
- (cortex_a8_vfp_divd): Likewise.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239772
-138bc75d-0d04-0410-961f-82ee72b054a4
-
-[Backport from gcc upstream commit 79f5d5e3cd5a668d5ecb2b6b0cce80ef5706ac53.]
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- gcc/config/arm/cortex-a8-neon.md | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/arm/cortex-a8-neon.md b/gcc/config/arm/cortex-a8-neon.md
-index 45f861f..b16c299 100644
---- a/gcc/config/arm/cortex-a8-neon.md
-+++ b/gcc/config/arm/cortex-a8-neon.md
-@@ -357,30 +357,34 @@
- (eq_attr "type" "fmuls"))
- "cortex_a8_vfp,cortex_a8_vfplite*11")
-
-+;; Don't model a reservation for more than 15 cycles as this explodes the
-+;; state space of the automaton for little gain. It is unlikely that the
-+;; scheduler will find enough instructions to hide the full latency of the
-+;; instructions.
- (define_insn_reservation "cortex_a8_vfp_muld" 17
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fmuld"))
-- "cortex_a8_vfp,cortex_a8_vfplite*16")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_macs" 21
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fmacs,ffmas"))
-- "cortex_a8_vfp,cortex_a8_vfplite*20")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_macd" 26
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fmacd,ffmad"))
-- "cortex_a8_vfp,cortex_a8_vfplite*25")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_divs" 37
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fdivs, fsqrts"))
-- "cortex_a8_vfp,cortex_a8_vfplite*36")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- (define_insn_reservation "cortex_a8_vfp_divd" 65
- (and (eq_attr "tune" "cortexa8")
- (eq_attr "type" "fdivd, fsqrtd"))
-- "cortex_a8_vfp,cortex_a8_vfplite*64")
-+ "cortex_a8_vfp,cortex_a8_vfplite*15")
-
- ;; Comparisons can actually take 7 cycles sometimes instead of four,
- ;; but given all the other instructions lumped into type=ffarith that
---
-2.7.4
-
diff --git a/patches/gcc/6.3.0/860-cilk-wchar.patch b/patches/gcc/6.3.0/860-cilk-wchar.patch
deleted file mode 100644
index 1d9916f..0000000
--- a/patches/gcc/6.3.0/860-cilk-wchar.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] cilk: fix build without wchar
-
-When building against uClibc with wchar support disabled, WCHAR_MIN and
-WCHAR_MAX are not defined leading to compilation errors.
-
-Fix it by only including the wchar code if available.
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
- libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-Index: b/libcilkrts/include/cilk/reducer_min_max.h
-===================================================================
---- a/libcilkrts/include/cilk/reducer_min_max.h
-+++ b/libcilkrts/include/cilk/reducer_min_max.h
-@@ -3154,7 +3154,9 @@
- CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
-@@ -3306,7 +3308,9 @@
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
-@@ -3432,7 +3436,9 @@
- CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
-@@ -3584,7 +3590,9 @@
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
diff --git a/patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch b/patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
deleted file mode 100644
index 6e0ce6e..0000000
--- a/patches/gcc/6.3.0/870-xtensa-don-t-use-unwind-dw2-fde-dip-with-elf-targets.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From d28554ee61a1ab1263274d66386e4051bca0ce05 Mon Sep 17 00:00:00 2001
-From: jcmvbkbc <jcmvbkbc@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 18 Oct 2016 19:12:19 +0000
-Subject: [PATCH] xtensa: don't use unwind-dw2-fde-dip with elf targets
-
-Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
-xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
-LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.
-
-This fixes build for elf target with windowed xtensa core that currently
-breaks with the following error message:
-
- unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory
-
-2016-10-18 Max Filippov <jcmvbkbc@gmail.com>
-libgcc/
- * config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
- definition.
- * config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
- definition.
- * config/xtensa/t-windowed (LIB2ADDEH): Use
- LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
- or xtensa/t-linux.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241313 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- libgcc/config/xtensa/t-elf | 2 ++
- libgcc/config/xtensa/t-linux | 2 ++
- libgcc/config/xtensa/t-windowed | 2 +-
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libgcc/config/xtensa/t-elf b/libgcc/config/xtensa/t-elf
-index 59d5121..967cf9b 100644
---- a/libgcc/config/xtensa/t-elf
-+++ b/libgcc/config/xtensa/t-elf
-@@ -3,3 +3,5 @@ CRTSTUFF_T_CFLAGS += -mlongcalls
- CRTSTUFF_T_CFLAGS_S += -mlongcalls
-
- HOST_LIBGCC2_CFLAGS += -mlongcalls
-+
-+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde.c
-diff --git a/libgcc/config/xtensa/t-linux b/libgcc/config/xtensa/t-linux
-index 6f4ae89..412ecca 100644
---- a/libgcc/config/xtensa/t-linux
-+++ b/libgcc/config/xtensa/t-linux
-@@ -1 +1,3 @@
- SHLIB_MAPFILES += $(srcdir)/config/xtensa/libgcc-glibc.ver
-+
-+LIB2ADDEH_XTENSA_UNWIND_DW2_FDE = $(srcdir)/unwind-dw2-fde-dip.c
-diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed
-index a99156c..f140136 100644
---- a/libgcc/config/xtensa/t-windowed
-+++ b/libgcc/config/xtensa/t-windowed
-@@ -1,2 +1,2 @@
- LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \
-- $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
-+ $(LIB2ADDEH_XTENSA_UNWIND_DW2_FDE) $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch b/patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch
deleted file mode 100644
index c6ae103..0000000
--- a/patches/gcc/6.3.0/871-xtensa-Fix-PR-target-78118.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-From bdda1689faf608ad7c83b5bd2e21a236b0047579 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Wed, 26 Oct 2016 08:02:51 +0000
-Subject: [PATCH] xtensa: Fix PR target/78118
-
-It started failing after the following commit: 32e90dc6a0cda45 ("PR
-rtl-optimization/61047").
-
-The change that made xtensa backend go ICE looks completely unrelated,
-and indeed, the issue is caused by the side effect of
-compute_frame_size() function call hidden in the
-INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
-xtensa_current_frame_size static variable, used in "return" instruction
-predicate. Prior to the change the value of xtensa_current_frame_size was
-set to 0 after the end of epilogue generation, which enabled the "return"
-instruction for the CALL0 ABI, but after the change the additional
-INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
-and "return" pattern unavailable.
-
-Get rid of the global xtensa_current_frame_size and
-xtensa_callee_save_size variables by moving them into the
-machine_function structure. Implement predicate for the "return" pattern
-as a function. Don't communicate completion of epilogue generation
-through zeroing of xtensa_current_frame_size, add explicit epilogue_done
-variable to the machine_function structure. Don't update stack frame
-layout after the completion of reload.
-
-2016-10-26 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa-protos.h
- (xtensa_use_return_instruction_p): New prototype.
- * config/xtensa/xtensa.c (xtensa_current_frame_size,
- xtensa_callee_save_size): Remove.
- (struct machine_function): Add new fields: current_frame_size,
- callee_save_size, frame_laid_out and epilogue_done.
- (compute_frame_size, xtensa_expand_prologue,
- xtensa_expand_epilogue): Replace xtensa_callee_save_size with
- cfun->machine->callee_save_size and xtensa_current_frame_size
- with cfun->machine->current_frame_size.
- (compute_frame_size): Update cfun->machine->frame_laid_out and
- don't update frame layout after reload completion.
- (xtensa_expand_epilogue): Set cfun->machine->epilogue_done
- instead of zeroing xtensa_current_frame_size.
- (xtensa_use_return_instruction_p): New function.
- * config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
- declaration.
- (INITIAL_ELIMINATION_OFFSET): Use return value of
- compute_frame_size instead of xtensa_current_frame_size value.
- * config/xtensa/xtensa.md ("return" pattern): Use new predicate
- function xtensa_use_return_instruction_p instead of inline code.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa-protos.h | 1 +
- gcc/config/xtensa/xtensa.c | 82 ++++++++++++++++++++++++---------------
- gcc/config/xtensa/xtensa.h | 6 +--
- gcc/config/xtensa/xtensa.md | 2 +-
- 4 files changed, 55 insertions(+), 36 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h
-index f2ca526..873557f 100644
---- a/gcc/config/xtensa/xtensa-protos.h
-+++ b/gcc/config/xtensa/xtensa-protos.h
-@@ -68,6 +68,7 @@ extern rtx xtensa_return_addr (int, rtx);
- extern void xtensa_setup_frame_addresses (void);
- extern int xtensa_dbx_register_number (int);
- extern long compute_frame_size (int);
-+extern bool xtensa_use_return_instruction_p (void);
- extern void xtensa_expand_prologue (void);
- extern void xtensa_expand_epilogue (void);
- extern void order_regs_for_local_alloc (void);
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 64d089b..e49f784 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -78,11 +78,6 @@ enum internal_test
- can support a given mode. */
- char xtensa_hard_regno_mode_ok[(int) MAX_MACHINE_MODE][FIRST_PSEUDO_REGISTER];
-
--/* Current frame size calculated by compute_frame_size. */
--unsigned xtensa_current_frame_size;
--/* Callee-save area size in the current frame calculated by compute_frame_size. */
--int xtensa_callee_save_size;
--
- /* Largest block move to handle in-line. */
- #define LARGEST_MOVE_RATIO 15
-
-@@ -94,6 +89,13 @@ struct GTY(()) machine_function
- bool vararg_a7;
- rtx vararg_a7_copy;
- rtx_insn *set_frame_ptr_insn;
-+ /* Current frame size calculated by compute_frame_size. */
-+ unsigned current_frame_size;
-+ /* Callee-save area size in the current frame calculated by
-+ compute_frame_size. */
-+ int callee_save_size;
-+ bool frame_laid_out;
-+ bool epilogue_done;
- };
-
- /* Vector, indexed by hard register number, which contains 1 for a
-@@ -2628,24 +2630,29 @@ compute_frame_size (int size)
- {
- int regno;
-
-+ if (reload_completed && cfun->machine->frame_laid_out)
-+ return cfun->machine->current_frame_size;
-+
- /* Add space for the incoming static chain value. */
- if (cfun->static_chain_decl != NULL)
- size += (1 * UNITS_PER_WORD);
-
-- xtensa_callee_save_size = 0;
-+ cfun->machine->callee_save_size = 0;
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; ++regno)
- {
- if (xtensa_call_save_reg(regno))
-- xtensa_callee_save_size += UNITS_PER_WORD;
-+ cfun->machine->callee_save_size += UNITS_PER_WORD;
- }
-
-- xtensa_current_frame_size =
-+ cfun->machine->current_frame_size =
- XTENSA_STACK_ALIGN (size
-- + xtensa_callee_save_size
-+ + cfun->machine->callee_save_size
- + crtl->outgoing_args_size
- + (WINDOW_SIZE * UNITS_PER_WORD));
-- xtensa_callee_save_size = XTENSA_STACK_ALIGN (xtensa_callee_save_size);
-- return xtensa_current_frame_size;
-+ cfun->machine->callee_save_size =
-+ XTENSA_STACK_ALIGN (cfun->machine->callee_save_size);
-+ cfun->machine->frame_laid_out = true;
-+ return cfun->machine->current_frame_size;
- }
-
-
-@@ -2696,6 +2703,7 @@ xtensa_expand_prologue (void)
- {
- int regno;
- HOST_WIDE_INT offset = 0;
-+ int callee_save_size = cfun->machine->callee_save_size;
-
- /* -128 is a limit of single addi instruction. */
- if (total_size > 0 && total_size <= 128)
-@@ -2709,7 +2717,7 @@ xtensa_expand_prologue (void)
- add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
- offset = total_size - UNITS_PER_WORD;
- }
-- else if (xtensa_callee_save_size)
-+ else if (callee_save_size)
- {
- /* 1020 is maximal s32i offset, if the frame is bigger than that
- * we move sp to the end of callee-saved save area, save and then
-@@ -2717,13 +2725,13 @@ xtensa_expand_prologue (void)
- if (total_size > 1024)
- {
- insn = emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
-- GEN_INT (-xtensa_callee_save_size)));
-+ GEN_INT (-callee_save_size)));
- RTX_FRAME_RELATED_P (insn) = 1;
- note_rtx = gen_rtx_SET (stack_pointer_rtx,
- plus_constant (Pmode, stack_pointer_rtx,
-- -xtensa_callee_save_size));
-+ -callee_save_size));
- add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
-- offset = xtensa_callee_save_size - UNITS_PER_WORD;
-+ offset = callee_save_size - UNITS_PER_WORD;
- }
- else
- {
-@@ -2759,13 +2767,13 @@ xtensa_expand_prologue (void)
- {
- rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
- emit_move_insn (tmp_reg, GEN_INT (total_size -
-- xtensa_callee_save_size));
-+ callee_save_size));
- insn = emit_insn (gen_subsi3 (stack_pointer_rtx,
- stack_pointer_rtx, tmp_reg));
- RTX_FRAME_RELATED_P (insn) = 1;
- note_rtx = gen_rtx_SET (stack_pointer_rtx,
- plus_constant (Pmode, stack_pointer_rtx,
-- xtensa_callee_save_size -
-+ callee_save_size -
- total_size));
- add_reg_note (insn, REG_FRAME_RELATED_EXPR, note_rtx);
- }
-@@ -2833,21 +2841,21 @@ xtensa_expand_epilogue (void)
- int regno;
- HOST_WIDE_INT offset;
-
-- if (xtensa_current_frame_size > (frame_pointer_needed ? 127 : 1024))
-+ if (cfun->machine->current_frame_size > (frame_pointer_needed ? 127 : 1024))
- {
- rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
-- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size -
-- xtensa_callee_save_size));
-+ emit_move_insn (tmp_reg, GEN_INT (cfun->machine->current_frame_size -
-+ cfun->machine->callee_save_size));
- emit_insn (gen_addsi3 (stack_pointer_rtx, frame_pointer_needed ?
- hard_frame_pointer_rtx : stack_pointer_rtx,
- tmp_reg));
-- offset = xtensa_callee_save_size - UNITS_PER_WORD;
-+ offset = cfun->machine->callee_save_size - UNITS_PER_WORD;
- }
- else
- {
- if (frame_pointer_needed)
- emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
-- offset = xtensa_current_frame_size - UNITS_PER_WORD;
-+ offset = cfun->machine->current_frame_size - UNITS_PER_WORD;
- }
-
- /* Prevent reordering of saved a0 update and loading it back from
-@@ -2867,16 +2875,16 @@ xtensa_expand_epilogue (void)
- }
- }
-
-- if (xtensa_current_frame_size > 0)
-+ if (cfun->machine->current_frame_size > 0)
- {
- if (frame_pointer_needed || /* always reachable with addi */
-- xtensa_current_frame_size > 1024 ||
-- xtensa_current_frame_size <= 127)
-+ cfun->machine->current_frame_size > 1024 ||
-+ cfun->machine->current_frame_size <= 127)
- {
-- if (xtensa_current_frame_size <= 127)
-- offset = xtensa_current_frame_size;
-+ if (cfun->machine->current_frame_size <= 127)
-+ offset = cfun->machine->current_frame_size;
- else
-- offset = xtensa_callee_save_size;
-+ offset = cfun->machine->callee_save_size;
-
- emit_insn (gen_addsi3 (stack_pointer_rtx,
- stack_pointer_rtx,
-@@ -2885,7 +2893,8 @@ xtensa_expand_epilogue (void)
- else
- {
- rtx tmp_reg = gen_rtx_REG (Pmode, A9_REG);
-- emit_move_insn (tmp_reg, GEN_INT (xtensa_current_frame_size));
-+ emit_move_insn (tmp_reg,
-+ GEN_INT (cfun->machine->current_frame_size));
- emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
- tmp_reg));
- }
-@@ -2896,11 +2905,22 @@ xtensa_expand_epilogue (void)
- stack_pointer_rtx,
- EH_RETURN_STACKADJ_RTX));
- }
-- xtensa_current_frame_size = 0;
-- xtensa_callee_save_size = 0;
-+ cfun->machine->epilogue_done = true;
- emit_jump_insn (gen_return ());
- }
-
-+bool
-+xtensa_use_return_instruction_p (void)
-+{
-+ if (!reload_completed)
-+ return false;
-+ if (TARGET_WINDOWED_ABI)
-+ return true;
-+ if (compute_frame_size (get_frame_size ()) == 0)
-+ return true;
-+ return cfun->machine->epilogue_done;
-+}
-+
- void
- xtensa_set_return_address (rtx address, rtx scratch)
- {
-diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
-index 82e9900..58eb1b2 100644
---- a/gcc/config/xtensa/xtensa.h
-+++ b/gcc/config/xtensa/xtensa.h
-@@ -23,8 +23,6 @@ along with GCC; see the file COPYING3. If not see
-
- /* External variables defined in xtensa.c. */
-
--extern unsigned xtensa_current_frame_size;
--
- /* Macros used in the machine description to select various Xtensa
- configuration options. */
- #ifndef XCHAL_HAVE_MUL32_HIGH
-@@ -477,14 +475,14 @@ enum reg_class
- /* Specify the initial difference between the specified pair of registers. */
- #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
- do { \
-- compute_frame_size (get_frame_size ()); \
-+ long frame_size = compute_frame_size (get_frame_size ()); \
- switch (FROM) \
- { \
- case FRAME_POINTER_REGNUM: \
- (OFFSET) = 0; \
- break; \
- case ARG_POINTER_REGNUM: \
-- (OFFSET) = xtensa_current_frame_size; \
-+ (OFFSET) = frame_size; \
- break; \
- default: \
- gcc_unreachable (); \
-diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
-index db54a12..fcdb6c8 100644
---- a/gcc/config/xtensa/xtensa.md
-+++ b/gcc/config/xtensa/xtensa.md
-@@ -1663,7 +1663,7 @@
- (define_insn "return"
- [(return)
- (use (reg:SI A0_REG))]
-- "(TARGET_WINDOWED_ABI || !xtensa_current_frame_size) && reload_completed"
-+ "xtensa_use_return_instruction_p ()"
- {
- return TARGET_WINDOWED_ABI ?
- (TARGET_DENSITY ? "retw.n" : "retw") :
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch b/patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch
deleted file mode 100644
index 669097c..0000000
--- a/patches/gcc/6.3.0/872-xtensa-Fix-PR-target-78603.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a568f3a84ff41ca272301a5fcf31071143e97e0f Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Tue, 29 Nov 2016 13:09:17 -0800
-Subject: [PATCH] xtensa: Fix PR target/78603
-
-2016-11-29 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
- overhead loop start between a call and its CALL_ARG_LOCATION
- note.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index e49f784..70f698a 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -4158,7 +4158,10 @@ hwloop_optimize (hwloop_info loop)
- entry_after = BB_END (entry_bb);
- while (DEBUG_INSN_P (entry_after)
- || (NOTE_P (entry_after)
-- && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK))
-+ && NOTE_KIND (entry_after) != NOTE_INSN_BASIC_BLOCK
-+ /* Make sure we don't split a call and its corresponding
-+ CALL_ARG_LOCATION note. */
-+ && NOTE_KIND (entry_after) != NOTE_INSN_CALL_ARG_LOCATION))
- entry_after = PREV_INSN (entry_after);
-
- emit_insn_after (seq, entry_after);
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index a5b0624..0000000
--- a/patches/gcc/6.3.0/873-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From a3d07c8a2a9564b57ebcae8463c1541a37c97c34 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 28 May 2017 19:56:56 -0700
-Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
-
-HOST_WIDE_INT may not be long as assumed in print_operand and
-xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
-format strings instead of %ld/0x%lx. This fixes incorrect assembly code
-generation by the compiler running on armhf host.
-
-2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (xtensa_emit_call): Use
- HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
- (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
- format string.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 70f698a..2bdf5cc 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1776,7 +1776,8 @@ xtensa_emit_call (int callop, rtx *operands)
- rtx tgt = operands[callop];
-
- if (GET_CODE (tgt) == CONST_INT)
-- sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
-+ sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
-+ WINDOW_SIZE, INTVAL (tgt));
- else if (register_operand (tgt, VOIDmode))
- sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
- else
-@@ -2347,14 +2348,14 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'L':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
- else
- output_operand_lossage ("invalid %%L value");
- break;
-
- case 'R':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
- else
- output_operand_lossage ("invalid %%R value");
- break;
-@@ -2368,7 +2369,7 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'd':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_operand_lossage ("invalid %%d value");
- break;
-@@ -2433,7 +2434,7 @@ print_operand (FILE *file, rtx x, int letter)
- else if (GET_CODE (x) == MEM)
- output_address (GET_MODE (x), XEXP (x, 0));
- else if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_addr_const (file, x);
- }
---
-2.1.4
-
diff --git a/patches/gcc/6.3.0/890-fix-m68k-compile.patch b/patches/gcc/6.3.0/890-fix-m68k-compile.patch
deleted file mode 100644
index 6e63de0..0000000
--- a/patches/gcc/6.3.0/890-fix-m68k-compile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-remove unused header, which breaks the toolchain building
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c
---- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100
-+++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100
-@@ -33,7 +33,6 @@
- using the kernel helper defined below. There is no support for
- 64-bit operations yet. */
-
--#include <asm/unistd.h>
- #include <stdbool.h>
-
- #ifndef __NR_atomic_cmpxchg_32
diff --git a/patches/gcc/6.3.0/891-fix-m68k-uclinux.patch b/patches/gcc/6.3.0/891-fix-m68k-uclinux.patch
deleted file mode 100644
index 4e186bd..0000000
--- a/patches/gcc/6.3.0/891-fix-m68k-uclinux.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-avoids internal compiler error while compiling linux-atomic.c
-See here:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
---- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200
-+++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200
-@@ -794,7 +794,7 @@
- m68k*-*-openbsd*)
- ;;
- m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
-- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
-+ tmake_file="$tmake_file m68k/t-floatlib"
- md_unwind_header=m68k/linux-unwind.h
- ;;
- m68k-*-linux*) # Motorola m68k's running GNU/Linux
diff --git a/patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch b/patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch
deleted file mode 100644
index 73ee6c5..0000000
--- a/patches/gcc/6.3.0/892-libgcc-mkmap-symver-support-skip_underscore.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From ae9c3e354440c4a0f105a9eabfb2f77be085ebc1 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Thu, 18 Aug 2016 17:59:16 +0200
-Subject: [PATCH] libgcc/mkmap-symver: support skip_underscore
-
-Some platforms, such as Blackfin, have a special prefix for assembly
-symbols as opposed to C symbols. For this reason, a function named
-"foo()" in C will in fact be visible as a symbol called "_foo" in the
-ELF binary.
-
-The current linker version script logic in libgcc doesn't take into
-account this situation properly. The Blackfin specific
-libgcc/config/bfin/libgcc-glibc.ver has an additional "_" in front of
-every symbol so that it matches the output of "nm" (which gets parsed to
-produce the final linker version script). But due to this additional
-"_", ld no longer matches with the symbols since "ld" does the matching
-with the original symbol name, not the one prefixed with "_".
-
-Due to this, none of the symbols in libgcc/config/bfin/libgcc-glibc.ver
-are actually matched with symbols in libgcc. This causes all libgcc
-symbols to be left as "LOCAL", which causes lots of "undefined
-reference" whenever some C or C++ code that calls a function of libgcc
-is compiled.
-
-To address this, this commit introduces a "skip_underscore" variable to
-the mkmap-symver script. It tells mkmap-symver to ignore the leading
-underscore from the "nm" output.
-
-Note that this new argument is different from the existing
-"leading_underscore" argument, which *adds* an additional underscore to
-the generated linker version script.
-
-Having this functionality paves the way to using the generic linker
-version information for Blackfin, instead of using a custom one.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- libgcc/mkmap-symver.awk | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/libgcc/mkmap-symver.awk b/libgcc/mkmap-symver.awk
-index 266832a..30bb179 100644
---- a/libgcc/mkmap-symver.awk
-+++ b/libgcc/mkmap-symver.awk
-@@ -47,7 +47,11 @@ state == "nm" && ($1 == "U" || $2 == "U") {
-
- state == "nm" && NF == 3 {
- split ($3, s, "@")
-- def[s[1]] = 1;
-+ if (skip_underscore)
-+ symname = substr(s[1], 2);
-+ else
-+ symname = s[1];
-+ def[symname] = 1;
- sawsymbol = 1;
- next;
- }
---
-2.7.4
-
diff --git a/patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch b/patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
deleted file mode 100644
index 454295d..0000000
--- a/patches/gcc/6.3.0/893-libgcc-config-bfin-use-the-generic-linker-version-in.patch
+++ /dev/null
@@ -1,1944 +0,0 @@
-From 56d606931716de30a89a40dc69a9282c1b4e2880 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Thu, 18 Aug 2016 18:04:06 +0200
-Subject: [PATCH] libgcc/config/bfin: use the generic linker version
- information
-
-This commit makes the Blackfin platform use the generic linker version
-information, rather than a completely duplicated file, specific for the
-Blackfin architecture.
-
-This is made possible using the newly introduced skip_underscore
-variable of the mkmap-symver script.
-
-This also allows to get a correct linker version file, with symbol names
-matching the ones found in libgcc. Thanks to this, the necessary symbols
-are marked "GLOBAL" instead of "LOCAL", which makes them visible at link
-time, and solves a large number of "undefined reference"
-issues. Indeed, the Blackfin specific linker version script had an extra
-underscore in front of all symbols, which meant none of them matched the
-symbols in libgcc, and therefore all libgcc symbols were marked as
-"LOCAL", making them invisible for linking.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- libgcc/config/bfin/libgcc-glibc.ver | 1894 +----------------------------------
- libgcc/config/bfin/t-linux | 3 +-
- 2 files changed, 4 insertions(+), 1893 deletions(-)
-
-diff --git a/libgcc/config/bfin/libgcc-glibc.ver b/libgcc/config/bfin/libgcc-glibc.ver
-index b1bd2df..2af3df7 100644
---- a/libgcc/config/bfin/libgcc-glibc.ver
-+++ b/libgcc/config/bfin/libgcc-glibc.ver
-@@ -16,1898 +16,8 @@
- # along with GCC; see the file COPYING3. If not see
- # <http://www.gnu.org/licenses/>.
-
--GCC_3.0 {
-- # libgcc1 integer symbols
-- ___absvsi2
-- ___addvsi3
-- ___ashlsi3
-- ___ashrsi3
-- ___divsi3
-- ___lshrsi3
-- ___modsi3
-- ___mulsi3
-- ___mulvsi3
-- ___negvsi2
-- ___subvsi3
-- ___udivsi3
-- ___umodsi3
--
-- # libgcc1 floating point symbols
-- ___addsf3
-- ___adddf3
-- ___addxf3
-- ___addtf3
-- ___divsf3
-- ___divdf3
-- ___divxf3
-- ___divtf3
-- ___eqsf2
-- ___eqdf2
-- ___eqxf2
-- ___eqtf2
-- ___extenddfxf2
-- ___extenddftf2
-- ___extendsfdf2
-- ___extendsfxf2
-- ___extendsftf2
-- ___fixsfsi
-- ___fixdfsi
-- ___fixxfsi
-- ___fixtfsi
-- ___floatsisf
-- ___floatsidf
-- ___floatsixf
-- ___floatsitf
-- ___gesf2
-- ___gedf2
-- ___gexf2
-- ___getf2
-- ___gtsf2
-- ___gtdf2
-- ___gtxf2
-- ___gttf2
-- ___lesf2
-- ___ledf2
-- ___lexf2
-- ___letf2
-- ___ltsf2
-- ___ltdf2
-- ___ltxf2
-- ___lttf2
-- ___mulsf3
-- ___muldf3
-- ___mulxf3
-- ___multf3
-- ___negsf2
-- ___negdf2
-- ___negxf2
-- ___negtf2
-- ___nesf2
-- ___nedf2
-- ___nexf2
-- ___netf2
-- ___subsf3
-- ___subdf3
-- ___subxf3
-- ___subtf3
-- ___truncdfsf2
-- ___truncxfsf2
-- ___trunctfsf2
-- ___truncxfdf2
-- ___trunctfdf2
--
-- # libgcc2 DImode arithmetic (for 32-bit targets).
-- ___absvdi2
-- ___addvdi3
-- ___ashldi3
-- ___ashrdi3
-- ___cmpdi2
-- ___divdi3
-- ___ffsdi2
-- ___fixdfdi
-- ___fixsfdi
-- ___fixtfdi
-- ___fixxfdi
-- ___fixunsdfdi
-- ___fixunsdfsi
-- ___fixunssfsi
-- ___fixunssfdi
-- ___fixunstfdi
-- ___fixunstfsi
-- ___fixunsxfdi
-- ___fixunsxfsi
-- ___floatdidf
-- ___floatdisf
-- ___floatdixf
-- ___floatditf
-- ___lshrdi3
-- ___moddi3
-- ___muldi3
-- ___mulvdi3
-- ___negdi2
-- ___negvdi2
-- ___subvdi3
-- ___ucmpdi2
-- ___udivdi3
-- ___udivmoddi4
-- ___umoddi3
--
-- # libgcc2 TImode arithmetic (for 64-bit targets).
-- ___ashlti3
-- ___ashrti3
-- ___cmpti2
-- ___divti3
-- ___ffsti2
-- ___fixdfti
-- ___fixsfti
-- ___fixtfti
-- ___fixxfti
-- ___lshrti3
-- ___modti3
-- ___multi3
-- ___negti2
-- ___ucmpti2
-- ___udivmodti4
-- ___udivti3
-- ___umodti3
-- ___fixunsdfti
-- ___fixunssfti
-- ___fixunstfti
-- ___fixunsxfti
-- ___floattidf
-- ___floattisf
-- ___floattixf
-- ___floattitf
--
-- # Used to deal with trampoline initialization on some platforms
-- ___clear_cache
--
-- # EH symbols
-- __Unwind_DeleteException
-- __Unwind_Find_FDE
-- __Unwind_ForcedUnwind
-- __Unwind_GetGR
-- __Unwind_GetIP
-- __Unwind_GetLanguageSpecificData
-- __Unwind_GetRegionStart
-- __Unwind_GetTextRelBase
-- __Unwind_GetDataRelBase
-- __Unwind_RaiseException
-- __Unwind_Resume
-- __Unwind_SetGR
-- __Unwind_SetIP
-- ___deregister_frame
-- ___deregister_frame_info
-- ___deregister_frame_info_bases
-- ___register_frame
-- ___register_frame_info
-- ___register_frame_info_bases
-- ___register_frame_info_table
-- ___register_frame_info_table_bases
-- ___register_frame_table
--
-- # SjLj EH symbols
-- __Unwind_SjLj_Register
-- __Unwind_SjLj_Unregister
-- __Unwind_SjLj_RaiseException
-- __Unwind_SjLj_ForcedUnwind
-- __Unwind_SjLj_Resume
--}
--
--%inherit GCC_3.3 GCC_3.0
--GCC_3.3 {
-- __Unwind_FindEnclosingFunction
-- __Unwind_GetCFA
-- __Unwind_Backtrace
-- __Unwind_Resume_or_Rethrow
-- __Unwind_SjLj_Resume_or_Rethrow
--}
--
--%inherit GCC_3.3.1 GCC_3.3
--GCC_3.3.1 {
-- ___gcc_personality_sj0
-- ___gcc_personality_v0
--}
--
--%inherit GCC_3.3.2 GCC_3.3.1
--GCC_3.3.2 {
--}
--%inherit GCC_3.3.4 GCC_3.3.2
--GCC_3.3.4 {
-- ___unorddf2
-- ___unordsf2
--}
--
--%inherit GCC_3.4 GCC_3.3.4
--GCC_3.4 {
-- # bit scanning and counting built-ins
-- ___clzsi2
-- ___clzdi2
-- ___clzti2
-- ___ctzsi2
-- ___ctzdi2
-- ___ctzti2
-- ___popcountsi2
-- ___popcountdi2
-- ___popcountti2
-- ___paritysi2
-- ___paritydi2
-- ___parityti2
--}
--
--%inherit GCC_3.4.2 GCC_3.4
--GCC_3.4.2 {
-- # Used to deal with trampoline initialization on some platforms
-- ___enable_execute_stack
-- ___trampoline_setup
--}
--
--%inherit GCC_3.4.4 GCC_3.4.2
--GCC_3.4.4 {
-- # libgcc2 TImode arithmetic (for 64-bit targets).
-- ___absvti2
-- ___addvti3
-- ___mulvti3
-- ___negvti2
-- ___subvti3
--}
--
--%inherit GCC_4.0.0 GCC_3.4.4
--GCC_4.0.0 {
-- # libgcc2 __builtin_powi helpers.
-- ___powisf2
-- ___powidf2
-- ___powixf2
-- ___powitf2
--
-- # c99 compliant complex arithmetic
-- ___divsc3
-- ___divdc3
-- ___divxc3
-- ___divtc3
-- ___mulsc3
-- ___muldc3
-- ___mulxc3
-- ___multc3
--}
--
- %inherit GCC_4.1.0 GCC_4.0.0
- GCC_4.1.0 {
-- ___smulsi3_highpart
-- ___umulsi3_highpart
--}
--
--%inherit GCC_4.2.0 GCC_4.1.0
--GCC_4.2.0 {
-- # unsigned-to-floating conversions
-- ___floatunsisf
-- ___floatunsidf
-- ___floatunsixf
-- ___floatunsitf
-- ___floatundidf
-- ___floatundisf
-- ___floatundixf
-- ___floatunditf
-- ___floatuntidf
-- ___floatuntisf
-- ___floatuntixf
-- ___floatuntitf
-- __Unwind_GetIPInfo
--}
--
--%inherit GCC_4.3.0 GCC_4.2.0
--GCC_4.3.0 {
-- # byte swapping routines
-- ___bswapsi2
-- ___bswapdi2
-- ___emutls_get_address
-- ___emutls_register_common
-- ___ffssi2
-- ___extendxftf2
-- ___trunctfxf2
--
-- # fixed-point routines
-- ___addqq3
-- ___addhq3
-- ___addsq3
-- ___adddq3
-- ___addtq3
-- ___adduqq3
-- ___adduhq3
-- ___addusq3
-- ___addudq3
-- ___addutq3
-- ___addha3
-- ___addsa3
-- ___addda3
-- ___addta3
-- ___adduha3
-- ___addusa3
-- ___adduda3
-- ___adduta3
-- ___ssaddqq3
-- ___ssaddhq3
-- ___ssaddsq3
-- ___ssadddq3
-- ___ssaddtq3
-- ___ssaddha3
-- ___ssaddsa3
-- ___ssaddda3
-- ___ssaddta3
-- ___usadduqq3
-- ___usadduhq3
-- ___usaddusq3
-- ___usaddudq3
-- ___usaddutq3
-- ___usadduha3
-- ___usaddusa3
-- ___usadduda3
-- ___usadduta3
-- ___subqq3
-- ___subhq3
-- ___subsq3
-- ___subdq3
-- ___subtq3
-- ___subuqq3
-- ___subuhq3
-- ___subusq3
-- ___subudq3
-- ___subutq3
-- ___subha3
-- ___subsa3
-- ___subda3
-- ___subta3
-- ___subuha3
-- ___subusa3
-- ___subuda3
-- ___subuta3
-- ___sssubqq3
-- ___sssubhq3
-- ___sssubsq3
-- ___sssubdq3
-- ___sssubtq3
-- ___sssubha3
-- ___sssubsa3
-- ___sssubda3
-- ___sssubta3
-- ___ussubuqq3
-- ___ussubuhq3
-- ___ussubusq3
-- ___ussubudq3
-- ___ussubutq3
-- ___ussubuha3
-- ___ussubusa3
-- ___ussubuda3
-- ___ussubuta3
-- ___mulqq3
-- ___mulhq3
-- ___mulsq3
-- ___muldq3
-- ___multq3
-- ___muluqq3
-- ___muluhq3
-- ___mulusq3
-- ___muludq3
-- ___mulutq3
-- ___mulha3
-- ___mulsa3
-- ___mulda3
-- ___multa3
-- ___muluha3
-- ___mulusa3
-- ___muluda3
-- ___muluta3
-- ___ssmulqq3
-- ___ssmulhq3
-- ___ssmulsq3
-- ___ssmuldq3
-- ___ssmultq3
-- ___ssmulha3
-- ___ssmulsa3
-- ___ssmulda3
-- ___ssmulta3
-- ___usmuluqq3
-- ___usmuluhq3
-- ___usmulusq3
-- ___usmuludq3
-- ___usmulutq3
-- ___usmuluha3
-- ___usmulusa3
-- ___usmuluda3
-- ___usmuluta3
-- ___divqq3
-- ___divhq3
-- ___divsq3
-- ___divdq3
-- ___divtq3
-- ___divha3
-- ___divsa3
-- ___divda3
-- ___divta3
-- ___udivuqq3
-- ___udivuhq3
-- ___udivusq3
-- ___udivudq3
-- ___udivutq3
-- ___udivuha3
-- ___udivusa3
-- ___udivuda3
-- ___udivuta3
-- ___ssdivqq3
-- ___ssdivhq3
-- ___ssdivsq3
-- ___ssdivdq3
-- ___ssdivtq3
-- ___ssdivha3
-- ___ssdivsa3
-- ___ssdivda3
-- ___ssdivta3
-- ___usdivuqq3
-- ___usdivuhq3
-- ___usdivusq3
-- ___usdivudq3
-- ___usdivutq3
-- ___usdivuha3
-- ___usdivusa3
-- ___usdivuda3
-- ___usdivuta3
-- ___negqq2
-- ___neghq2
-- ___negsq2
-- ___negdq2
-- ___negtq2
-- ___neguqq2
-- ___neguhq2
-- ___negusq2
-- ___negudq2
-- ___negutq2
-- ___negha2
-- ___negsa2
-- ___negda2
-- ___negta2
-- ___neguha2
-- ___negusa2
-- ___neguda2
-- ___neguta2
-- ___ssnegqq2
-- ___ssneghq2
-- ___ssnegsq2
-- ___ssnegdq2
-- ___ssnegtq2
-- ___ssnegha2
-- ___ssnegsa2
-- ___ssnegda2
-- ___ssnegta2
-- ___usneguqq2
-- ___usneguhq2
-- ___usnegusq2
-- ___usnegudq2
-- ___usnegutq2
-- ___usneguha2
-- ___usnegusa2
-- ___usneguda2
-- ___usneguta2
-- ___ashlqq3
-- ___ashlhq3
-- ___ashlsq3
-- ___ashldq3
-- ___ashltq3
-- ___ashluqq3
-- ___ashluhq3
-- ___ashlusq3
-- ___ashludq3
-- ___ashlutq3
-- ___ashlha3
-- ___ashlsa3
-- ___ashlda3
-- ___ashlta3
-- ___ashluha3
-- ___ashlusa3
-- ___ashluda3
-- ___ashluta3
-- ___ashrqq3
-- ___ashrhq3
-- ___ashrsq3
-- ___ashrdq3
-- ___ashrtq3
-- ___ashrha3
-- ___ashrsa3
-- ___ashrda3
-- ___ashrta3
-- ___lshruqq3
-- ___lshruhq3
-- ___lshrusq3
-- ___lshrudq3
-- ___lshrutq3
-- ___lshruha3
-- ___lshrusa3
-- ___lshruda3
-- ___lshruta3
-- ___ssashlqq3
-- ___ssashlhq3
-- ___ssashlsq3
-- ___ssashldq3
-- ___ssashltq3
-- ___ssashlha3
-- ___ssashlsa3
-- ___ssashlda3
-- ___ssashlta3
-- ___usashluqq3
-- ___usashluhq3
-- ___usashlusq3
-- ___usashludq3
-- ___usashlutq3
-- ___usashluha3
-- ___usashlusa3
-- ___usashluda3
-- ___usashluta3
-- ___cmpqq2
-- ___cmphq2
-- ___cmpsq2
-- ___cmpdq2
-- ___cmptq2
-- ___cmpuqq2
-- ___cmpuhq2
-- ___cmpusq2
-- ___cmpudq2
-- ___cmputq2
-- ___cmpha2
-- ___cmpsa2
-- ___cmpda2
-- ___cmpta2
-- ___cmpuha2
-- ___cmpusa2
-- ___cmpuda2
-- ___cmputa2
-- ___fractqqhq2
-- ___fractqqsq2
-- ___fractqqdq2
-- ___fractqqtq2
-- ___fractqqha
-- ___fractqqsa
-- ___fractqqda
-- ___fractqqta
-- ___fractqquqq
-- ___fractqquhq
-- ___fractqqusq
-- ___fractqqudq
-- ___fractqqutq
-- ___fractqquha
-- ___fractqqusa
-- ___fractqquda
-- ___fractqquta
-- ___fractqqqi
-- ___fractqqhi
-- ___fractqqsi
-- ___fractqqdi
-- ___fractqqti
-- ___fractqqsf
-- ___fractqqdf
-- ___fracthqqq2
-- ___fracthqsq2
-- ___fracthqdq2
-- ___fracthqtq2
-- ___fracthqha
-- ___fracthqsa
-- ___fracthqda
-- ___fracthqta
-- ___fracthquqq
-- ___fracthquhq
-- ___fracthqusq
-- ___fracthqudq
-- ___fracthqutq
-- ___fracthquha
-- ___fracthqusa
-- ___fracthquda
-- ___fracthquta
-- ___fracthqqi
-- ___fracthqhi
-- ___fracthqsi
-- ___fracthqdi
-- ___fracthqti
-- ___fracthqsf
-- ___fracthqdf
-- ___fractsqqq2
-- ___fractsqhq2
-- ___fractsqdq2
-- ___fractsqtq2
-- ___fractsqha
-- ___fractsqsa
-- ___fractsqda
-- ___fractsqta
-- ___fractsquqq
-- ___fractsquhq
-- ___fractsqusq
-- ___fractsqudq
-- ___fractsqutq
-- ___fractsquha
-- ___fractsqusa
-- ___fractsquda
-- ___fractsquta
-- ___fractsqqi
-- ___fractsqhi
-- ___fractsqsi
-- ___fractsqdi
-- ___fractsqti
-- ___fractsqsf
-- ___fractsqdf
-- ___fractdqqq2
-- ___fractdqhq2
-- ___fractdqsq2
-- ___fractdqtq2
-- ___fractdqha
-- ___fractdqsa
-- ___fractdqda
-- ___fractdqta
-- ___fractdquqq
-- ___fractdquhq
-- ___fractdqusq
-- ___fractdqudq
-- ___fractdqutq
-- ___fractdquha
-- ___fractdqusa
-- ___fractdquda
-- ___fractdquta
-- ___fractdqqi
-- ___fractdqhi
-- ___fractdqsi
-- ___fractdqdi
-- ___fractdqti
-- ___fractdqsf
-- ___fractdqdf
-- ___fracttqqq2
-- ___fracttqhq2
-- ___fracttqsq2
-- ___fracttqdq2
-- ___fracttqha
-- ___fracttqsa
-- ___fracttqda
-- ___fracttqta
-- ___fracttquqq
-- ___fracttquhq
-- ___fracttqusq
-- ___fracttqudq
-- ___fracttqutq
-- ___fracttquha
-- ___fracttqusa
-- ___fracttquda
-- ___fracttquta
-- ___fracttqqi
-- ___fracttqhi
-- ___fracttqsi
-- ___fracttqdi
-- ___fracttqti
-- ___fracttqsf
-- ___fracttqdf
-- ___fracthaqq
-- ___fracthahq
-- ___fracthasq
-- ___fracthadq
-- ___fracthatq
-- ___fracthasa2
-- ___fracthada2
-- ___fracthata2
-- ___fracthauqq
-- ___fracthauhq
-- ___fracthausq
-- ___fracthaudq
-- ___fracthautq
-- ___fracthauha
-- ___fracthausa
-- ___fracthauda
-- ___fracthauta
-- ___fracthaqi
-- ___fracthahi
-- ___fracthasi
-- ___fracthadi
-- ___fracthati
-- ___fracthasf
-- ___fracthadf
-- ___fractsaqq
-- ___fractsahq
-- ___fractsasq
-- ___fractsadq
-- ___fractsatq
-- ___fractsaha2
-- ___fractsada2
-- ___fractsata2
-- ___fractsauqq
-- ___fractsauhq
-- ___fractsausq
-- ___fractsaudq
-- ___fractsautq
-- ___fractsauha
-- ___fractsausa
-- ___fractsauda
-- ___fractsauta
-- ___fractsaqi
-- ___fractsahi
-- ___fractsasi
-- ___fractsadi
-- ___fractsati
-- ___fractsasf
-- ___fractsadf
-- ___fractdaqq
-- ___fractdahq
-- ___fractdasq
-- ___fractdadq
-- ___fractdatq
-- ___fractdaha2
-- ___fractdasa2
-- ___fractdata2
-- ___fractdauqq
-- ___fractdauhq
-- ___fractdausq
-- ___fractdaudq
-- ___fractdautq
-- ___fractdauha
-- ___fractdausa
-- ___fractdauda
-- ___fractdauta
-- ___fractdaqi
-- ___fractdahi
-- ___fractdasi
-- ___fractdadi
-- ___fractdati
-- ___fractdasf
-- ___fractdadf
-- ___fracttaqq
-- ___fracttahq
-- ___fracttasq
-- ___fracttadq
-- ___fracttatq
-- ___fracttaha2
-- ___fracttasa2
-- ___fracttada2
-- ___fracttauqq
-- ___fracttauhq
-- ___fracttausq
-- ___fracttaudq
-- ___fracttautq
-- ___fracttauha
-- ___fracttausa
-- ___fracttauda
-- ___fracttauta
-- ___fracttaqi
-- ___fracttahi
-- ___fracttasi
-- ___fracttadi
-- ___fracttati
-- ___fracttasf
-- ___fracttadf
-- ___fractuqqqq
-- ___fractuqqhq
-- ___fractuqqsq
-- ___fractuqqdq
-- ___fractuqqtq
-- ___fractuqqha
-- ___fractuqqsa
-- ___fractuqqda
-- ___fractuqqta
-- ___fractuqquhq2
-- ___fractuqqusq2
-- ___fractuqqudq2
-- ___fractuqqutq2
-- ___fractuqquha
-- ___fractuqqusa
-- ___fractuqquda
-- ___fractuqquta
-- ___fractuqqqi
-- ___fractuqqhi
-- ___fractuqqsi
-- ___fractuqqdi
-- ___fractuqqti
-- ___fractuqqsf
-- ___fractuqqdf
-- ___fractuhqqq
-- ___fractuhqhq
-- ___fractuhqsq
-- ___fractuhqdq
-- ___fractuhqtq
-- ___fractuhqha
-- ___fractuhqsa
-- ___fractuhqda
-- ___fractuhqta
-- ___fractuhquqq2
-- ___fractuhqusq2
-- ___fractuhqudq2
-- ___fractuhqutq2
-- ___fractuhquha
-- ___fractuhqusa
-- ___fractuhquda
-- ___fractuhquta
-- ___fractuhqqi
-- ___fractuhqhi
-- ___fractuhqsi
-- ___fractuhqdi
-- ___fractuhqti
-- ___fractuhqsf
-- ___fractuhqdf
-- ___fractusqqq
-- ___fractusqhq
-- ___fractusqsq
-- ___fractusqdq
-- ___fractusqtq
-- ___fractusqha
-- ___fractusqsa
-- ___fractusqda
-- ___fractusqta
-- ___fractusquqq2
-- ___fractusquhq2
-- ___fractusqudq2
-- ___fractusqutq2
-- ___fractusquha
-- ___fractusqusa
-- ___fractusquda
-- ___fractusquta
-- ___fractusqqi
-- ___fractusqhi
-- ___fractusqsi
-- ___fractusqdi
-- ___fractusqti
-- ___fractusqsf
-- ___fractusqdf
-- ___fractudqqq
-- ___fractudqhq
-- ___fractudqsq
-- ___fractudqdq
-- ___fractudqtq
-- ___fractudqha
-- ___fractudqsa
-- ___fractudqda
-- ___fractudqta
-- ___fractudquqq2
-- ___fractudquhq2
-- ___fractudqusq2
-- ___fractudqutq2
-- ___fractudquha
-- ___fractudqusa
-- ___fractudquda
-- ___fractudquta
-- ___fractudqqi
-- ___fractudqhi
-- ___fractudqsi
-- ___fractudqdi
-- ___fractudqti
-- ___fractudqsf
-- ___fractudqdf
-- ___fractutqqq
-- ___fractutqhq
-- ___fractutqsq
-- ___fractutqdq
-- ___fractutqtq
-- ___fractutqha
-- ___fractutqsa
-- ___fractutqda
-- ___fractutqta
-- ___fractutquqq2
-- ___fractutquhq2
-- ___fractutqusq2
-- ___fractutqudq2
-- ___fractutquha
-- ___fractutqusa
-- ___fractutquda
-- ___fractutquta
-- ___fractutqqi
-- ___fractutqhi
-- ___fractutqsi
-- ___fractutqdi
-- ___fractutqti
-- ___fractutqsf
-- ___fractutqdf
-- ___fractuhaqq
-- ___fractuhahq
-- ___fractuhasq
-- ___fractuhadq
-- ___fractuhatq
-- ___fractuhaha
-- ___fractuhasa
-- ___fractuhada
-- ___fractuhata
-- ___fractuhauqq
-- ___fractuhauhq
-- ___fractuhausq
-- ___fractuhaudq
-- ___fractuhautq
-- ___fractuhausa2
-- ___fractuhauda2
-- ___fractuhauta2
-- ___fractuhaqi
-- ___fractuhahi
-- ___fractuhasi
-- ___fractuhadi
-- ___fractuhati
-- ___fractuhasf
-- ___fractuhadf
-- ___fractusaqq
-- ___fractusahq
-- ___fractusasq
-- ___fractusadq
-- ___fractusatq
-- ___fractusaha
-- ___fractusasa
-- ___fractusada
-- ___fractusata
-- ___fractusauqq
-- ___fractusauhq
-- ___fractusausq
-- ___fractusaudq
-- ___fractusautq
-- ___fractusauha2
-- ___fractusauda2
-- ___fractusauta2
-- ___fractusaqi
-- ___fractusahi
-- ___fractusasi
-- ___fractusadi
-- ___fractusati
-- ___fractusasf
-- ___fractusadf
-- ___fractudaqq
-- ___fractudahq
-- ___fractudasq
-- ___fractudadq
-- ___fractudatq
-- ___fractudaha
-- ___fractudasa
-- ___fractudada
-- ___fractudata
-- ___fractudauqq
-- ___fractudauhq
-- ___fractudausq
-- ___fractudaudq
-- ___fractudautq
-- ___fractudauha2
-- ___fractudausa2
-- ___fractudauta2
-- ___fractudaqi
-- ___fractudahi
-- ___fractudasi
-- ___fractudadi
-- ___fractudati
-- ___fractudasf
-- ___fractudadf
-- ___fractutaqq
-- ___fractutahq
-- ___fractutasq
-- ___fractutadq
-- ___fractutatq
-- ___fractutaha
-- ___fractutasa
-- ___fractutada
-- ___fractutata
-- ___fractutauqq
-- ___fractutauhq
-- ___fractutausq
-- ___fractutaudq
-- ___fractutautq
-- ___fractutauha2
-- ___fractutausa2
-- ___fractutauda2
-- ___fractutaqi
-- ___fractutahi
-- ___fractutasi
-- ___fractutadi
-- ___fractutati
-- ___fractutasf
-- ___fractutadf
-- ___fractqiqq
-- ___fractqihq
-- ___fractqisq
-- ___fractqidq
-- ___fractqitq
-- ___fractqiha
-- ___fractqisa
-- ___fractqida
-- ___fractqita
-- ___fractqiuqq
-- ___fractqiuhq
-- ___fractqiusq
-- ___fractqiudq
-- ___fractqiutq
-- ___fractqiuha
-- ___fractqiusa
-- ___fractqiuda
-- ___fractqiuta
-- ___fracthiqq
-- ___fracthihq
-- ___fracthisq
-- ___fracthidq
-- ___fracthitq
-- ___fracthiha
-- ___fracthisa
-- ___fracthida
-- ___fracthita
-- ___fracthiuqq
-- ___fracthiuhq
-- ___fracthiusq
-- ___fracthiudq
-- ___fracthiutq
-- ___fracthiuha
-- ___fracthiusa
-- ___fracthiuda
-- ___fracthiuta
-- ___fractsiqq
-- ___fractsihq
-- ___fractsisq
-- ___fractsidq
-- ___fractsitq
-- ___fractsiha
-- ___fractsisa
-- ___fractsida
-- ___fractsita
-- ___fractsiuqq
-- ___fractsiuhq
-- ___fractsiusq
-- ___fractsiudq
-- ___fractsiutq
-- ___fractsiuha
-- ___fractsiusa
-- ___fractsiuda
-- ___fractsiuta
-- ___fractdiqq
-- ___fractdihq
-- ___fractdisq
-- ___fractdidq
-- ___fractditq
-- ___fractdiha
-- ___fractdisa
-- ___fractdida
-- ___fractdita
-- ___fractdiuqq
-- ___fractdiuhq
-- ___fractdiusq
-- ___fractdiudq
-- ___fractdiutq
-- ___fractdiuha
-- ___fractdiusa
-- ___fractdiuda
-- ___fractdiuta
-- ___fracttiqq
-- ___fracttihq
-- ___fracttisq
-- ___fracttidq
-- ___fracttitq
-- ___fracttiha
-- ___fracttisa
-- ___fracttida
-- ___fracttita
-- ___fracttiuqq
-- ___fracttiuhq
-- ___fracttiusq
-- ___fracttiudq
-- ___fracttiutq
-- ___fracttiuha
-- ___fracttiusa
-- ___fracttiuda
-- ___fracttiuta
-- ___fractsfqq
-- ___fractsfhq
-- ___fractsfsq
-- ___fractsfdq
-- ___fractsftq
-- ___fractsfha
-- ___fractsfsa
-- ___fractsfda
-- ___fractsfta
-- ___fractsfuqq
-- ___fractsfuhq
-- ___fractsfusq
-- ___fractsfudq
-- ___fractsfutq
-- ___fractsfuha
-- ___fractsfusa
-- ___fractsfuda
-- ___fractsfuta
-- ___fractdfqq
-- ___fractdfhq
-- ___fractdfsq
-- ___fractdfdq
-- ___fractdftq
-- ___fractdfha
-- ___fractdfsa
-- ___fractdfda
-- ___fractdfta
-- ___fractdfuqq
-- ___fractdfuhq
-- ___fractdfusq
-- ___fractdfudq
-- ___fractdfutq
-- ___fractdfuha
-- ___fractdfusa
-- ___fractdfuda
-- ___fractdfuta
-- ___satfractqqhq2
-- ___satfractqqsq2
-- ___satfractqqdq2
-- ___satfractqqtq2
-- ___satfractqqha
-- ___satfractqqsa
-- ___satfractqqda
-- ___satfractqqta
-- ___satfractqquqq
-- ___satfractqquhq
-- ___satfractqqusq
-- ___satfractqqudq
-- ___satfractqqutq
-- ___satfractqquha
-- ___satfractqqusa
-- ___satfractqquda
-- ___satfractqquta
-- ___satfracthqqq2
-- ___satfracthqsq2
-- ___satfracthqdq2
-- ___satfracthqtq2
-- ___satfracthqha
-- ___satfracthqsa
-- ___satfracthqda
-- ___satfracthqta
-- ___satfracthquqq
-- ___satfracthquhq
-- ___satfracthqusq
-- ___satfracthqudq
-- ___satfracthqutq
-- ___satfracthquha
-- ___satfracthqusa
-- ___satfracthquda
-- ___satfracthquta
-- ___satfractsqqq2
-- ___satfractsqhq2
-- ___satfractsqdq2
-- ___satfractsqtq2
-- ___satfractsqha
-- ___satfractsqsa
-- ___satfractsqda
-- ___satfractsqta
-- ___satfractsquqq
-- ___satfractsquhq
-- ___satfractsqusq
-- ___satfractsqudq
-- ___satfractsqutq
-- ___satfractsquha
-- ___satfractsqusa
-- ___satfractsquda
-- ___satfractsquta
-- ___satfractdqqq2
-- ___satfractdqhq2
-- ___satfractdqsq2
-- ___satfractdqtq2
-- ___satfractdqha
-- ___satfractdqsa
-- ___satfractdqda
-- ___satfractdqta
-- ___satfractdquqq
-- ___satfractdquhq
-- ___satfractdqusq
-- ___satfractdqudq
-- ___satfractdqutq
-- ___satfractdquha
-- ___satfractdqusa
-- ___satfractdquda
-- ___satfractdquta
-- ___satfracttqqq2
-- ___satfracttqhq2
-- ___satfracttqsq2
-- ___satfracttqdq2
-- ___satfracttqha
-- ___satfracttqsa
-- ___satfracttqda
-- ___satfracttqta
-- ___satfracttquqq
-- ___satfracttquhq
-- ___satfracttqusq
-- ___satfracttqudq
-- ___satfracttqutq
-- ___satfracttquha
-- ___satfracttqusa
-- ___satfracttquda
-- ___satfracttquta
-- ___satfracthaqq
-- ___satfracthahq
-- ___satfracthasq
-- ___satfracthadq
-- ___satfracthatq
-- ___satfracthasa2
-- ___satfracthada2
-- ___satfracthata2
-- ___satfracthauqq
-- ___satfracthauhq
-- ___satfracthausq
-- ___satfracthaudq
-- ___satfracthautq
-- ___satfracthauha
-- ___satfracthausa
-- ___satfracthauda
-- ___satfracthauta
-- ___satfractsaqq
-- ___satfractsahq
-- ___satfractsasq
-- ___satfractsadq
-- ___satfractsatq
-- ___satfractsaha2
-- ___satfractsada2
-- ___satfractsata2
-- ___satfractsauqq
-- ___satfractsauhq
-- ___satfractsausq
-- ___satfractsaudq
-- ___satfractsautq
-- ___satfractsauha
-- ___satfractsausa
-- ___satfractsauda
-- ___satfractsauta
-- ___satfractdaqq
-- ___satfractdahq
-- ___satfractdasq
-- ___satfractdadq
-- ___satfractdatq
-- ___satfractdaha2
-- ___satfractdasa2
-- ___satfractdata2
-- ___satfractdauqq
-- ___satfractdauhq
-- ___satfractdausq
-- ___satfractdaudq
-- ___satfractdautq
-- ___satfractdauha
-- ___satfractdausa
-- ___satfractdauda
-- ___satfractdauta
-- ___satfracttaqq
-- ___satfracttahq
-- ___satfracttasq
-- ___satfracttadq
-- ___satfracttatq
-- ___satfracttaha2
-- ___satfracttasa2
-- ___satfracttada2
-- ___satfracttauqq
-- ___satfracttauhq
-- ___satfracttausq
-- ___satfracttaudq
-- ___satfracttautq
-- ___satfracttauha
-- ___satfracttausa
-- ___satfracttauda
-- ___satfracttauta
-- ___satfractuqqqq
-- ___satfractuqqhq
-- ___satfractuqqsq
-- ___satfractuqqdq
-- ___satfractuqqtq
-- ___satfractuqqha
-- ___satfractuqqsa
-- ___satfractuqqda
-- ___satfractuqqta
-- ___satfractuqquhq2
-- ___satfractuqqusq2
-- ___satfractuqqudq2
-- ___satfractuqqutq2
-- ___satfractuqquha
-- ___satfractuqqusa
-- ___satfractuqquda
-- ___satfractuqquta
-- ___satfractuhqqq
-- ___satfractuhqhq
-- ___satfractuhqsq
-- ___satfractuhqdq
-- ___satfractuhqtq
-- ___satfractuhqha
-- ___satfractuhqsa
-- ___satfractuhqda
-- ___satfractuhqta
-- ___satfractuhquqq2
-- ___satfractuhqusq2
-- ___satfractuhqudq2
-- ___satfractuhqutq2
-- ___satfractuhquha
-- ___satfractuhqusa
-- ___satfractuhquda
-- ___satfractuhquta
-- ___satfractusqqq
-- ___satfractusqhq
-- ___satfractusqsq
-- ___satfractusqdq
-- ___satfractusqtq
-- ___satfractusqha
-- ___satfractusqsa
-- ___satfractusqda
-- ___satfractusqta
-- ___satfractusquqq2
-- ___satfractusquhq2
-- ___satfractusqudq2
-- ___satfractusqutq2
-- ___satfractusquha
-- ___satfractusqusa
-- ___satfractusquda
-- ___satfractusquta
-- ___satfractudqqq
-- ___satfractudqhq
-- ___satfractudqsq
-- ___satfractudqdq
-- ___satfractudqtq
-- ___satfractudqha
-- ___satfractudqsa
-- ___satfractudqda
-- ___satfractudqta
-- ___satfractudquqq2
-- ___satfractudquhq2
-- ___satfractudqusq2
-- ___satfractudqutq2
-- ___satfractudquha
-- ___satfractudqusa
-- ___satfractudquda
-- ___satfractudquta
-- ___satfractutqqq
-- ___satfractutqhq
-- ___satfractutqsq
-- ___satfractutqdq
-- ___satfractutqtq
-- ___satfractutqha
-- ___satfractutqsa
-- ___satfractutqda
-- ___satfractutqta
-- ___satfractutquqq2
-- ___satfractutquhq2
-- ___satfractutqusq2
-- ___satfractutqudq2
-- ___satfractutquha
-- ___satfractutqusa
-- ___satfractutquda
-- ___satfractutquta
-- ___satfractuhaqq
-- ___satfractuhahq
-- ___satfractuhasq
-- ___satfractuhadq
-- ___satfractuhatq
-- ___satfractuhaha
-- ___satfractuhasa
-- ___satfractuhada
-- ___satfractuhata
-- ___satfractuhauqq
-- ___satfractuhauhq
-- ___satfractuhausq
-- ___satfractuhaudq
-- ___satfractuhautq
-- ___satfractuhausa2
-- ___satfractuhauda2
-- ___satfractuhauta2
-- ___satfractusaqq
-- ___satfractusahq
-- ___satfractusasq
-- ___satfractusadq
-- ___satfractusatq
-- ___satfractusaha
-- ___satfractusasa
-- ___satfractusada
-- ___satfractusata
-- ___satfractusauqq
-- ___satfractusauhq
-- ___satfractusausq
-- ___satfractusaudq
-- ___satfractusautq
-- ___satfractusauha2
-- ___satfractusauda2
-- ___satfractusauta2
-- ___satfractudaqq
-- ___satfractudahq
-- ___satfractudasq
-- ___satfractudadq
-- ___satfractudatq
-- ___satfractudaha
-- ___satfractudasa
-- ___satfractudada
-- ___satfractudata
-- ___satfractudauqq
-- ___satfractudauhq
-- ___satfractudausq
-- ___satfractudaudq
-- ___satfractudautq
-- ___satfractudauha2
-- ___satfractudausa2
-- ___satfractudauta2
-- ___satfractutaqq
-- ___satfractutahq
-- ___satfractutasq
-- ___satfractutadq
-- ___satfractutatq
-- ___satfractutaha
-- ___satfractutasa
-- ___satfractutada
-- ___satfractutata
-- ___satfractutauqq
-- ___satfractutauhq
-- ___satfractutausq
-- ___satfractutaudq
-- ___satfractutautq
-- ___satfractutauha2
-- ___satfractutausa2
-- ___satfractutauda2
-- ___satfractqiqq
-- ___satfractqihq
-- ___satfractqisq
-- ___satfractqidq
-- ___satfractqitq
-- ___satfractqiha
-- ___satfractqisa
-- ___satfractqida
-- ___satfractqita
-- ___satfractqiuqq
-- ___satfractqiuhq
-- ___satfractqiusq
-- ___satfractqiudq
-- ___satfractqiutq
-- ___satfractqiuha
-- ___satfractqiusa
-- ___satfractqiuda
-- ___satfractqiuta
-- ___satfracthiqq
-- ___satfracthihq
-- ___satfracthisq
-- ___satfracthidq
-- ___satfracthitq
-- ___satfracthiha
-- ___satfracthisa
-- ___satfracthida
-- ___satfracthita
-- ___satfracthiuqq
-- ___satfracthiuhq
-- ___satfracthiusq
-- ___satfracthiudq
-- ___satfracthiutq
-- ___satfracthiuha
-- ___satfracthiusa
-- ___satfracthiuda
-- ___satfracthiuta
-- ___satfractsiqq
-- ___satfractsihq
-- ___satfractsisq
-- ___satfractsidq
-- ___satfractsitq
-- ___satfractsiha
-- ___satfractsisa
-- ___satfractsida
-- ___satfractsita
-- ___satfractsiuqq
-- ___satfractsiuhq
-- ___satfractsiusq
-- ___satfractsiudq
-- ___satfractsiutq
-- ___satfractsiuha
-- ___satfractsiusa
-- ___satfractsiuda
-- ___satfractsiuta
-- ___satfractdiqq
-- ___satfractdihq
-- ___satfractdisq
-- ___satfractdidq
-- ___satfractditq
-- ___satfractdiha
-- ___satfractdisa
-- ___satfractdida
-- ___satfractdita
-- ___satfractdiuqq
-- ___satfractdiuhq
-- ___satfractdiusq
-- ___satfractdiudq
-- ___satfractdiutq
-- ___satfractdiuha
-- ___satfractdiusa
-- ___satfractdiuda
-- ___satfractdiuta
-- ___satfracttiqq
-- ___satfracttihq
-- ___satfracttisq
-- ___satfracttidq
-- ___satfracttitq
-- ___satfracttiha
-- ___satfracttisa
-- ___satfracttida
-- ___satfracttita
-- ___satfracttiuqq
-- ___satfracttiuhq
-- ___satfracttiusq
-- ___satfracttiudq
-- ___satfracttiutq
-- ___satfracttiuha
-- ___satfracttiusa
-- ___satfracttiuda
-- ___satfracttiuta
-- ___satfractsfqq
-- ___satfractsfhq
-- ___satfractsfsq
-- ___satfractsfdq
-- ___satfractsftq
-- ___satfractsfha
-- ___satfractsfsa
-- ___satfractsfda
-- ___satfractsfta
-- ___satfractsfuqq
-- ___satfractsfuhq
-- ___satfractsfusq
-- ___satfractsfudq
-- ___satfractsfutq
-- ___satfractsfuha
-- ___satfractsfusa
-- ___satfractsfuda
-- ___satfractsfuta
-- ___satfractdfqq
-- ___satfractdfhq
-- ___satfractdfsq
-- ___satfractdfdq
-- ___satfractdftq
-- ___satfractdfha
-- ___satfractdfsa
-- ___satfractdfda
-- ___satfractdfta
-- ___satfractdfuqq
-- ___satfractdfuhq
-- ___satfractdfusq
-- ___satfractdfudq
-- ___satfractdfutq
-- ___satfractdfuha
-- ___satfractdfusa
-- ___satfractdfuda
-- ___satfractdfuta
-- ___fractunsqqqi
-- ___fractunsqqhi
-- ___fractunsqqsi
-- ___fractunsqqdi
-- ___fractunsqqti
-- ___fractunshqqi
-- ___fractunshqhi
-- ___fractunshqsi
-- ___fractunshqdi
-- ___fractunshqti
-- ___fractunssqqi
-- ___fractunssqhi
-- ___fractunssqsi
-- ___fractunssqdi
-- ___fractunssqti
-- ___fractunsdqqi
-- ___fractunsdqhi
-- ___fractunsdqsi
-- ___fractunsdqdi
-- ___fractunsdqti
-- ___fractunstqqi
-- ___fractunstqhi
-- ___fractunstqsi
-- ___fractunstqdi
-- ___fractunstqti
-- ___fractunshaqi
-- ___fractunshahi
-- ___fractunshasi
-- ___fractunshadi
-- ___fractunshati
-- ___fractunssaqi
-- ___fractunssahi
-- ___fractunssasi
-- ___fractunssadi
-- ___fractunssati
-- ___fractunsdaqi
-- ___fractunsdahi
-- ___fractunsdasi
-- ___fractunsdadi
-- ___fractunsdati
-- ___fractunstaqi
-- ___fractunstahi
-- ___fractunstasi
-- ___fractunstadi
-- ___fractunstati
-- ___fractunsuqqqi
-- ___fractunsuqqhi
-- ___fractunsuqqsi
-- ___fractunsuqqdi
-- ___fractunsuqqti
-- ___fractunsuhqqi
-- ___fractunsuhqhi
-- ___fractunsuhqsi
-- ___fractunsuhqdi
-- ___fractunsuhqti
-- ___fractunsusqqi
-- ___fractunsusqhi
-- ___fractunsusqsi
-- ___fractunsusqdi
-- ___fractunsusqti
-- ___fractunsudqqi
-- ___fractunsudqhi
-- ___fractunsudqsi
-- ___fractunsudqdi
-- ___fractunsudqti
-- ___fractunsutqqi
-- ___fractunsutqhi
-- ___fractunsutqsi
-- ___fractunsutqdi
-- ___fractunsutqti
-- ___fractunsuhaqi
-- ___fractunsuhahi
-- ___fractunsuhasi
-- ___fractunsuhadi
-- ___fractunsuhati
-- ___fractunsusaqi
-- ___fractunsusahi
-- ___fractunsusasi
-- ___fractunsusadi
-- ___fractunsusati
-- ___fractunsudaqi
-- ___fractunsudahi
-- ___fractunsudasi
-- ___fractunsudadi
-- ___fractunsudati
-- ___fractunsutaqi
-- ___fractunsutahi
-- ___fractunsutasi
-- ___fractunsutadi
-- ___fractunsutati
-- ___fractunsqiqq
-- ___fractunsqihq
-- ___fractunsqisq
-- ___fractunsqidq
-- ___fractunsqitq
-- ___fractunsqiha
-- ___fractunsqisa
-- ___fractunsqida
-- ___fractunsqita
-- ___fractunsqiuqq
-- ___fractunsqiuhq
-- ___fractunsqiusq
-- ___fractunsqiudq
-- ___fractunsqiutq
-- ___fractunsqiuha
-- ___fractunsqiusa
-- ___fractunsqiuda
-- ___fractunsqiuta
-- ___fractunshiqq
-- ___fractunshihq
-- ___fractunshisq
-- ___fractunshidq
-- ___fractunshitq
-- ___fractunshiha
-- ___fractunshisa
-- ___fractunshida
-- ___fractunshita
-- ___fractunshiuqq
-- ___fractunshiuhq
-- ___fractunshiusq
-- ___fractunshiudq
-- ___fractunshiutq
-- ___fractunshiuha
-- ___fractunshiusa
-- ___fractunshiuda
-- ___fractunshiuta
-- ___fractunssiqq
-- ___fractunssihq
-- ___fractunssisq
-- ___fractunssidq
-- ___fractunssitq
-- ___fractunssiha
-- ___fractunssisa
-- ___fractunssida
-- ___fractunssita
-- ___fractunssiuqq
-- ___fractunssiuhq
-- ___fractunssiusq
-- ___fractunssiudq
-- ___fractunssiutq
-- ___fractunssiuha
-- ___fractunssiusa
-- ___fractunssiuda
-- ___fractunssiuta
-- ___fractunsdiqq
-- ___fractunsdihq
-- ___fractunsdisq
-- ___fractunsdidq
-- ___fractunsditq
-- ___fractunsdiha
-- ___fractunsdisa
-- ___fractunsdida
-- ___fractunsdita
-- ___fractunsdiuqq
-- ___fractunsdiuhq
-- ___fractunsdiusq
-- ___fractunsdiudq
-- ___fractunsdiutq
-- ___fractunsdiuha
-- ___fractunsdiusa
-- ___fractunsdiuda
-- ___fractunsdiuta
-- ___fractunstiqq
-- ___fractunstihq
-- ___fractunstisq
-- ___fractunstidq
-- ___fractunstitq
-- ___fractunstiha
-- ___fractunstisa
-- ___fractunstida
-- ___fractunstita
-- ___fractunstiuqq
-- ___fractunstiuhq
-- ___fractunstiusq
-- ___fractunstiudq
-- ___fractunstiutq
-- ___fractunstiuha
-- ___fractunstiusa
-- ___fractunstiuda
-- ___fractunstiuta
-- ___satfractunsqiqq
-- ___satfractunsqihq
-- ___satfractunsqisq
-- ___satfractunsqidq
-- ___satfractunsqitq
-- ___satfractunsqiha
-- ___satfractunsqisa
-- ___satfractunsqida
-- ___satfractunsqita
-- ___satfractunsqiuqq
-- ___satfractunsqiuhq
-- ___satfractunsqiusq
-- ___satfractunsqiudq
-- ___satfractunsqiutq
-- ___satfractunsqiuha
-- ___satfractunsqiusa
-- ___satfractunsqiuda
-- ___satfractunsqiuta
-- ___satfractunshiqq
-- ___satfractunshihq
-- ___satfractunshisq
-- ___satfractunshidq
-- ___satfractunshitq
-- ___satfractunshiha
-- ___satfractunshisa
-- ___satfractunshida
-- ___satfractunshita
-- ___satfractunshiuqq
-- ___satfractunshiuhq
-- ___satfractunshiusq
-- ___satfractunshiudq
-- ___satfractunshiutq
-- ___satfractunshiuha
-- ___satfractunshiusa
-- ___satfractunshiuda
-- ___satfractunshiuta
-- ___satfractunssiqq
-- ___satfractunssihq
-- ___satfractunssisq
-- ___satfractunssidq
-- ___satfractunssitq
-- ___satfractunssiha
-- ___satfractunssisa
-- ___satfractunssida
-- ___satfractunssita
-- ___satfractunssiuqq
-- ___satfractunssiuhq
-- ___satfractunssiusq
-- ___satfractunssiudq
-- ___satfractunssiutq
-- ___satfractunssiuha
-- ___satfractunssiusa
-- ___satfractunssiuda
-- ___satfractunssiuta
-- ___satfractunsdiqq
-- ___satfractunsdihq
-- ___satfractunsdisq
-- ___satfractunsdidq
-- ___satfractunsditq
-- ___satfractunsdiha
-- ___satfractunsdisa
-- ___satfractunsdida
-- ___satfractunsdita
-- ___satfractunsdiuqq
-- ___satfractunsdiuhq
-- ___satfractunsdiusq
-- ___satfractunsdiudq
-- ___satfractunsdiutq
-- ___satfractunsdiuha
-- ___satfractunsdiusa
-- ___satfractunsdiuda
-- ___satfractunsdiuta
-- ___satfractunstiqq
-- ___satfractunstihq
-- ___satfractunstisq
-- ___satfractunstidq
-- ___satfractunstitq
-- ___satfractunstiha
-- ___satfractunstisa
-- ___satfractunstida
-- ___satfractunstita
-- ___satfractunstiuqq
-- ___satfractunstiuhq
-- ___satfractunstiusq
-- ___satfractunstiudq
-- ___satfractunstiutq
-- ___satfractunstiuha
-- ___satfractunstiusa
-- ___satfractunstiuda
-- ___satfractunstiuta
--}
--
--%inherit GCC_4.4.0 GCC_4.3.0
--GCC_4.4.0 {
-- ___sync_fetch_and_add_1
-- ___sync_fetch_and_sub_1
-- ___sync_fetch_and_or_1
-- ___sync_fetch_and_and_1
-- ___sync_fetch_and_xor_1
-- ___sync_fetch_and_nand_1
-- ___sync_add_and_fetch_1
-- ___sync_sub_and_fetch_1
-- ___sync_or_and_fetch_1
-- ___sync_and_and_fetch_1
-- ___sync_xor_and_fetch_1
-- ___sync_nand_and_fetch_1
-- ___sync_bool_compare_and_swap_1
-- ___sync_val_compare_and_swap_1
-- ___sync_lock_test_and_set_1
--
-- ___sync_fetch_and_add_2
-- ___sync_fetch_and_sub_2
-- ___sync_fetch_and_or_2
-- ___sync_fetch_and_and_2
-- ___sync_fetch_and_xor_2
-- ___sync_fetch_and_nand_2
-- ___sync_add_and_fetch_2
-- ___sync_sub_and_fetch_2
-- ___sync_or_and_fetch_2
-- ___sync_and_and_fetch_2
-- ___sync_xor_and_fetch_2
-- ___sync_nand_and_fetch_2
-- ___sync_bool_compare_and_swap_2
-- ___sync_val_compare_and_swap_2
-- ___sync_lock_test_and_set_2
--
-- ___sync_fetch_and_add_4
-- ___sync_fetch_and_sub_4
-- ___sync_fetch_and_or_4
-- ___sync_fetch_and_and_4
-- ___sync_fetch_and_xor_4
-- ___sync_fetch_and_nand_4
-- ___sync_add_and_fetch_4
-- ___sync_sub_and_fetch_4
-- ___sync_or_and_fetch_4
-- ___sync_and_and_fetch_4
-- ___sync_xor_and_fetch_4
-- ___sync_nand_and_fetch_4
-- ___sync_bool_compare_and_swap_4
-- ___sync_val_compare_and_swap_4
-- ___sync_lock_test_and_set_4
--
-- ___sync_fetch_and_add_8
-- ___sync_fetch_and_sub_8
-- ___sync_fetch_and_or_8
-- ___sync_fetch_and_and_8
-- ___sync_fetch_and_xor_8
-- ___sync_fetch_and_nand_8
-- ___sync_add_and_fetch_8
-- ___sync_sub_and_fetch_8
-- ___sync_or_and_fetch_8
-- ___sync_and_and_fetch_8
-- ___sync_xor_and_fetch_8
-- ___sync_nand_and_fetch_8
-- ___sync_bool_compare_and_swap_8
-- ___sync_val_compare_and_swap_8
-- ___sync_lock_test_and_set_8
--
-- ___sync_fetch_and_add_16
-- ___sync_fetch_and_sub_16
-- ___sync_fetch_and_or_16
-- ___sync_fetch_and_and_16
-- ___sync_fetch_and_xor_16
-- ___sync_fetch_and_nand_16
-- ___sync_add_and_fetch_16
-- ___sync_sub_and_fetch_16
-- ___sync_or_and_fetch_16
-- ___sync_and_and_fetch_16
-- ___sync_xor_and_fetch_16
-- ___sync_nand_and_fetch_16
-- ___sync_bool_compare_and_swap_16
-- ___sync_val_compare_and_swap_16
-- ___sync_lock_test_and_set_16
--
-- ___sync_synchronize
--}
--
--%inherit GCC_4.5.0 GCC_4.4.0
--GCC_4.5.0 {
-- ___unordxf2
-- ___unordtf2
-+ __smulsi3_highpart
-+ __umulsi3_highpart
- }
-diff --git a/libgcc/config/bfin/t-linux b/libgcc/config/bfin/t-linux
-index 1c42e48..8898157 100644
---- a/libgcc/config/bfin/t-linux
-+++ b/libgcc/config/bfin/t-linux
-@@ -1 +1,2 @@
--SHLIB_MAPFILES = $(srcdir)/config/bfin/libgcc-glibc.ver
-+SHLIB_MAPFILES += $(srcdir)/config/bfin/libgcc-glibc.ver
-+SHLIB_MKMAP_OPTS = -v skip_underscore=1
---
-2.7.4
-
diff --git a/patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch b/patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
deleted file mode 100644
index ce49de7..0000000
--- a/patches/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9d9f97ca5d1ceba66677bf406c9b31027dc1f22e Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Fri, 19 Aug 2016 13:54:46 +0200
-Subject: [PATCH] libgcc: fix DWARF compilation with FDPIC targets
-
-The build of unwind-dw2-fde-dip.c currently fails for FDPIC targets with
-the following error:
-
-libgcc/unwind-dw2-fde-dip.c:167:31: error: storage size of 'load_base' isn't known
- struct elf32_fdpic_loadaddr load_base;
-
-This patch addresses that by defining load_base with the appropriate
-type on FDPIC targets. It has been tested on FRV and Blackfin.
-
-Fixes PR gcc/68468.
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- libgcc/unwind-dw2-fde-dip.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
-index f7a1c3f..801bce8 100644
---- a/libgcc/unwind-dw2-fde-dip.c
-+++ b/libgcc/unwind-dw2-fde-dip.c
-@@ -124,7 +124,11 @@ static struct frame_hdr_cache_element
- {
- _Unwind_Ptr pc_low;
- _Unwind_Ptr pc_high;
-+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
-+ struct elf32_fdpic_loadaddr load_base;
-+#else
- _Unwind_Ptr load_base;
-+#endif
- const ElfW(Phdr) *p_eh_frame_hdr;
- const ElfW(Phdr) *p_dynamic;
- struct frame_hdr_cache_element *link;
-@@ -163,7 +167,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
- struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
- const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
- long n, match;
--#ifdef __FRV_FDPIC__
-+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
- struct elf32_fdpic_loadaddr load_base;
- #else
- _Unwind_Ptr load_base;
-@@ -347,7 +351,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
- break;
- }
- }
--# elif defined __FRV_FDPIC__ && defined __linux__
-+# elif (defined __FRV_FDPIC__ || defined __BFIN_FDPIC__) && defined __linux__
- data->dbase = load_base.got_value;
- # else
- # error What is DW_EH_PE_datarel base on this platform?
---
-2.7.4
-
diff --git a/patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch b/patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch
deleted file mode 100644
index e2828a5..0000000
--- a/patches/gcc/6.3.0/895-bfin-define-REENTRANT.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-enable _REENTRANT when -lpthread is used
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-6.2.0.orig/gcc/config/bfin/linux.h gcc-6.2.0/gcc/config/bfin/linux.h
---- gcc-6.2.0.orig/gcc/config/bfin/linux.h 2016-01-04 15:30:50.000000000 +0100
-+++ gcc-6.2.0/gcc/config/bfin/linux.h 2016-09-30 20:48:17.446636819 +0200
-@@ -38,6 +38,9 @@
- "%{static:--start-group} %{mfast-fp:-lbffastfp} %G %L %{static:--end-group} \
- %{!static:%{mfast-fp:-lbffastfp} %G}"
-
-+#undef CPP_SPEC
-+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
-+
- #undef LINK_SPEC
- #define LINK_SPEC "\
- %{mfdpic: -m elf32bfinfd -z text} %{shared} %{pie} \
diff --git a/patches/gcc/6.3.0/900-libgfortran-missing-include.patch b/patches/gcc/6.3.0/900-libgfortran-missing-include.patch
deleted file mode 100644
index 1f47469..0000000
--- a/patches/gcc/6.3.0/900-libgfortran-missing-include.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- gcc-6.3.0/libgfortran/io/close.c.org 2017-01-17 09:43:48.395850000 +0100
-+++ gcc-6.3.0/libgfortran/io/close.c 2017-01-17 09:21:05.000000000 +0100
-@@ -25,6 +25,7 @@
- #include "io.h"
- #include "unix.h"
- #include <limits.h>
-+#include <stdlib.h>
-
- typedef enum
- { CLOSE_DELETE, CLOSE_KEEP, CLOSE_UNSPECIFIED }
diff --git a/patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch b/patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch
deleted file mode 100644
index 61989e5..0000000
--- a/patches/gcc/6.3.0/910-nios2-bad-multilib-default.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -ur gcc-6.2.0.orig/gcc/config/nios2/nios2.h gcc-6.2.0/gcc/config/nios2/nios2.h
---- gcc-6.2.0.orig/gcc/config/nios2/nios2.h 2016-11-29 10:27:50.364479625 -0800
-+++ gcc-6.2.0/gcc/config/nios2/nios2.h 2016-11-29 10:29:55.069624746 -0800
-@@ -63,11 +63,11 @@
- #if TARGET_ENDIAN_DEFAULT == 0
- # define ASM_SPEC "%{!meb:-EL} %{meb:-EB} %{march=*:-march=%*}"
- # define LINK_SPEC_ENDIAN "%{!meb:-EL} %{meb:-EB}"
--# define MULTILIB_DEFAULTS { "EL" }
-+# define MULTILIB_DEFAULTS { "mel" }
- #else
- # define ASM_SPEC "%{!mel:-EB} %{mel:-EL} %{march=*:-march=%*}"
- # define LINK_SPEC_ENDIAN "%{!mel:-EB} %{mel:-EL}"
--# define MULTILIB_DEFAULTS { "EB" }
-+# define MULTILIB_DEFAULTS { "meb" }
- #endif
-
- #define LINK_SPEC LINK_SPEC_ENDIAN \
-diff -ur gcc-6.2.0.orig/gcc/config/nios2/t-nios2 gcc-6.2.0/gcc/config/nios2/t-nios2
---- gcc-6.2.0.orig/gcc/config/nios2/t-nios2 2016-11-29 10:27:50.364479625 -0800
-+++ gcc-6.2.0/gcc/config/nios2/t-nios2 2016-11-29 10:29:03.517151014 -0800
-@@ -22,6 +22,5 @@
- # MULTILIB_DIRNAMES = nomul mulx fpu-60-1 fpu-60-2
- # MULTILIB_EXCEPTIONS =
-
--# MULTILIB_OPTIONS += EL/EB
-+# MULTILIB_OPTIONS += mel/meb
- # MULTILIB_DIRNAMES += le be
--# MULTILIB_MATCHES += EL=mel EB=meb
diff --git a/patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch b/patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch
deleted file mode 100644
index 07f9a73..0000000
--- a/patches/gcc/6.3.0/930-libgcc-disable-split-stack-nothreads.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-disable split-stack for non-thread builds
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
---- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
-+++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100
-@@ -1,4 +1,6 @@
- # Makefile fragment to provide generic support for -fsplit-stack.
- # This should be used in config.host for any host which supports
- # -fsplit-stack.
-+ifeq ($(enable_threads),yes)
- LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
-+endif
diff --git a/patches/gcc/6.3.0/940-uclinux-enable-threads.patch b/patches/gcc/6.3.0/940-uclinux-enable-threads.patch
deleted file mode 100644
index 490a55b..0000000
--- a/patches/gcc/6.3.0/940-uclinux-enable-threads.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Enable POSIX threads for uClinux targets
-Reported upstream:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71721
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.4.0.orig/gcc/config.gcc gcc-5.4.0/gcc/config.gcc
---- gcc-5.4.0.orig/gcc/config.gcc 2015-09-10 16:17:53.000000000 +0200
-+++ gcc-5.4.0/gcc/config.gcc 2016-07-01 21:26:02.772958441 +0200
-@@ -808,6 +808,9 @@
- *-*-uclinux*)
- extra_options="$extra_options gnu-user.opt"
- use_gcc_stdint=wrap
-+ case ${enable_threads} in
-+ "" | yes | posix) thread_file='posix' ;;
-+ esac
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
- ;;
- *-*-rdos*)
diff --git a/patches/gcc/6.3.0/951-bionic-ndk.patch b/patches/gcc/6.3.0/951-bionic-ndk.patch
deleted file mode 100644
index 59c50a8..0000000
--- a/patches/gcc/6.3.0/951-bionic-ndk.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-commit d38d37bdfe24b7ce1bdcb55642fb6b904718e68f
-Author: Howard Chu <hyc@symas.com>
-Date: Tue Apr 25 19:02:18 2017 -0700
-
- Fix ctype for newer NDK headers
-
-diff --git a/libstdc++-v3/config/os/bionic/ctype_base.h b/libstdc++-v3/config/os/bionic/ctype_base.h
-index 33978f3..c36e63c 100644
---- a/libstdc++-v3/config/os/bionic/ctype_base.h
-+++ b/libstdc++-v3/config/os/bionic/ctype_base.h
-@@ -28,6 +28,18 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+// _CTYPE prefix was added in NDK r14 unified headers
-+#ifndef _CTYPE_U
-+#define _CTYPE_U _U
-+#define _CTYPE_L _L
-+#define _CTYPE_D _N
-+#define _CTYPE_S _S
-+#define _CTYPE_P _P
-+#define _CTYPE_C _C
-+#define _CTYPE_X _X
-+#define _CTYPE_B _B
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,17 +53,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
- typedef char mask;
-- static const mask upper = _U;
-- static const mask lower = _L;
-- static const mask alpha = _U | _L;
-- static const mask digit = _N;
-- static const mask xdigit = _X | _N;
-- static const mask space = _S;
-- static const mask print = _P | _U | _L | _N | _B;
-- static const mask graph = _P | _U | _L | _N;
-- static const mask cntrl = _C;
-- static const mask punct = _P;
-- static const mask alnum = _U | _L | _N;
-+ static const mask upper = _CTYPE_U;
-+ static const mask lower = _CTYPE_L;
-+ static const mask alpha = _CTYPE_U | _CTYPE_L;
-+ static const mask digit = _CTYPE_D;
-+ static const mask xdigit = _CTYPE_X | _CTYPE_D;
-+ static const mask space = _CTYPE_S;
-+ static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D | _CTYPE_B;
-+ static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D;
-+ static const mask cntrl = _CTYPE_C;
-+ static const mask punct = _CTYPE_P;
-+ static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_D;
- #if __cplusplus >= 201103L
- static const mask blank = space;
- #endif
diff --git a/patches/gcc/6.3.0/952-bionic-errno.patch b/patches/gcc/6.3.0/952-bionic-errno.patch
deleted file mode 100644
index 91f6ca3..0000000
--- a/patches/gcc/6.3.0/952-bionic-errno.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 6cd4ad106ef87a3c58b0c3478e78409b47000de0
-Author: Howard Chu <hyc@symas.com>
-Date: Tue Apr 25 20:17:03 2017 -0700
-
- Fix, errno is volatile int
-
-diff --git a/libstdc++-v3/src/filesystem/dir.cc b/libstdc++-v3/src/filesystem/dir.cc
-index 6ff12d0..5bbd664 100644
---- a/libstdc++-v3/src/filesystem/dir.cc
-+++ b/libstdc++-v3/src/filesystem/dir.cc
-@@ -147,7 +147,7 @@ fs::_Dir::advance(error_code* ec, directory_options options)
-
- int err = std::exchange(errno, 0);
- const auto entp = readdir(dirp);
-- std::swap(errno, err);
-+ std::swap((int&)errno, err);
-
- if (entp)
- {
diff --git a/patches/gcc/6.3.0/970-crystax.patch b/patches/gcc/6.3.0/970-crystax.patch
deleted file mode 100644
index e3109cc..0000000
--- a/patches/gcc/6.3.0/970-crystax.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-commit 080803512c8f6f87c2f1f711170d54033144d628
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Wed Jul 29 11:28:29 2015 +0300
-
- [android] Apply Android-related modifications
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-[Edited: keep libstdc++, drop libcrystax-related modifications]
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index f66e48cd1..1c253496b 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -942,13 +942,17 @@ aarch64*-*-elf | aarch64*-*-rtems*)
- TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
- ;;
- aarch64*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h"
- tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
-+ extra_options="${extra_options} linux-android.opt"
- tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
- case $target in
- aarch64_be-*)
- tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
- ;;
-+ aarch64*-*-linux-android*)
-+ tm_file="${tm_file} aarch64/aarch64-linux-android.h"
-+ ;;
- esac
- aarch64_multilibs="${with_multilib_list}"
- if test "$aarch64_multilibs" = "default"; then
-@@ -2055,6 +2059,17 @@ mips*-*-linux*) # Linux MIPS, either endian.
- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
- extra_options="${extra_options} linux-android.opt"
- case ${target} in
-+ mips64*android*)
-+ default_mips_arch=mips64r6
-+ default_mips_abi=64
-+ tm_file="${tm_file} mips/android.h"
-+ tmake_file="${tmake_file} mips/t-linux-android64"
-+ ;;
-+ mips*android*)
-+ default_mips_arch=mips32
-+ tm_file="${tm_file} mips/android.h"
-+ tmake_file="$tmake_file mips/t-linux-android"
-+ ;;
- mipsisa32r6*)
- default_mips_arch=mips32r6
- ;;
-diff --git a/gcc/config/aarch64/aarch64-linux-android.h b/gcc/config/aarch64/aarch64-linux-android.h
-new file mode 100644
-index 000000000..db1288fd0
---- /dev/null
-+++ b/gcc/config/aarch64/aarch64-linux-android.h
-@@ -0,0 +1,59 @@
-+/* Machine description for AArch64 architecture.
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3, or (at your option)
-+ any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef GCC_AARCH64_LINUX_ANDROID_H
-+#define GCC_AARCH64_LINUX_ANDROID_H
-+
-+
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
-+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
-+ } \
-+ while (0)
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC \
-+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
-+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC \
-+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
-+ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
-+
-+#define CC1PLUS_SPEC \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
-+
-+#undef LIB_SPEC
-+#define LIB_SPEC \
-+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
-+ GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
-+
-+#endif /* GCC_AARCH64_LINUX_ANDROID_H */
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5fcaa59a3..6864195ee 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,14 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#ifndef RUNTIME_ROOT_PREFIX
-+#define RUNTIME_ROOT_PREFIX ""
-+#endif
-+#define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#ifdef BIONIC_DYNAMIC_LINKER
-+#undef BIONIC_DYNAMIC_LINKER
-+#endif
-+#define BIONIC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/system/bin/linker64"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
-index ad123dde9..97b059de6 100644
---- a/gcc/config/arm/arm.h
-+++ b/gcc/config/arm/arm.h
-@@ -1888,10 +1888,11 @@ enum arm_auto_incmodes
-
- #define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \
- || (TARGET_THUMB1 \
-+ && !inline_thumb1_jump_table \
- && (optimize_size || flag_pic)))
-
- #define CASE_VECTOR_SHORTEN_MODE(min, max, body) \
-- (TARGET_THUMB1 \
-+ (TARGET_THUMB1 && !inline_thumb1_jump_table \
- ? (min >= 0 && max < 512 \
- ? (ADDR_DIFF_VEC_FLAGS (body).offset_unsigned = 1, QImode) \
- : min >= -256 && max < 256 \
-diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
-index 47171b996..eb22d1181 100644
---- a/gcc/config/arm/arm.md
-+++ b/gcc/config/arm/arm.md
-@@ -8179,7 +8179,7 @@
- (match_operand:SI 2 "const_int_operand" "") ; total range
- (match_operand:SI 3 "" "") ; table label
- (match_operand:SI 4 "" "")] ; Out of range label
-- "TARGET_32BIT || optimize_size || flag_pic"
-+ "TARGET_32BIT || ((optimize_size || flag_pic) && !inline_thumb1_jump_table)"
- "
- {
- enum insn_code code;
-diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
-index 0ebe01743..772453889 100644
---- a/gcc/config/arm/arm.opt
-+++ b/gcc/config/arm/arm.opt
-@@ -193,6 +193,10 @@ mthumb-interwork
- Target Report Mask(INTERWORK)
- Support calls between Thumb and ARM instruction sets.
-
-+minline-thumb1-jumptable
-+Target Report Var(inline_thumb1_jump_table)
-+Inline Thumb1 Jump table code
-+
- mtls-dialect=
- Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
- Specify thread local storage scheme.
-diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
-index 77f30554d..32158ed65 100644
---- a/gcc/config/arm/elf.h
-+++ b/gcc/config/arm/elf.h
-@@ -56,8 +56,7 @@
- #undef SUBSUBTARGET_EXTRA_SPECS
- #define SUBSUBTARGET_EXTRA_SPECS
-
--#ifndef ASM_SPEC
--#define ASM_SPEC "\
-+#define DEFAULT_ASM_SPEC "\
- %{mbig-endian:-EB} \
- %{mlittle-endian:-EL} \
- %(asm_cpu_spec) \
-@@ -66,6 +65,9 @@
- %{mthumb-interwork:-mthumb-interwork} \
- %{mfloat-abi=*} %{mfpu=*} \
- %(subtarget_extra_asm_spec)"
-+
-+#ifndef ASM_SPEC
-+#define ASM_SPEC DEFAULT_ASM_SPEC
- #endif
-
- /* The ARM uses @ are a comment character so we need to redefine
-@@ -104,7 +106,8 @@
- the code more efficient, but for Thumb-1 it's better to put them out of
- band unless we are generating compressed tables. */
- #define JUMP_TABLES_IN_TEXT_SECTION \
-- (TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic)))
-+ (TARGET_32BIT || (TARGET_THUMB && !inline_thumb1_jump_table \
-+ && (optimize_size || flag_pic)))
-
- #ifndef LINK_SPEC
- #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index ace84816e..8c8fa6553 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -108,11 +108,16 @@
- #define CC1_SPEC \
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC, \
- GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \
-- ANDROID_CC1_SPEC)
-+ ANDROID_CC1_SPEC("-fpic"))
-
- #define CC1PLUS_SPEC \
- LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
-
-+#undef ASM_SPEC
-+#define ASM_SPEC \
-+ LINUX_OR_ANDROID_CC (DEFAULT_ASM_SPEC, \
-+ DEFAULT_ASM_SPEC " " ANDROID_ASM_SPEC)
-+
- #undef LIB_SPEC
- #define LIB_SPEC \
- LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
-diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
-index fee33a3ef..22fb2ced9 100644
---- a/gcc/config/i386/gnu-user.h
-+++ b/gcc/config/i386/gnu-user.h
-@@ -65,9 +65,14 @@ along with GCC; see the file COPYING3. If not see
- When the -shared link option is used a final link is not being
- done. */
-
-+#undef ANDROID_TARGET_CC1_SPEC
-+#define ANDROID_TARGET_CC1_SPEC \
-+ " -mssse3 -fno-short-enums " \
-+
- #undef ASM_SPEC
- #define ASM_SPEC \
-- "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
-+ "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
-
- #undef SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
-diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
-index 7a02a7eb4..cac4179bc 100644
---- a/gcc/config/i386/gnu-user64.h
-+++ b/gcc/config/i386/gnu-user64.h
-@@ -46,6 +46,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define SPEC_X32 "mx32"
- #endif
-
-+#undef ANDROID_TARGET_CC1_SPEC
-+#define ANDROID_TARGET_CC1_SPEC \
-+ "%{m32:-mssse3 -fno-short-enums}" \
-+ "%{!m32:-msse4.2 -mpopcnt}"
-+
- #undef ASM_SPEC
- #define ASM_SPEC "%{" SPEC_32 ":--32} \
- %{" SPEC_64 ":--64} \
-diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h
-index 4b9910fa9..3b11ed086 100644
---- a/gcc/config/i386/linux-common.h
-+++ b/gcc/config/i386/linux-common.h
-@@ -30,7 +30,13 @@ along with GCC; see the file COPYING3. If not see
- #undef CC1_SPEC
- #define CC1_SPEC \
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
-- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
-+ GNU_USER_TARGET_CC1_SPEC \
-+ ANDROID_TARGET_CC1_SPEC \
-+ " " \
-+ ANDROID_CC1_SPEC("-fPIC"))
-+
-+#define CC1PLUS_SPEC \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
-
- #undef LINK_SPEC
- #define LINK_SPEC \
-diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
-index 301a41ccd..9623c88d0 100644
---- a/gcc/config/linux-android.h
-+++ b/gcc/config/linux-android.h
-@@ -38,15 +39,18 @@
- "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
-
- #define ANDROID_LINK_SPEC \
-- "%{shared: -Bsymbolic}"
-+ "%{shared: -Bsymbolic} -z noexecstack -z relro -z now"
-
--#define ANDROID_CC1_SPEC \
-+#define ANDROID_CC1_SPEC(ANDROID_PIC_DEFAULT) \
- "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
-- "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
-+ "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: " ANDROID_PIC_DEFAULT "}}}}"
-
- #define ANDROID_CC1PLUS_SPEC \
-- "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
-- "%{!frtti:%{!fno-rtti: -fno-rtti}}"
-+ "%{!fexceptions:%{!fno-exceptions: -fexceptions}} " \
-+ "%{!frtti:%{!fno-rtti: -frtti}}"
-+
-+#define ANDROID_ASM_SPEC \
-+ "--noexecstack"
-
- #define ANDROID_LIB_SPEC \
- "%{!static: -ldl}"
-diff --git a/gcc/config/mips/android.h b/gcc/config/mips/android.h
-new file mode 100644
-index 000000000..32c539c8d
---- /dev/null
-+++ b/gcc/config/mips/android.h
-@@ -0,0 +1,49 @@
-+/* Target macros for mips*-*android* targets.
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+#undef DRIVER_SELF_SPECS
-+#define DRIVER_SELF_SPECS \
-+ /* Make sure a -mips option is present. This helps us to pick \
-+ the right multilib, and also makes the later specs easier \
-+ to write. */ \
-+ MIPS_ISA_LEVEL_SPEC, \
-+ \
-+ /* Infer the default float setting from -march. */ \
-+ MIPS_ARCH_FLOAT_SPEC, \
-+ \
-+ /* Infer the -msynci setting from -march if not explicitly set. */ \
-+ MIPS_ISA_SYNCI_SPEC, \
-+ \
-+ /* If no ABI option is specified, infer one from the ISA level \
-+ or -mgp setting. */ \
-+ "%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=64}}", \
-+ \
-+ /* If no FP ABI option is specified, infer one from the \
-+ ABI/ISA level unless there is a conflicting option. */ \
-+ "%{!msoft-float: %{!msingle-float: %{!mfp*: %{!mmsa: %{mabi=32: %{" \
-+ MIPS_FPXX_OPTION_SPEC ": -mfpxx}}}}}}", \
-+ \
-+ /* If no odd-spreg option is specified, infer one from the ISA. */ \
-+ "%{!modd-spreg: %{mabi=32: %{mips32r6: -mno-odd-spreg}}}", \
-+ \
-+ /* Base SPECs. */ \
-+ BASE_DRIVER_SELF_SPECS, \
-+ \
-+ /* Use the standard linux specs for everything else. */ \
-+ LINUX_DRIVER_SELF_SPECS
-diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
-index 15b549c08..4a2816014 100644
---- a/gcc/config/mips/gnu-user.h
-+++ b/gcc/config/mips/gnu-user.h
-@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
- /* The GNU C++ standard library requires this. */ \
- if (c_dialect_cxx ()) \
- builtin_define ("_GNU_SOURCE"); \
-+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
- } while (0)
-
- #undef SUBTARGET_CPP_SPEC
-@@ -71,7 +72,8 @@ along with GCC; see the file COPYING3. If not see
-
- #undef SUBTARGET_ASM_SPEC
- #define SUBTARGET_ASM_SPEC \
-- "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"
-+ "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}} " \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
-
- /* The MIPS assembler has different syntax for .set. We set it to
- .dummy to trap any errors. */
-@@ -120,7 +122,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
- #endif
-
- #define LINUX_DRIVER_SELF_SPECS \
-- NO_SHARED_SPECS \
-+ LINUX_OR_ANDROID_CC(NO_SHARED_SPECS, "") \
- MARCH_MTUNE_NATIVE_SPECS, \
- /* -mplt has no effect without -mno-shared. Simplify later \
- specs handling by removing a redundant option. */ \
-diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
-index 8429a7ca2..8bfacf994 100644
---- a/gcc/config/mips/linux-common.h
-+++ b/gcc/config/mips/linux-common.h
-@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
- #undef SUBTARGET_CC1_SPEC
- #define SUBTARGET_CC1_SPEC \
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
-- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
-+ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
-
- #undef CC1PLUS_SPEC
- #define CC1PLUS_SPEC \
-diff --git a/gcc/config/mips/t-linux-android b/gcc/config/mips/t-linux-android
-new file mode 100644
-index 000000000..39f512c81
---- /dev/null
-+++ b/gcc/config/mips/t-linux-android
-@@ -0,0 +1,3 @@
-+MULTILIB_OPTIONS = mips32r2/mips32r6
-+MULTILIB_DIRNAMES = mips-r2 mips-r6
-+MULTILIB_OSDIRNAMES = ../libr2 ../libr6
-diff --git a/gcc/config/mips/t-linux-android64 b/gcc/config/mips/t-linux-android64
-new file mode 100644
-index 000000000..55cab7d62
---- /dev/null
-+++ b/gcc/config/mips/t-linux-android64
-@@ -0,0 +1,4 @@
-+MULTILIB_OPTIONS = mabi=32 mips32/mips32r2/mips32r6/mips64r2/mips64r6
-+MULTILIB_DIRNAMES = 32 mips-r1 mips-r2 mips-r6 mips64-r2 mips64-r6
-+MULTILIB_OSDIRNAMES = ../lib ../lib ../libr2 ../libr6 ../lib64r2 ../lib64
-+MULTILIB_REQUIRED = mabi=32/mips32 mabi=32/mips32r2 mabi=32/mips32r6 mips64r2 mips64r6
-diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h
-index 555c0fe24..47c8655f9 100644
---- a/libgcc/gthr-posix.h
-+++ b/libgcc/gthr-posix.h
-@@ -32,6 +32,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define __GTHREADS 1
- #define __GTHREADS_CXX0X 1
-
-+/* The following should normally be in a different header file,
-+ * but I couldn't find the right location. The point of the macro
-+ * definition below is to prevent libsupc++ and libstdc++ to reference
-+ * weak symbols in their static C++ constructors. Such code crashes
-+ * when a shared object linked statically to these libraries is
-+ * loaded on Android 2.1 (Eclair) and older platform releases, due
-+ * to a dynamic linker bug.
-+ */
-+#ifdef __ANDROID__
-+#undef GTHREAD_USE_WEAK
-+#define GTHREAD_USE_WEAK 0
-+#endif
-+
- #include <pthread.h>
-
- #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 41797a971..f746e8353 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -78319,6 +78341,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <sys/syscall.h>
- int lk;
-+#if !defined(SYS_gettid)
-+#define SYS_gettid __NR_gettid
-+#endif
-+#if !defined(SYS_futex)
-+#define SYS_futex __NR_futex
-+#endif
- int
- main ()
- {
-@@ -78377,6 +78405,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <sys/syscall.h>
- int lk;
-+#if !defined(SYS_gettid)
-+#define SYS_gettid __NR_gettid
-+#endif
-+#if !defined(SYS_futex)
-+#define SYS_futex __NR_futex
-+#endif
- int
- main ()
- {
-diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
-index e3e206b7d..e85dc2c76 100644
---- a/libstdc++-v3/include/bits/locale_facets.h
-+++ b/libstdc++-v3/include/bits/locale_facets.h
-@@ -47,6 +47,20 @@
- #include <ext/numeric_traits.h>
- #include <bits/streambuf_iterator.h>
-
-+#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 && __i386__
-+// CrystaX: for some reason, x86 gcc-4.9 makes ctype<char>::do_widen() and
-+// ctype<char>::_M_widen_init() methods working wrong if optimization enabled.
-+// For ctype<char>::do_widen(), values of passed arguments (__lo, __hi and __to)
-+// are completely messed up and don't correspond to passed values. In case if
-+// we disable optimization for those methods, things become correct so we apply
-+// this workaround here for a time.
-+// TODO: figure out what exactly wrong here - is it bug in GCC optimization
-+// algorithm or smth else?
-+#define __CRYSTAX_X86_DONT_OPTIMIZE __attribute__((optimize(0)))
-+#else
-+#define __CRYSTAX_X86_DONT_OPTIMIZE
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -1102,7 +1116,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- * @return @a __hi.
- */
- virtual const char*
-- do_widen(const char* __lo, const char* __hi, char_type* __to) const
-+ do_widen(const char* __lo, const char* __hi, char_type* __to) const __CRYSTAX_X86_DONT_OPTIMIZE
- {
- __builtin_memcpy(__to, __lo, __hi - __lo);
- return __hi;
-@@ -1163,7 +1177,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
- private:
- void _M_narrow_init() const;
-- void _M_widen_init() const;
-+ void _M_widen_init() const __CRYSTAX_X86_DONT_OPTIMIZE;
- };
-
- #ifdef _GLIBCXX_USE_WCHAR_T
-diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
-index 9b617998f..c149169bb 100644
---- a/libstdc++-v3/libsupc++/guard.cc
-+++ b/libstdc++-v3/libsupc++/guard.cc
-@@ -33,7 +33,12 @@
- #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
- && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
- # include <climits>
-+#if defined(__ANDROID__)
-+# include <sys/syscall.h>
-+# define SYS_futex __NR_futex
-+#else
- # include <syscall.h>
-+#endif
- # include <unistd.h>
- # define _GLIBCXX_USE_FUTEX
- # define _GLIBCXX_FUTEX_WAIT 0
diff --git a/patches/gcc/6.3.0/971-crystax.patch b/patches/gcc/6.3.0/971-crystax.patch
deleted file mode 100644
index 748a381..0000000
--- a/patches/gcc/6.3.0/971-crystax.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-commit 9f057b62caafe08c968103d39b5df82486a175c2
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Thu Aug 13 16:11:54 2015 +0300
-
- [android] Add additional multilib option: mfloat-abi=hard
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/arm/t-linux-androideabi b/gcc/config/arm/t-linux-androideabi
-index 8f1307c55..cbbec5bd2 100644
---- a/gcc/config/arm/t-linux-androideabi
-+++ b/gcc/config/arm/t-linux-androideabi
-@@ -1,8 +1,9 @@
--MULTILIB_OPTIONS = march=armv7-a mthumb
--MULTILIB_DIRNAMES = armv7-a thumb
--MULTILIB_EXCEPTIONS =
-+MULTILIB_OPTIONS = march=armv7-a mthumb mfloat-abi=hard
-+MULTILIB_DIRNAMES = armv7-a thumb hard
-+MULTILIB_EXCEPTIONS = mfloat-abi=hard* mthumb/mfloat-abi=hard*
- MULTILIB_MATCHES =
- MULTILIB_OSDIRNAMES =
-+MULTILIB_EXTRA_OPTS = Wl,--no-warn-mismatch
-
- # The "special" multilib can be used to build native applications for Android,
- # as opposed to native shared libraries that are then called via JNI.
diff --git a/patches/gcc/6.3.0/972-crystax.patch b/patches/gcc/6.3.0/972-crystax.patch
deleted file mode 100644
index b9077be..0000000
--- a/patches/gcc/6.3.0/972-crystax.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-commit 44a81ebb7698dac41ffa7acd5e0cc1578e5ab1fd
-Author: H.J. Lu <hongjiu.lu@intel.com>
-Date: Mon Apr 14 15:59:47 2014 -0700
-
- [android] Always enable --eh-frame-hdr for static executable
-
- See 5e6cdf76af295c9a39b695ca228cff675e8ff4ae and
- 23e3137ee2897464b051599b85a09f130d3ad05d
-
- Change-Id: Ibda473188e5a10f2a0592f2494ad00ad1f91e04b
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config.in b/gcc/config.in
-index 115cb6163..933916833 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -2119,6 +2119,12 @@
- #endif
-
-
-+/* Define if your system supports PT_GNU_EH_FRAME for static executable. */
-+#ifndef USED_FOR_TARGET
-+#undef USE_EH_FRAME_HDR_FOR_STATIC
-+#endif
-+
-+
- /* Define to 1 if the 'long long' type is wider than 'long' but still
- efficiently supported by the host hardware. */
- #ifndef USED_FOR_TARGET
-diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
-index 093c38bba..54b3e0c91 100644
---- a/gcc/config/alpha/elf.h
-+++ b/gcc/config/alpha/elf.h
-@@ -168,5 +168,9 @@ extern int alpha_this_gpdisp_sequence_number;
- I imagine that other systems will catch up. In the meantime, it
- doesn't harm to make sure that the data exists to be used later. */
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h
-index 5ded869d2..5f51ac81d 100644
---- a/gcc/config/freebsd.h
-+++ b/gcc/config/freebsd.h
-@@ -45,8 +45,12 @@ along with GCC; see the file COPYING3. If not see
- #define LIB_SPEC FBSD_LIB_SPEC
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-
- #ifdef TARGET_LIBC_PROVIDES_SSP
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
-index b0bf40a95..d1874bc29 100644
---- a/gcc/config/gnu-user.h
-+++ b/gcc/config/gnu-user.h
-@@ -118,8 +118,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-
- #undef LINK_GCC_C_SEQUENCE_SPEC
- #define LINK_GCC_C_SEQUENCE_SPEC \
-diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h
-index 37ecfc43f..a5f1b9955 100644
---- a/gcc/config/openbsd.h
-+++ b/gcc/config/openbsd.h
-@@ -136,8 +136,12 @@ while (0)
- #define LIB_SPEC OBSD_LIB_SPEC
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-
- #undef LIB_SPEC
- #define LIB_SPEC OBSD_LIB_SPEC
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index cbf909722..eb2217fad 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -789,7 +789,11 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
--# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-+# ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+# define LINK_EH_SPEC "--eh-frame-hdr "
-+# else
-+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-+# endif
- #endif
-
- #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
-diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
-index 5160e1fda..7632a5081 100644
---- a/gcc/config/sol2.h
-+++ b/gcc/config/sol2.h
-@@ -347,7 +347,11 @@ along with GCC; see the file COPYING3. If not see
- /* Solaris 11 build 135+ implements dl_iterate_phdr. GNU ld needs
- --eh-frame-hdr to create the required .eh_frame_hdr sections. */
- #if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-+#endif
- #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
- #endif
-
-diff --git a/gcc/configure b/gcc/configure
-index 1c6e3407c..28ad05004 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -934,6 +934,7 @@ enable_fix_cortex_a53_835769
- enable_fix_cortex_a53_843419
- with_glibc_version
- enable_gnu_unique_object
-+enable_eh_frame_hdr_for_static
- enable_linker_build_id
- enable_default_ssp
- with_long_double_128
-@@ -1670,6 +1671,9 @@ Optional Features:
- --enable-gnu-unique-object
- enable the use of the @gnu_unique_object ELF
- extension on glibc systems
-+ --enable-eh-frame-hdr-for-static
-+ enable linker PT_GNU_EH_FRAME support for static
-+ executable
- --enable-linker-build-id
- compiler will always pass --build-id to linker
- --enable-default-ssp enable Stack Smashing Protection as default
-@@ -27703,6 +27707,38 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
-
- $as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
-
-+ # Check whether --enable-eh-frame-hdr-for-static was given.
-+if test "${enable_eh_frame_hdr_for_static+set}" = set; then :
-+ enableval=$enable_eh_frame_hdr_for_static; case $enable_eh_frame_hdr_for_static in
-+ yes | no) ;;
-+ *) as_fn_error "'$enable_eh_frame_hdr_for_static' is an invalid
-+value for --enable-eh-frame-hdr-for-static.
-+Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
-+ esac
-+else
-+ # Only support for glibc 2.3.0 or higher with AT_PHDR/AT_PHNUM from
-+# Linux kernel.
-+ if test x$host = x$build -a x$host = x$target &&
-+ ldd --version 2>&1 >/dev/null &&
-+ glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
-+ glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
-+ glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
-+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
-+ if test "$glibcnum" -ge 2003 ; then
-+ auvx=`LD_SHOW_AUXV=1 ldd 2>/dev/null`
-+ if echo "$auvx" | grep AT_PHDR > /dev/null &&
-+ echo "$auvx" | grep AT_PHNUM > /dev/null; then
-+ enable_eh_frame_hdr_for_static=yes
-+ fi
-+ fi
-+ fi
-+fi
-+
-+ if test x$enable_eh_frame_hdr_for_static = xyes; then
-+
-+$as_echo "#define USE_EH_FRAME_HDR_FOR_STATIC 1" >>confdefs.h
-+
-+ fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
- $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6c1dcd9ae..0cf7419e7 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4828,6 +4828,35 @@ GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR])
- if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
- AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
- [Define if your linker supports .eh_frame_hdr.])
-+ AC_ARG_ENABLE(eh-frame-hdr-for-static,
-+ [AS_HELP_STRING([--enable-eh-frame-hdr-for-static],
-+ [enable linker PT_GNU_EH_FRAME support for static executable])],
-+ [case $enable_eh_frame_hdr_for_static in
-+ yes | no) ;;
-+ *) AC_MSG_ERROR(['$enable_eh_frame_hdr_for_static' is an invalid
-+value for --enable-eh-frame-hdr-for-static.
-+Valid choices are 'yes' and 'no'.]) ;;
-+ esac],
-+# Only support for glibc 2.3.0 or higher with AT_PHDR/AT_PHNUM from
-+# Linux kernel.
-+ [[if test x$host = x$build -a x$host = x$target &&
-+ ldd --version 2>&1 >/dev/null &&
-+ glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
-+ glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
-+ glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
-+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
-+ if test "$glibcnum" -ge 2003 ; then
-+ auvx=`LD_SHOW_AUXV=1 ldd 2>/dev/null`
-+ if echo "$auvx" | grep AT_PHDR > /dev/null &&
-+ echo "$auvx" | grep AT_PHNUM > /dev/null; then
-+ enable_eh_frame_hdr_for_static=yes
-+ fi
-+ fi
-+ fi]])
-+ if test x$enable_eh_frame_hdr_for_static = xyes; then
-+ AC_DEFINE(USE_EH_FRAME_HDR_FOR_STATIC, 1,
-+[Define if your system supports PT_GNU_EH_FRAME for static executable.])
-+ fi
- fi
- AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr)
-
-diff --git a/gcc/testsuite/g++.dg/eh/spec3-static.C b/gcc/testsuite/g++.dg/eh/spec3-static.C
-new file mode 100644
-index 000000000..15408effa
---- /dev/null
-+++ b/gcc/testsuite/g++.dg/eh/spec3-static.C
-@@ -0,0 +1,25 @@
-+// PR c++/4381
-+// Test that exception-specs work properly for classes with virtual bases.
-+
-+// { dg-do run }
-+// { dg-options "-static" }
-+
-+class Base {};
-+
-+struct A : virtual public Base
-+{
-+ A() {}
-+};
-+
-+struct B {};
-+
-+void func() throw (B,A)
-+{
-+ throw A();
-+}
-+
-+int main(void)
-+{
-+ try { func(); }
-+ catch (A& a) { }
-+}
-diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
-index f3343fc4f..d42647779 100644
---- a/libgcc/crtstuff.c
-+++ b/libgcc/crtstuff.c
-@@ -88,7 +88,8 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
-- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-+ && !defined(inhibit_libc) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(BSD_DL_ITERATE_PHDR_AVAILABLE)
- #include <link.h>
- # define USE_PT_GNU_EH_FRAME
-@@ -97,7 +98,8 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) \
-- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-+ && !defined(inhibit_libc) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(__sun__) && defined(__svr4__)
- #include <link.h>
- # define USE_PT_GNU_EH_FRAME
-@@ -106,7 +108,8 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
-- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-+ && !defined(inhibit_libc) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(__GLIBC__) && __GLIBC__ >= 2
- #include <link.h>
- /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
-@@ -121,7 +124,7 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
-- && !defined(CRTSTUFFT_O) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(inhibit_libc) \
- && (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__))
- /* On systems using glibc, an inhibit_libc build of libgcc is only
diff --git a/patches/gcc/6.3.0/973-crystax.patch b/patches/gcc/6.3.0/973-crystax.patch
deleted file mode 100644
index b96ece3..0000000
--- a/patches/gcc/6.3.0/973-crystax.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-commit 778a9ef107f51544d583f110e92b75f4d9d79117
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Thu Aug 20 19:11:07 2015 +0300
-
- [android] Don't use PIE copyrelocs for x86/x86_64
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 3d044e8bd..5c89fcab0 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -14631,6 +14631,7 @@ legitimate_pic_address_disp_p (rtx disp)
- else if (!SYMBOL_REF_FAR_ADDR_P (op0)
- && (SYMBOL_REF_LOCAL_P (op0)
- || (HAVE_LD_PIE_COPYRELOC
-+ && !TARGET_HAS_BIONIC
- && flag_pie
- && !SYMBOL_REF_WEAK (op0)
- && !SYMBOL_REF_FUNCTION_P (op0)))
diff --git a/patches/gcc/6.3.0/974-crystax.patch b/patches/gcc/6.3.0/974-crystax.patch
deleted file mode 100644
index 9db4f54..0000000
--- a/patches/gcc/6.3.0/974-crystax.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit dbeae1190cabad83999f2540523f045acc1bb4ec
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Fri Aug 21 17:41:59 2015 +0300
-
- [android] Always use gthr-posix.h instead of gthr-default.h
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/libgcc/gthr.h b/libgcc/gthr.h
-index 47a7d061a..67a680f90 100644
---- a/libgcc/gthr.h
-+++ b/libgcc/gthr.h
-@@ -145,7 +145,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GTHREAD_USE_WEAK 1
- #endif
- #endif
-+#if __ANDROID__
-+#include "gthr-posix.h"
-+#else
- #include "gthr-default.h"
-+#endif
-
- #ifndef HIDE_EXPORTS
- #pragma GCC visibility pop
diff --git a/patches/gcc/6.3.0/975-crystax.patch b/patches/gcc/6.3.0/975-crystax.patch
deleted file mode 100644
index 9efc2a4..0000000
--- a/patches/gcc/6.3.0/975-crystax.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 8a66d422721ae5999737d7825701ff22097d287b
-Author: Andrew Hsieh <andrewhsieh@google.com>
-Date: Mon Apr 14 21:05:51 2014 -0700
-
- [android] Fix ARM generates insufficient alignment for NEON vst/vld
-
- See d909af3e2469aad87d5c3e79b93c778fd26c03a9
-
- Change-Id: Ie1de9f946f397196bb6f1623f5add86933739484
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index 5974c65d3..71b2c7aa9 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -22403,9 +22403,13 @@ arm_print_operand (FILE *stream, rtx x, int code)
- memsize = MEM_SIZE (x);
-
- /* Only certain alignment specifiers are supported by the hardware. */
-- if (memsize == 32 && (align % 32) == 0)
-+ /* Note that ARM EABI only guarentees 8-byte stack alignment. While GCC
-+ honors stricter alignment of composite type in user code, it doesn't
-+ observe the alignment of memory passed as an extra argument for function
-+ returning large composite type. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271 */
-+ if (memsize == 32 && (align % 32) == 0 && !TARGET_AAPCS_BASED)
- align_bits = 256;
-- else if ((memsize == 16 || memsize == 32) && (align % 16) == 0)
-+ else if ((memsize == 16 || memsize == 32) && (align % 16) == 0 && !TARGET_AAPCS_BASED)
- align_bits = 128;
- else if (memsize >= 8 && (align % 8) == 0)
- align_bits = 64;
diff --git a/patches/gcc/6.3.0/976-crystax.patch b/patches/gcc/6.3.0/976-crystax.patch
deleted file mode 100644
index 790d4a9..0000000
--- a/patches/gcc/6.3.0/976-crystax.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 89d27bc45ee7325dcfff6748da0f8b9c1dc1f234
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Sat Aug 22 09:55:55 2015 +0300
-
- [android][i386] Remove throw() declaration from posix_memalign() proto
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
-index a1f98d3d1..3725799be 100644
---- a/gcc/config/i386/pmm_malloc.h
-+++ b/gcc/config/i386/pmm_malloc.h
-@@ -31,7 +31,7 @@
- #ifndef __cplusplus
- extern int posix_memalign (void **, size_t, size_t);
- #else
--extern "C" int posix_memalign (void **, size_t, size_t) throw ();
-+extern "C" int posix_memalign (void **, size_t, size_t);
- #endif
-
- static __inline void *
diff --git a/patches/gcc/6.3.0/977-crystax.patch b/patches/gcc/6.3.0/977-crystax.patch
deleted file mode 100644
index 0211d72..0000000
--- a/patches/gcc/6.3.0/977-crystax.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-commit 9ae82f7cfc1073820092dd9f957559667e77db0d
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Tue Aug 25 09:36:42 2015 +0300
-
- [android] Explicitly make _Unwind_Resume visible for arm64/mips64
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/aarch64/aarch64-linux-android.h b/gcc/config/aarch64/aarch64-linux-android.h
-index db1288fd0..38bc64d61 100644
---- a/gcc/config/aarch64/aarch64-linux-android.h
-+++ b/gcc/config/aarch64/aarch64-linux-android.h
-@@ -57,4 +57,8 @@
- #define ENDFILE_SPEC \
- LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
-
-+#ifdef IN_LIBGCC2
-+#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((visibility("default")))
-+#endif
-+
- #endif /* GCC_AARCH64_LINUX_ANDROID_H */
-diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
-index 8bfacf994..262a9a341 100644
---- a/gcc/config/mips/linux-common.h
-+++ b/gcc/config/mips/linux-common.h
-@@ -63,3 +63,7 @@ along with GCC; see the file COPYING3. If not see
-
- /* The default value isn't sufficient in 64-bit mode. */
- #define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024)
-+
-+#ifdef IN_LIBGCC2
-+#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((visibility("default")))
-+#endif
diff --git a/patches/gcc/7.1.0/100-uclibc-conf.patch b/patches/gcc/7.1.0/100-uclibc-conf.patch
deleted file mode 100644
index 73d1f0d..0000000
--- a/patches/gcc/7.1.0/100-uclibc-conf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: b/contrib/regression/objs-gcc.sh
-===================================================================
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
diff --git a/patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch b/patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch
deleted file mode 100644
index bce09eb..0000000
--- a/patches/gcc/7.1.0/1000-libtool-leave-framework-alone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-6.2.0/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
-+++ gcc-6.2.0/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
-@@ -36,6 +36,11 @@
- for arg
- do
- case $arg in
-+ -framework)
-+ # libtool handles this option. It should not be prefixed with
-+ # -Xcompiler, as that would split it from the argument that
-+ # follows.
-+ ;;
- -f*|--*|-static-lib*|-shared-lib*|-B*)
- # Libtool does not ascribe any special meaning options
- # that begin with -f or with a double-dash. So, it will
diff --git a/patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch b/patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch
deleted file mode 100644
index 93f6e94..0000000
--- a/patches/gcc/7.1.0/111-alpha-bad-eh_frame.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037
-
-diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha
-index 0b6ffb1..0c2f840 100644
---- a/libgcc/config/alpha/t-alpha
-+++ b/libgcc/config/alpha/t-alpha
-@@ -1,2 +1,6 @@
- # This is a support routine for longlong.h, used by libgcc2.c.
- LIB2ADD += $(srcdir)/config/alpha/qrnnd.S
-+
-+# When GAS-generated unwind tables are created, they get created
-+# after the __FRAME_END__ terminator, which causes an ld error.
-+CRTSTUFF_T_CFLAGS = -fno-unwind-tables
diff --git a/patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
deleted file mode 100644
index d8986d5..0000000
--- a/patches/gcc/7.1.0/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-diff -urN gcc-5.3.0.orig/config/gcc-plugin.m4 gcc-5.3.0/config/gcc-plugin.m4
---- gcc-5.3.0.orig/config/gcc-plugin.m4 2015-12-19 14:39:04.120734900 +0000
-+++ gcc-5.3.0/config/gcc-plugin.m4 2015-12-20 01:28:45.381965300 +0000
-@@ -20,6 +20,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -30,6 +33,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -81,17 +89,17 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- AC_MSG_CHECKING([for -fPIC -shared])
-+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
- AC_TRY_LINK(
-- [extern int X;],[return X == 0;],
-+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
- [AC_MSG_RESULT([yes]); have_pic_shared=yes],
- [AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
-diff -urN gcc-5.3.0.orig/gcc/configure gcc-5.3.0/gcc/configure
---- gcc-5.3.0.orig/gcc/configure 2015-12-19 14:40:16.893975900 +0000
-+++ gcc-5.3.0/gcc/configure 2015-12-20 01:28:45.472476700 +0000
-@@ -28386,6 +28386,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -28396,6 +28399,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -28508,23 +28516,23 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
-diff -urN gcc-5.3.0.orig/libcc1/configure gcc-5.3.0/libcc1/configure
---- gcc-5.3.0.orig/libcc1/configure 2015-12-19 14:40:20.855979000 +0000
-+++ gcc-5.3.0/libcc1/configure 2015-12-20 01:28:45.504980900 +0000
-@@ -14500,6 +14500,9 @@
-
- pluginlibs=
-
-+ PICFLAG="-fPIC"
-+ UNDEFINEDPREAMBLE="extern int X;"
-+ UNDEFINEDCODE="return X == 0;"
- case "${host}" in
- *-*-darwin*)
- if test x$build = x$host; then
-@@ -14510,6 +14513,11 @@
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -14622,23 +14630,23 @@
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
diff --git a/patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch b/patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
deleted file mode 100644
index 12ef48e..0000000
--- a/patches/gcc/7.1.0/380-gcc-plugin-POSIX-include-sys-select-h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN gcc-5.3.0.orig/libcc1/connection.cc gcc-5.3.0/libcc1/connection.cc
---- gcc-5.3.0.orig/libcc1/connection.cc 2015-12-19 14:40:20.860479600 +0000
-+++ gcc-5.3.0/libcc1/connection.cc 2015-12-20 01:31:04.346611500 +0000
-@@ -21,6 +21,7 @@
- #include <string>
- #include <unistd.h>
- #include <sys/types.h>
-+#include <sys/select.h>
- #include <string.h>
- #include <errno.h>
- #include "marshall.hh"
diff --git a/patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch b/patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch
deleted file mode 100644
index 5efa7fd..0000000
--- a/patches/gcc/7.1.0/810-arm-softfloat-libgcc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: b/gcc/config/arm/linux-elf.h
-===================================================================
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -60,7 +60,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-Index: b/libgcc/config/arm/t-linux
-===================================================================
---- a/libgcc/config/arm/t-linux
-+++ b/libgcc/config/arm/t-linux
-@@ -1,6 +1,11 @@
- LIB1ASMSRC = arm/lib1funcs.S
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
-+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
-+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
-+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
-+ _arm_fixsfsi _arm_fixunssfsi
-
- # Just for these, we omit the frame pointer since it makes such a big
- # difference.
diff --git a/patches/gcc/7.1.0/860-cilk-wchar.patch b/patches/gcc/7.1.0/860-cilk-wchar.patch
deleted file mode 100644
index 1d9916f..0000000
--- a/patches/gcc/7.1.0/860-cilk-wchar.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-[PATCH] cilk: fix build without wchar
-
-When building against uClibc with wchar support disabled, WCHAR_MIN and
-WCHAR_MAX are not defined leading to compilation errors.
-
-Fix it by only including the wchar code if available.
-
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
- libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-Index: b/libcilkrts/include/cilk/reducer_min_max.h
-===================================================================
---- a/libcilkrts/include/cilk/reducer_min_max.h
-+++ b/libcilkrts/include/cilk/reducer_min_max.h
-@@ -3154,7 +3154,9 @@
- CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
-@@ -3306,7 +3308,9 @@
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
-+#ifdef WCHAR_MIN
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
-+#endif
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
- CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
-@@ -3432,7 +3436,9 @@
- CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
-@@ -3584,7 +3590,9 @@
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
-+#ifdef WCHAR_MAX
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
-+#endif
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
- CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)
diff --git a/patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
deleted file mode 100644
index cf21584..0000000
--- a/patches/gcc/7.1.0/870-gcc-xtensa-fix-fprintf-format-specifiers.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 06689e5973647f5c65d1984b164f2531f5418d7a Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Sun, 28 May 2017 19:56:56 -0700
-Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers
-
-HOST_WIDE_INT may not be long as assumed in print_operand and
-xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
-format strings instead of %ld/0x%lx. This fixes incorrect assembly code
-generation by the compiler running on armhf host.
-
-2017-05-28 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (xtensa_emit_call): Use
- HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
- (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
- format string.
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- gcc/config/xtensa/xtensa.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index 0181dde..25e4a28 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1780,7 +1780,8 @@ xtensa_emit_call (int callop, rtx *operands)
- rtx tgt = operands[callop];
-
- if (GET_CODE (tgt) == CONST_INT)
-- sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
-+ sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
-+ WINDOW_SIZE, INTVAL (tgt));
- else if (register_operand (tgt, VOIDmode))
- sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
- else
-@@ -2351,14 +2352,14 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'L':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
- else
- output_operand_lossage ("invalid %%L value");
- break;
-
- case 'R':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x) & 0x1f);
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
- else
- output_operand_lossage ("invalid %%R value");
- break;
-@@ -2372,7 +2373,7 @@ print_operand (FILE *file, rtx x, int letter)
-
- case 'd':
- if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_operand_lossage ("invalid %%d value");
- break;
-@@ -2437,7 +2438,7 @@ print_operand (FILE *file, rtx x, int letter)
- else if (GET_CODE (x) == MEM)
- output_address (GET_MODE (x), XEXP (x, 0));
- else if (GET_CODE (x) == CONST_INT)
-- fprintf (file, "%ld", INTVAL (x));
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
- else
- output_addr_const (file, x);
- }
---
-2.1.4
-
diff --git a/patches/gcc/7.1.0/891-fix-m68k-uclinux.patch b/patches/gcc/7.1.0/891-fix-m68k-uclinux.patch
deleted file mode 100644
index 4e186bd..0000000
--- a/patches/gcc/7.1.0/891-fix-m68k-uclinux.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-avoids internal compiler error while compiling linux-atomic.c
-See here:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host
---- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200
-+++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200
-@@ -794,7 +794,7 @@
- m68k*-*-openbsd*)
- ;;
- m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
-- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
-+ tmake_file="$tmake_file m68k/t-floatlib"
- md_unwind_header=m68k/linux-unwind.h
- ;;
- m68k-*-linux*) # Motorola m68k's running GNU/Linux
diff --git a/patches/gcc/7.1.0/900-libgfortran-missing-include.patch b/patches/gcc/7.1.0/900-libgfortran-missing-include.patch
deleted file mode 100644
index 1f47469..0000000
--- a/patches/gcc/7.1.0/900-libgfortran-missing-include.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- gcc-6.3.0/libgfortran/io/close.c.org 2017-01-17 09:43:48.395850000 +0100
-+++ gcc-6.3.0/libgfortran/io/close.c 2017-01-17 09:21:05.000000000 +0100
-@@ -25,6 +25,7 @@
- #include "io.h"
- #include "unix.h"
- #include <limits.h>
-+#include <stdlib.h>
-
- typedef enum
- { CLOSE_DELETE, CLOSE_KEEP, CLOSE_UNSPECIFIED }
diff --git a/patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch b/patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch
deleted file mode 100644
index 61989e5..0000000
--- a/patches/gcc/7.1.0/910-nios2-bad-multilib-default.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -ur gcc-6.2.0.orig/gcc/config/nios2/nios2.h gcc-6.2.0/gcc/config/nios2/nios2.h
---- gcc-6.2.0.orig/gcc/config/nios2/nios2.h 2016-11-29 10:27:50.364479625 -0800
-+++ gcc-6.2.0/gcc/config/nios2/nios2.h 2016-11-29 10:29:55.069624746 -0800
-@@ -63,11 +63,11 @@
- #if TARGET_ENDIAN_DEFAULT == 0
- # define ASM_SPEC "%{!meb:-EL} %{meb:-EB} %{march=*:-march=%*}"
- # define LINK_SPEC_ENDIAN "%{!meb:-EL} %{meb:-EB}"
--# define MULTILIB_DEFAULTS { "EL" }
-+# define MULTILIB_DEFAULTS { "mel" }
- #else
- # define ASM_SPEC "%{!mel:-EB} %{mel:-EL} %{march=*:-march=%*}"
- # define LINK_SPEC_ENDIAN "%{!mel:-EB} %{mel:-EL}"
--# define MULTILIB_DEFAULTS { "EB" }
-+# define MULTILIB_DEFAULTS { "meb" }
- #endif
-
- #define LINK_SPEC LINK_SPEC_ENDIAN \
-diff -ur gcc-6.2.0.orig/gcc/config/nios2/t-nios2 gcc-6.2.0/gcc/config/nios2/t-nios2
---- gcc-6.2.0.orig/gcc/config/nios2/t-nios2 2016-11-29 10:27:50.364479625 -0800
-+++ gcc-6.2.0/gcc/config/nios2/t-nios2 2016-11-29 10:29:03.517151014 -0800
-@@ -22,6 +22,5 @@
- # MULTILIB_DIRNAMES = nomul mulx fpu-60-1 fpu-60-2
- # MULTILIB_EXCEPTIONS =
-
--# MULTILIB_OPTIONS += EL/EB
-+# MULTILIB_OPTIONS += mel/meb
- # MULTILIB_DIRNAMES += le be
--# MULTILIB_MATCHES += EL=mel EB=meb
diff --git a/patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch b/patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch
deleted file mode 100644
index 07f9a73..0000000
--- a/patches/gcc/7.1.0/930-libgcc-disable-split-stack-nothreads.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-disable split-stack for non-thread builds
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-
-diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack
---- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
-+++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100
-@@ -1,4 +1,6 @@
- # Makefile fragment to provide generic support for -fsplit-stack.
- # This should be used in config.host for any host which supports
- # -fsplit-stack.
-+ifeq ($(enable_threads),yes)
- LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
-+endif
diff --git a/patches/gcc/7.1.0/951-bionic-ndk.patch b/patches/gcc/7.1.0/951-bionic-ndk.patch
deleted file mode 100644
index 59c50a8..0000000
--- a/patches/gcc/7.1.0/951-bionic-ndk.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-commit d38d37bdfe24b7ce1bdcb55642fb6b904718e68f
-Author: Howard Chu <hyc@symas.com>
-Date: Tue Apr 25 19:02:18 2017 -0700
-
- Fix ctype for newer NDK headers
-
-diff --git a/libstdc++-v3/config/os/bionic/ctype_base.h b/libstdc++-v3/config/os/bionic/ctype_base.h
-index 33978f3..c36e63c 100644
---- a/libstdc++-v3/config/os/bionic/ctype_base.h
-+++ b/libstdc++-v3/config/os/bionic/ctype_base.h
-@@ -28,6 +28,18 @@
-
- // Information as gleaned from /usr/include/ctype.h
-
-+// _CTYPE prefix was added in NDK r14 unified headers
-+#ifndef _CTYPE_U
-+#define _CTYPE_U _U
-+#define _CTYPE_L _L
-+#define _CTYPE_D _N
-+#define _CTYPE_S _S
-+#define _CTYPE_P _P
-+#define _CTYPE_C _C
-+#define _CTYPE_X _X
-+#define _CTYPE_B _B
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,17 +53,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
- typedef char mask;
-- static const mask upper = _U;
-- static const mask lower = _L;
-- static const mask alpha = _U | _L;
-- static const mask digit = _N;
-- static const mask xdigit = _X | _N;
-- static const mask space = _S;
-- static const mask print = _P | _U | _L | _N | _B;
-- static const mask graph = _P | _U | _L | _N;
-- static const mask cntrl = _C;
-- static const mask punct = _P;
-- static const mask alnum = _U | _L | _N;
-+ static const mask upper = _CTYPE_U;
-+ static const mask lower = _CTYPE_L;
-+ static const mask alpha = _CTYPE_U | _CTYPE_L;
-+ static const mask digit = _CTYPE_D;
-+ static const mask xdigit = _CTYPE_X | _CTYPE_D;
-+ static const mask space = _CTYPE_S;
-+ static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D | _CTYPE_B;
-+ static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_D;
-+ static const mask cntrl = _CTYPE_C;
-+ static const mask punct = _CTYPE_P;
-+ static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_D;
- #if __cplusplus >= 201103L
- static const mask blank = space;
- #endif
diff --git a/patches/gcc/7.1.0/952-bionic-errno.patch b/patches/gcc/7.1.0/952-bionic-errno.patch
deleted file mode 100644
index 91f6ca3..0000000
--- a/patches/gcc/7.1.0/952-bionic-errno.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 6cd4ad106ef87a3c58b0c3478e78409b47000de0
-Author: Howard Chu <hyc@symas.com>
-Date: Tue Apr 25 20:17:03 2017 -0700
-
- Fix, errno is volatile int
-
-diff --git a/libstdc++-v3/src/filesystem/dir.cc b/libstdc++-v3/src/filesystem/dir.cc
-index 6ff12d0..5bbd664 100644
---- a/libstdc++-v3/src/filesystem/dir.cc
-+++ b/libstdc++-v3/src/filesystem/dir.cc
-@@ -147,7 +147,7 @@ fs::_Dir::advance(error_code* ec, directory_options options)
-
- int err = std::exchange(errno, 0);
- const auto entp = readdir(dirp);
-- std::swap(errno, err);
-+ std::swap((int&)errno, err);
-
- if (entp)
- {
diff --git a/patches/gcc/7.1.0/970-crystax.patch b/patches/gcc/7.1.0/970-crystax.patch
deleted file mode 100644
index 7324d7f..0000000
--- a/patches/gcc/7.1.0/970-crystax.patch
+++ /dev/null
@@ -1,553 +0,0 @@
-commit 080803512c8f6f87c2f1f711170d54033144d628
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Wed Jul 29 11:28:29 2015 +0300
-
- [android] Apply Android-related modifications
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-[Edited: keep libstdc++, drop libcrystax-related modifications]
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index f66e48cd1..1c253496b 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -942,13 +942,17 @@ aarch64*-*-elf | aarch64*-*-rtems*)
- TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
- ;;
- aarch64*-*-linux*)
-- tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
-+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h"
- tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
-+ extra_options="${extra_options} linux-android.opt"
- tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
- case $target in
- aarch64_be-*)
- tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
- ;;
-+ aarch64*-*-linux-android*)
-+ tm_file="${tm_file} aarch64/aarch64-linux-android.h"
-+ ;;
- esac
- aarch64_multilibs="${with_multilib_list}"
- if test "$aarch64_multilibs" = "default"; then
-@@ -2055,6 +2059,17 @@ mips*-*-linux*) # Linux MIPS, either endian.
- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
- extra_options="${extra_options} linux-android.opt"
- case ${target} in
-+ mips64*android*)
-+ default_mips_arch=mips64r6
-+ default_mips_abi=64
-+ tm_file="${tm_file} mips/android.h"
-+ tmake_file="${tmake_file} mips/t-linux-android64"
-+ ;;
-+ mips*android*)
-+ default_mips_arch=mips32
-+ tm_file="${tm_file} mips/android.h"
-+ tmake_file="$tmake_file mips/t-linux-android"
-+ ;;
- mipsisa32r6*)
- default_mips_arch=mips32r6
- ;;
-diff --git a/gcc/config/aarch64/aarch64-linux-android.h b/gcc/config/aarch64/aarch64-linux-android.h
-new file mode 100644
-index 000000000..db1288fd0
---- /dev/null
-+++ b/gcc/config/aarch64/aarch64-linux-android.h
-@@ -0,0 +1,59 @@
-+/* Machine description for AArch64 architecture.
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+ This file is part of GCC.
-+
-+ GCC is free software; you can redistribute it and/or modify it
-+ under the terms of the GNU General Public License as published by
-+ the Free Software Foundation; either version 3, or (at your option)
-+ any later version.
-+
-+ GCC is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+
-+ You should have received a copy of the GNU General Public License
-+ along with GCC; see the file COPYING3. If not see
-+ <http://www.gnu.org/licenses/>. */
-+
-+#ifndef GCC_AARCH64_LINUX_ANDROID_H
-+#define GCC_AARCH64_LINUX_ANDROID_H
-+
-+
-+#undef TARGET_OS_CPP_BUILTINS
-+#define TARGET_OS_CPP_BUILTINS() \
-+ do \
-+ { \
-+ GNU_USER_TARGET_OS_CPP_BUILTINS(); \
-+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
-+ } \
-+ while (0)
-+
-+#undef LINK_SPEC
-+#define LINK_SPEC \
-+ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
-+ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
-+
-+#undef CC1_SPEC
-+#define CC1_SPEC \
-+ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
-+ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
-+
-+#define CC1PLUS_SPEC \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
-+
-+#undef LIB_SPEC
-+#define LIB_SPEC \
-+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
-+ GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
-+
-+#undef STARTFILE_SPEC
-+#define STARTFILE_SPEC \
-+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
-+
-+#undef ENDFILE_SPEC
-+#define ENDFILE_SPEC \
-+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
-+
-+#endif /* GCC_AARCH64_LINUX_ANDROID_H */
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 5fcaa59a3..6864195ee 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,14 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
-
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#ifndef RUNTIME_ROOT_PREFIX
-+#define RUNTIME_ROOT_PREFIX ""
-+#endif
-+#define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#ifdef BIONIC_DYNAMIC_LINKER
-+#undef BIONIC_DYNAMIC_LINKER
-+#endif
-+#define BIONIC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/system/bin/linker64"
-
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
-index ad123dde9..97b059de6 100644
---- a/gcc/config/arm/arm.h
-+++ b/gcc/config/arm/arm.h
-@@ -1888,10 +1888,11 @@ enum arm_auto_incmodes
-
- #define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \
- || (TARGET_THUMB1 \
-+ && !inline_thumb1_jump_table \
- && (optimize_size || flag_pic)))
-
- #define CASE_VECTOR_SHORTEN_MODE(min, max, body) \
-- (TARGET_THUMB1 \
-+ (TARGET_THUMB1 && !inline_thumb1_jump_table \
- ? (min >= 0 && max < 512 \
- ? (ADDR_DIFF_VEC_FLAGS (body).offset_unsigned = 1, QImode) \
- : min >= -256 && max < 256 \
-diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
-index 47171b996..eb22d1181 100644
---- a/gcc/config/arm/arm.md
-+++ b/gcc/config/arm/arm.md
-@@ -8179,7 +8179,7 @@
- (match_operand:SI 2 "const_int_operand" "") ; total range
- (match_operand:SI 3 "" "") ; table label
- (match_operand:SI 4 "" "")] ; Out of range label
-- "(TARGET_32BIT || optimize_size || flag_pic) && !target_pure_code"
-+ "(TARGET_32BIT || ((optimize_size || flag_pic) && !inline_thumb1_jump_table)) && !target_pure_code"
- "
- {
- enum insn_code code;
-diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt
-index 0ebe01743..772453889 100644
---- a/gcc/config/arm/arm.opt
-+++ b/gcc/config/arm/arm.opt
-@@ -193,6 +193,10 @@ mthumb-interwork
- Target Report Mask(INTERWORK)
- Support calls between Thumb and ARM instruction sets.
-
-+minline-thumb1-jumptable
-+Target Report Var(inline_thumb1_jump_table)
-+Inline Thumb1 Jump table code
-+
- mtls-dialect=
- Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
- Specify thread local storage scheme.
-diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
-index 77f30554d..32158ed65 100644
---- a/gcc/config/arm/elf.h
-+++ b/gcc/config/arm/elf.h
-@@ -56,8 +56,7 @@
- #undef SUBSUBTARGET_EXTRA_SPECS
- #define SUBSUBTARGET_EXTRA_SPECS
-
--#ifndef ASM_SPEC
--#define ASM_SPEC "\
-+#define DEFAULT_ASM_SPEC "\
- %{mbig-endian:-EB} \
- %{mlittle-endian:-EL} \
- %(asm_cpu_spec) \
-@@ -66,6 +65,9 @@
- %{mthumb-interwork:-mthumb-interwork} \
- %{mfloat-abi=*} %{mfpu=*} \
- %(subtarget_extra_asm_spec)"
-+
-+#ifndef ASM_SPEC
-+#define ASM_SPEC DEFAULT_ASM_SPEC
- #endif
-
- /* The ARM uses @ are a comment character so we need to redefine
-@@ -104,8 +106,9 @@
- the code more efficient, but for Thumb-1 it's better to put them out of
- band unless we are generating compressed tables. */
- #define JUMP_TABLES_IN_TEXT_SECTION \
-- ((TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic))) \
-- && !target_pure_code)
-+ ((TARGET_32BIT || (TARGET_THUMB && !inline_thumb1_jump_table \
-+ && (optimize_size || flag_pic))) \
-+ && !target_pure_code)
-
- #ifndef LINK_SPEC
- #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index ace84816e..8c8fa6553 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -108,11 +108,16 @@
- #define CC1_SPEC \
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC, \
- GNU_USER_TARGET_CC1_SPEC " " ASAN_CC1_SPEC " " \
-- ANDROID_CC1_SPEC)
-+ ANDROID_CC1_SPEC("-fpic"))
-
- #define CC1PLUS_SPEC \
- LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
-
-+#undef ASM_SPEC
-+#define ASM_SPEC \
-+ LINUX_OR_ANDROID_CC (DEFAULT_ASM_SPEC, \
-+ DEFAULT_ASM_SPEC " " ANDROID_ASM_SPEC)
-+
- #undef LIB_SPEC
- #define LIB_SPEC \
- LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
-diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
-index fee33a3ef..22fb2ced9 100644
---- a/gcc/config/i386/gnu-user.h
-+++ b/gcc/config/i386/gnu-user.h
-@@ -65,9 +65,14 @@ along with GCC; see the file COPYING3. If not see
- When the -shared link option is used a final link is not being
- done. */
-
-+#undef ANDROID_TARGET_CC1_SPEC
-+#define ANDROID_TARGET_CC1_SPEC \
-+ " -mssse3 -fno-short-enums " \
-+
- #undef ASM_SPEC
- #define ASM_SPEC \
-- "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
-+ "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
-
- #undef SUBTARGET_EXTRA_SPECS
- #define SUBTARGET_EXTRA_SPECS \
-diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
-index 7a02a7eb4..cac4179bc 100644
---- a/gcc/config/i386/gnu-user64.h
-+++ b/gcc/config/i386/gnu-user64.h
-@@ -46,6 +46,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define SPEC_X32 "mx32"
- #endif
-
-+#undef ANDROID_TARGET_CC1_SPEC
-+#define ANDROID_TARGET_CC1_SPEC \
-+ "%{m32:-mssse3 -fno-short-enums}" \
-+ "%{!m32:-msse4.2 -mpopcnt}"
-+
- #undef ASM_SPEC
- #define ASM_SPEC "%{" SPEC_32 ":--32} \
- %{" SPEC_64 ":--64} \
-diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h
-index 4b9910fa9..3b11ed086 100644
---- a/gcc/config/i386/linux-common.h
-+++ b/gcc/config/i386/linux-common.h
-@@ -30,7 +30,13 @@ along with GCC; see the file COPYING3. If not see
- #undef CC1_SPEC
- #define CC1_SPEC \
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
-- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
-+ GNU_USER_TARGET_CC1_SPEC \
-+ ANDROID_TARGET_CC1_SPEC \
-+ " " \
-+ ANDROID_CC1_SPEC("-fPIC"))
-+
-+#define CC1PLUS_SPEC \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
-
- #undef LINK_SPEC
- #define LINK_SPEC \
-diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h
-index 301a41ccd..9623c88d0 100644
---- a/gcc/config/linux-android.h
-+++ b/gcc/config/linux-android.h
-@@ -38,15 +39,18 @@
- "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
-
- #define ANDROID_LINK_SPEC \
-- "%{shared: -Bsymbolic}"
-+ "%{shared: -Bsymbolic} -z noexecstack -z relro -z now"
-
--#define ANDROID_CC1_SPEC \
-+#define ANDROID_CC1_SPEC(ANDROID_PIC_DEFAULT) \
- "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
-- "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
-+ "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: " ANDROID_PIC_DEFAULT "}}}}"
-
- #define ANDROID_CC1PLUS_SPEC \
-- "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
-- "%{!frtti:%{!fno-rtti: -fno-rtti}}"
-+ "%{!fexceptions:%{!fno-exceptions: -fexceptions}} " \
-+ "%{!frtti:%{!fno-rtti: -frtti}}"
-+
-+#define ANDROID_ASM_SPEC \
-+ "--noexecstack"
-
- #define ANDROID_LIB_SPEC \
- "%{!static: -ldl}"
-diff --git a/gcc/config/mips/android.h b/gcc/config/mips/android.h
-new file mode 100644
-index 000000000..32c539c8d
---- /dev/null
-+++ b/gcc/config/mips/android.h
-@@ -0,0 +1,49 @@
-+/* Target macros for mips*-*android* targets.
-+ Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+This file is part of GCC.
-+
-+GCC is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 3, or (at your option)
-+any later version.
-+
-+GCC is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with GCC; see the file COPYING3. If not see
-+<http://www.gnu.org/licenses/>. */
-+
-+#undef DRIVER_SELF_SPECS
-+#define DRIVER_SELF_SPECS \
-+ /* Make sure a -mips option is present. This helps us to pick \
-+ the right multilib, and also makes the later specs easier \
-+ to write. */ \
-+ MIPS_ISA_LEVEL_SPEC, \
-+ \
-+ /* Infer the default float setting from -march. */ \
-+ MIPS_ARCH_FLOAT_SPEC, \
-+ \
-+ /* Infer the -msynci setting from -march if not explicitly set. */ \
-+ MIPS_ISA_SYNCI_SPEC, \
-+ \
-+ /* If no ABI option is specified, infer one from the ISA level \
-+ or -mgp setting. */ \
-+ "%{!mabi=*: %{" MIPS_32BIT_OPTION_SPEC ": -mabi=32;: -mabi=64}}", \
-+ \
-+ /* If no FP ABI option is specified, infer one from the \
-+ ABI/ISA level unless there is a conflicting option. */ \
-+ "%{!msoft-float: %{!msingle-float: %{!mfp*: %{!mmsa: %{mabi=32: %{" \
-+ MIPS_FPXX_OPTION_SPEC ": -mfpxx}}}}}}", \
-+ \
-+ /* If no odd-spreg option is specified, infer one from the ISA. */ \
-+ "%{!modd-spreg: %{mabi=32: %{mips32r6: -mno-odd-spreg}}}", \
-+ \
-+ /* Base SPECs. */ \
-+ BASE_DRIVER_SELF_SPECS, \
-+ \
-+ /* Use the standard linux specs for everything else. */ \
-+ LINUX_DRIVER_SELF_SPECS
-diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
-index 15b549c08..4a2816014 100644
---- a/gcc/config/mips/gnu-user.h
-+++ b/gcc/config/mips/gnu-user.h
-@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
- /* The GNU C++ standard library requires this. */ \
- if (c_dialect_cxx ()) \
- builtin_define ("_GNU_SOURCE"); \
-+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
- } while (0)
-
- #undef SUBTARGET_CPP_SPEC
-@@ -71,7 +72,8 @@ along with GCC; see the file COPYING3. If not see
-
- #undef SUBTARGET_ASM_SPEC
- #define SUBTARGET_ASM_SPEC \
-- "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}}"
-+ "%{!mno-abicalls:%{mplt:-call_nonpic;:-KPIC}} " \
-+ LINUX_OR_ANDROID_CC ("", ANDROID_ASM_SPEC)
-
- /* The MIPS assembler has different syntax for .set. We set it to
- .dummy to trap any errors. */
-@@ -120,7 +122,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
- #endif
-
- #define LINUX_DRIVER_SELF_SPECS \
-- NO_SHARED_SPECS \
-+ LINUX_OR_ANDROID_CC(NO_SHARED_SPECS, "") \
- MARCH_MTUNE_NATIVE_SPECS, \
- /* -mplt has no effect without -mno-shared. Simplify later \
- specs handling by removing a redundant option. */ \
-diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
-index 8429a7ca2..8bfacf994 100644
---- a/gcc/config/mips/linux-common.h
-+++ b/gcc/config/mips/linux-common.h
-@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
- #undef SUBTARGET_CC1_SPEC
- #define SUBTARGET_CC1_SPEC \
- LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
-- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
-+ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
-
- #undef CC1PLUS_SPEC
- #define CC1PLUS_SPEC \
-diff --git a/gcc/config/mips/t-linux-android b/gcc/config/mips/t-linux-android
-new file mode 100644
-index 000000000..39f512c81
---- /dev/null
-+++ b/gcc/config/mips/t-linux-android
-@@ -0,0 +1,3 @@
-+MULTILIB_OPTIONS = mips32r2/mips32r6
-+MULTILIB_DIRNAMES = mips-r2 mips-r6
-+MULTILIB_OSDIRNAMES = ../libr2 ../libr6
-diff --git a/gcc/config/mips/t-linux-android64 b/gcc/config/mips/t-linux-android64
-new file mode 100644
-index 000000000..55cab7d62
---- /dev/null
-+++ b/gcc/config/mips/t-linux-android64
-@@ -0,0 +1,4 @@
-+MULTILIB_OPTIONS = mabi=32 mips32/mips32r2/mips32r6/mips64r2/mips64r6
-+MULTILIB_DIRNAMES = 32 mips-r1 mips-r2 mips-r6 mips64-r2 mips64-r6
-+MULTILIB_OSDIRNAMES = ../lib ../lib ../libr2 ../libr6 ../lib64r2 ../lib64
-+MULTILIB_REQUIRED = mabi=32/mips32 mabi=32/mips32r2 mabi=32/mips32r6 mips64r2 mips64r6
-diff --git a/libgcc/gthr-posix.h b/libgcc/gthr-posix.h
-index 555c0fe24..47c8655f9 100644
---- a/libgcc/gthr-posix.h
-+++ b/libgcc/gthr-posix.h
-@@ -32,6 +32,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define __GTHREADS 1
- #define __GTHREADS_CXX0X 1
-
-+/* The following should normally be in a different header file,
-+ * but I couldn't find the right location. The point of the macro
-+ * definition below is to prevent libsupc++ and libstdc++ to reference
-+ * weak symbols in their static C++ constructors. Such code crashes
-+ * when a shared object linked statically to these libraries is
-+ * loaded on Android 2.1 (Eclair) and older platform releases, due
-+ * to a dynamic linker bug.
-+ */
-+#ifdef __ANDROID__
-+#undef GTHREAD_USE_WEAK
-+#define GTHREAD_USE_WEAK 0
-+#endif
-+
- #include <pthread.h>
-
- #if ((defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)) \
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 41797a971..f746e8353 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -78319,6 +78341,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <sys/syscall.h>
- int lk;
-+#if !defined(SYS_gettid)
-+#define SYS_gettid __NR_gettid
-+#endif
-+#if !defined(SYS_futex)
-+#define SYS_futex __NR_futex
-+#endif
- int
- main ()
- {
-@@ -78377,6 +78405,12 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <sys/syscall.h>
- int lk;
-+#if !defined(SYS_gettid)
-+#define SYS_gettid __NR_gettid
-+#endif
-+#if !defined(SYS_futex)
-+#define SYS_futex __NR_futex
-+#endif
- int
- main ()
- {
-diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h
-index e3e206b7d..e85dc2c76 100644
---- a/libstdc++-v3/include/bits/locale_facets.h
-+++ b/libstdc++-v3/include/bits/locale_facets.h
-@@ -47,6 +47,20 @@
- #include <ext/numeric_traits.h>
- #include <bits/streambuf_iterator.h>
-
-+#if !__clang__ && __GNUC__ == 4 && __GNUC_MINOR__ == 9 && __i386__
-+// CrystaX: for some reason, x86 gcc-4.9 makes ctype<char>::do_widen() and
-+// ctype<char>::_M_widen_init() methods working wrong if optimization enabled.
-+// For ctype<char>::do_widen(), values of passed arguments (__lo, __hi and __to)
-+// are completely messed up and don't correspond to passed values. In case if
-+// we disable optimization for those methods, things become correct so we apply
-+// this workaround here for a time.
-+// TODO: figure out what exactly wrong here - is it bug in GCC optimization
-+// algorithm or smth else?
-+#define __CRYSTAX_X86_DONT_OPTIMIZE __attribute__((optimize(0)))
-+#else
-+#define __CRYSTAX_X86_DONT_OPTIMIZE
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -1102,7 +1116,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- * @return @a __hi.
- */
- virtual const char*
-- do_widen(const char* __lo, const char* __hi, char_type* __to) const
-+ do_widen(const char* __lo, const char* __hi, char_type* __to) const __CRYSTAX_X86_DONT_OPTIMIZE
- {
- __builtin_memcpy(__to, __lo, __hi - __lo);
- return __hi;
-@@ -1163,7 +1177,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-
- private:
- void _M_narrow_init() const;
-- void _M_widen_init() const;
-+ void _M_widen_init() const __CRYSTAX_X86_DONT_OPTIMIZE;
- };
-
- #ifdef _GLIBCXX_USE_WCHAR_T
-diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc
-index 9b617998f..c149169bb 100644
---- a/libstdc++-v3/libsupc++/guard.cc
-+++ b/libstdc++-v3/libsupc++/guard.cc
-@@ -33,7 +33,12 @@
- #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \
- && (ATOMIC_INT_LOCK_FREE > 1) && defined(_GLIBCXX_HAVE_LINUX_FUTEX)
- # include <climits>
-+#if defined(__ANDROID__)
-+# include <sys/syscall.h>
-+# define SYS_futex __NR_futex
-+#else
- # include <syscall.h>
-+#endif
- # include <unistd.h>
- # define _GLIBCXX_USE_FUTEX
- # define _GLIBCXX_FUTEX_WAIT 0
diff --git a/patches/gcc/7.1.0/971-crystax.patch b/patches/gcc/7.1.0/971-crystax.patch
deleted file mode 100644
index 748a381..0000000
--- a/patches/gcc/7.1.0/971-crystax.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-commit 9f057b62caafe08c968103d39b5df82486a175c2
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Thu Aug 13 16:11:54 2015 +0300
-
- [android] Add additional multilib option: mfloat-abi=hard
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/arm/t-linux-androideabi b/gcc/config/arm/t-linux-androideabi
-index 8f1307c55..cbbec5bd2 100644
---- a/gcc/config/arm/t-linux-androideabi
-+++ b/gcc/config/arm/t-linux-androideabi
-@@ -1,8 +1,9 @@
--MULTILIB_OPTIONS = march=armv7-a mthumb
--MULTILIB_DIRNAMES = armv7-a thumb
--MULTILIB_EXCEPTIONS =
-+MULTILIB_OPTIONS = march=armv7-a mthumb mfloat-abi=hard
-+MULTILIB_DIRNAMES = armv7-a thumb hard
-+MULTILIB_EXCEPTIONS = mfloat-abi=hard* mthumb/mfloat-abi=hard*
- MULTILIB_MATCHES =
- MULTILIB_OSDIRNAMES =
-+MULTILIB_EXTRA_OPTS = Wl,--no-warn-mismatch
-
- # The "special" multilib can be used to build native applications for Android,
- # as opposed to native shared libraries that are then called via JNI.
diff --git a/patches/gcc/7.1.0/972-crystax.patch b/patches/gcc/7.1.0/972-crystax.patch
deleted file mode 100644
index b9077be..0000000
--- a/patches/gcc/7.1.0/972-crystax.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-commit 44a81ebb7698dac41ffa7acd5e0cc1578e5ab1fd
-Author: H.J. Lu <hongjiu.lu@intel.com>
-Date: Mon Apr 14 15:59:47 2014 -0700
-
- [android] Always enable --eh-frame-hdr for static executable
-
- See 5e6cdf76af295c9a39b695ca228cff675e8ff4ae and
- 23e3137ee2897464b051599b85a09f130d3ad05d
-
- Change-Id: Ibda473188e5a10f2a0592f2494ad00ad1f91e04b
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config.in b/gcc/config.in
-index 115cb6163..933916833 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -2119,6 +2119,12 @@
- #endif
-
-
-+/* Define if your system supports PT_GNU_EH_FRAME for static executable. */
-+#ifndef USED_FOR_TARGET
-+#undef USE_EH_FRAME_HDR_FOR_STATIC
-+#endif
-+
-+
- /* Define to 1 if the 'long long' type is wider than 'long' but still
- efficiently supported by the host hardware. */
- #ifndef USED_FOR_TARGET
-diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
-index 093c38bba..54b3e0c91 100644
---- a/gcc/config/alpha/elf.h
-+++ b/gcc/config/alpha/elf.h
-@@ -168,5 +168,9 @@ extern int alpha_this_gpdisp_sequence_number;
- I imagine that other systems will catch up. In the meantime, it
- doesn't harm to make sure that the data exists to be used later. */
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h
-index 5ded869d2..5f51ac81d 100644
---- a/gcc/config/freebsd.h
-+++ b/gcc/config/freebsd.h
-@@ -45,8 +45,12 @@ along with GCC; see the file COPYING3. If not see
- #define LIB_SPEC FBSD_LIB_SPEC
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-
- #ifdef TARGET_LIBC_PROVIDES_SSP
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
-index b0bf40a95..d1874bc29 100644
---- a/gcc/config/gnu-user.h
-+++ b/gcc/config/gnu-user.h
-@@ -118,8 +118,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-
- #undef LINK_GCC_C_SEQUENCE_SPEC
- #define LINK_GCC_C_SEQUENCE_SPEC \
-diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h
-index 37ecfc43f..a5f1b9955 100644
---- a/gcc/config/openbsd.h
-+++ b/gcc/config/openbsd.h
-@@ -136,8 +136,12 @@ while (0)
- #define LIB_SPEC OBSD_LIB_SPEC
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
- #endif
-+#endif
-
- #undef LIB_SPEC
- #define LIB_SPEC OBSD_LIB_SPEC
-diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
-index cbf909722..eb2217fad 100644
---- a/gcc/config/rs6000/sysv4.h
-+++ b/gcc/config/rs6000/sysv4.h
-@@ -789,7 +789,11 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
-
- #if defined(HAVE_LD_EH_FRAME_HDR)
--# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-+# ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+# define LINK_EH_SPEC "--eh-frame-hdr "
-+# else
-+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-+# endif
- #endif
-
- #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
-diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
-index 5160e1fda..7632a5081 100644
---- a/gcc/config/sol2.h
-+++ b/gcc/config/sol2.h
-@@ -347,7 +347,11 @@ along with GCC; see the file COPYING3. If not see
- /* Solaris 11 build 135+ implements dl_iterate_phdr. GNU ld needs
- --eh-frame-hdr to create the required .eh_frame_hdr sections. */
- #if defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
-+#ifdef USE_EH_FRAME_HDR_FOR_STATIC
-+#define LINK_EH_SPEC "--eh-frame-hdr "
-+#else
- #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
-+#endif
- #endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
- #endif
-
-diff --git a/gcc/configure b/gcc/configure
-index 1c6e3407c..28ad05004 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -934,6 +934,7 @@ enable_fix_cortex_a53_835769
- enable_fix_cortex_a53_843419
- with_glibc_version
- enable_gnu_unique_object
-+enable_eh_frame_hdr_for_static
- enable_linker_build_id
- enable_default_ssp
- with_long_double_128
-@@ -1670,6 +1671,9 @@ Optional Features:
- --enable-gnu-unique-object
- enable the use of the @gnu_unique_object ELF
- extension on glibc systems
-+ --enable-eh-frame-hdr-for-static
-+ enable linker PT_GNU_EH_FRAME support for static
-+ executable
- --enable-linker-build-id
- compiler will always pass --build-id to linker
- --enable-default-ssp enable Stack Smashing Protection as default
-@@ -27703,6 +27707,38 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
-
- $as_echo "#define HAVE_LD_EH_FRAME_HDR 1" >>confdefs.h
-
-+ # Check whether --enable-eh-frame-hdr-for-static was given.
-+if test "${enable_eh_frame_hdr_for_static+set}" = set; then :
-+ enableval=$enable_eh_frame_hdr_for_static; case $enable_eh_frame_hdr_for_static in
-+ yes | no) ;;
-+ *) as_fn_error "'$enable_eh_frame_hdr_for_static' is an invalid
-+value for --enable-eh-frame-hdr-for-static.
-+Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
-+ esac
-+else
-+ # Only support for glibc 2.3.0 or higher with AT_PHDR/AT_PHNUM from
-+# Linux kernel.
-+ if test x$host = x$build -a x$host = x$target &&
-+ ldd --version 2>&1 >/dev/null &&
-+ glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
-+ glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
-+ glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
-+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
-+ if test "$glibcnum" -ge 2003 ; then
-+ auvx=`LD_SHOW_AUXV=1 ldd 2>/dev/null`
-+ if echo "$auvx" | grep AT_PHDR > /dev/null &&
-+ echo "$auvx" | grep AT_PHNUM > /dev/null; then
-+ enable_eh_frame_hdr_for_static=yes
-+ fi
-+ fi
-+ fi
-+fi
-+
-+ if test x$enable_eh_frame_hdr_for_static = xyes; then
-+
-+$as_echo "#define USE_EH_FRAME_HDR_FOR_STATIC 1" >>confdefs.h
-+
-+ fi
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_eh_frame_hdr" >&5
- $as_echo "$gcc_cv_ld_eh_frame_hdr" >&6; }
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 6c1dcd9ae..0cf7419e7 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4828,6 +4828,35 @@ GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR])
- if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
- AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
- [Define if your linker supports .eh_frame_hdr.])
-+ AC_ARG_ENABLE(eh-frame-hdr-for-static,
-+ [AS_HELP_STRING([--enable-eh-frame-hdr-for-static],
-+ [enable linker PT_GNU_EH_FRAME support for static executable])],
-+ [case $enable_eh_frame_hdr_for_static in
-+ yes | no) ;;
-+ *) AC_MSG_ERROR(['$enable_eh_frame_hdr_for_static' is an invalid
-+value for --enable-eh-frame-hdr-for-static.
-+Valid choices are 'yes' and 'no'.]) ;;
-+ esac],
-+# Only support for glibc 2.3.0 or higher with AT_PHDR/AT_PHNUM from
-+# Linux kernel.
-+ [[if test x$host = x$build -a x$host = x$target &&
-+ ldd --version 2>&1 >/dev/null &&
-+ glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
-+ glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
-+ glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
-+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
-+ if test "$glibcnum" -ge 2003 ; then
-+ auvx=`LD_SHOW_AUXV=1 ldd 2>/dev/null`
-+ if echo "$auvx" | grep AT_PHDR > /dev/null &&
-+ echo "$auvx" | grep AT_PHNUM > /dev/null; then
-+ enable_eh_frame_hdr_for_static=yes
-+ fi
-+ fi
-+ fi]])
-+ if test x$enable_eh_frame_hdr_for_static = xyes; then
-+ AC_DEFINE(USE_EH_FRAME_HDR_FOR_STATIC, 1,
-+[Define if your system supports PT_GNU_EH_FRAME for static executable.])
-+ fi
- fi
- AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr)
-
-diff --git a/gcc/testsuite/g++.dg/eh/spec3-static.C b/gcc/testsuite/g++.dg/eh/spec3-static.C
-new file mode 100644
-index 000000000..15408effa
---- /dev/null
-+++ b/gcc/testsuite/g++.dg/eh/spec3-static.C
-@@ -0,0 +1,25 @@
-+// PR c++/4381
-+// Test that exception-specs work properly for classes with virtual bases.
-+
-+// { dg-do run }
-+// { dg-options "-static" }
-+
-+class Base {};
-+
-+struct A : virtual public Base
-+{
-+ A() {}
-+};
-+
-+struct B {};
-+
-+void func() throw (B,A)
-+{
-+ throw A();
-+}
-+
-+int main(void)
-+{
-+ try { func(); }
-+ catch (A& a) { }
-+}
-diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c
-index f3343fc4f..d42647779 100644
---- a/libgcc/crtstuff.c
-+++ b/libgcc/crtstuff.c
-@@ -88,7 +88,8 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
-- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-+ && !defined(inhibit_libc) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(BSD_DL_ITERATE_PHDR_AVAILABLE)
- #include <link.h>
- # define USE_PT_GNU_EH_FRAME
-@@ -97,7 +98,8 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) \
-- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-+ && !defined(inhibit_libc) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(__sun__) && defined(__svr4__)
- #include <link.h>
- # define USE_PT_GNU_EH_FRAME
-@@ -106,7 +108,8 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
-- && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
-+ && !defined(inhibit_libc) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(__GLIBC__) && __GLIBC__ >= 2
- #include <link.h>
- /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
-@@ -121,7 +124,7 @@ call_ ## FUNC (void) \
- #if defined(OBJECT_FORMAT_ELF) \
- && !defined(OBJECT_FORMAT_FLAT) \
- && defined(HAVE_LD_EH_FRAME_HDR) \
-- && !defined(CRTSTUFFT_O) \
-+ && (defined(USE_EH_FRAME_HDR_FOR_STATIC) || !defined(CRTSTUFFT_O)) \
- && defined(inhibit_libc) \
- && (defined(__GLIBC__) || defined(__gnu_linux__) || defined(__GNU__))
- /* On systems using glibc, an inhibit_libc build of libgcc is only
diff --git a/patches/gcc/7.1.0/973-crystax.patch b/patches/gcc/7.1.0/973-crystax.patch
deleted file mode 100644
index b96ece3..0000000
--- a/patches/gcc/7.1.0/973-crystax.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-commit 778a9ef107f51544d583f110e92b75f4d9d79117
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Thu Aug 20 19:11:07 2015 +0300
-
- [android] Don't use PIE copyrelocs for x86/x86_64
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 3d044e8bd..5c89fcab0 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -14631,6 +14631,7 @@ legitimate_pic_address_disp_p (rtx disp)
- else if (!SYMBOL_REF_FAR_ADDR_P (op0)
- && (SYMBOL_REF_LOCAL_P (op0)
- || (HAVE_LD_PIE_COPYRELOC
-+ && !TARGET_HAS_BIONIC
- && flag_pie
- && !SYMBOL_REF_WEAK (op0)
- && !SYMBOL_REF_FUNCTION_P (op0)))
diff --git a/patches/gcc/7.1.0/974-crystax.patch b/patches/gcc/7.1.0/974-crystax.patch
deleted file mode 100644
index 9db4f54..0000000
--- a/patches/gcc/7.1.0/974-crystax.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit dbeae1190cabad83999f2540523f045acc1bb4ec
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Fri Aug 21 17:41:59 2015 +0300
-
- [android] Always use gthr-posix.h instead of gthr-default.h
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/libgcc/gthr.h b/libgcc/gthr.h
-index 47a7d061a..67a680f90 100644
---- a/libgcc/gthr.h
-+++ b/libgcc/gthr.h
-@@ -145,7 +145,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define GTHREAD_USE_WEAK 1
- #endif
- #endif
-+#if __ANDROID__
-+#include "gthr-posix.h"
-+#else
- #include "gthr-default.h"
-+#endif
-
- #ifndef HIDE_EXPORTS
- #pragma GCC visibility pop
diff --git a/patches/gcc/7.1.0/975-crystax.patch b/patches/gcc/7.1.0/975-crystax.patch
deleted file mode 100644
index 9efc2a4..0000000
--- a/patches/gcc/7.1.0/975-crystax.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 8a66d422721ae5999737d7825701ff22097d287b
-Author: Andrew Hsieh <andrewhsieh@google.com>
-Date: Mon Apr 14 21:05:51 2014 -0700
-
- [android] Fix ARM generates insufficient alignment for NEON vst/vld
-
- See d909af3e2469aad87d5c3e79b93c778fd26c03a9
-
- Change-Id: Ie1de9f946f397196bb6f1623f5add86933739484
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index 5974c65d3..71b2c7aa9 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -22403,9 +22403,13 @@ arm_print_operand (FILE *stream, rtx x, int code)
- memsize = MEM_SIZE (x);
-
- /* Only certain alignment specifiers are supported by the hardware. */
-- if (memsize == 32 && (align % 32) == 0)
-+ /* Note that ARM EABI only guarentees 8-byte stack alignment. While GCC
-+ honors stricter alignment of composite type in user code, it doesn't
-+ observe the alignment of memory passed as an extra argument for function
-+ returning large composite type. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271 */
-+ if (memsize == 32 && (align % 32) == 0 && !TARGET_AAPCS_BASED)
- align_bits = 256;
-- else if ((memsize == 16 || memsize == 32) && (align % 16) == 0)
-+ else if ((memsize == 16 || memsize == 32) && (align % 16) == 0 && !TARGET_AAPCS_BASED)
- align_bits = 128;
- else if (memsize >= 8 && (align % 8) == 0)
- align_bits = 64;
diff --git a/patches/gcc/7.1.0/976-crystax.patch b/patches/gcc/7.1.0/976-crystax.patch
deleted file mode 100644
index 790d4a9..0000000
--- a/patches/gcc/7.1.0/976-crystax.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 89d27bc45ee7325dcfff6748da0f8b9c1dc1f234
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Sat Aug 22 09:55:55 2015 +0300
-
- [android][i386] Remove throw() declaration from posix_memalign() proto
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
-index a1f98d3d1..3725799be 100644
---- a/gcc/config/i386/pmm_malloc.h
-+++ b/gcc/config/i386/pmm_malloc.h
-@@ -31,7 +31,7 @@
- #ifndef __cplusplus
- extern int posix_memalign (void **, size_t, size_t);
- #else
--extern "C" int posix_memalign (void **, size_t, size_t) throw ();
-+extern "C" int posix_memalign (void **, size_t, size_t);
- #endif
-
- static __inline void *
diff --git a/patches/gcc/7.1.0/977-crystax.patch b/patches/gcc/7.1.0/977-crystax.patch
deleted file mode 100644
index 0211d72..0000000
--- a/patches/gcc/7.1.0/977-crystax.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-commit 9ae82f7cfc1073820092dd9f957559667e77db0d
-Author: Dmitry Moskalchuk <dm@crystax.net>
-Date: Tue Aug 25 09:36:42 2015 +0300
-
- [android] Explicitly make _Unwind_Resume visible for arm64/mips64
-
- Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
-
-diff --git a/gcc/config/aarch64/aarch64-linux-android.h b/gcc/config/aarch64/aarch64-linux-android.h
-index db1288fd0..38bc64d61 100644
---- a/gcc/config/aarch64/aarch64-linux-android.h
-+++ b/gcc/config/aarch64/aarch64-linux-android.h
-@@ -57,4 +57,8 @@
- #define ENDFILE_SPEC \
- LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
-
-+#ifdef IN_LIBGCC2
-+#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((visibility("default")))
-+#endif
-+
- #endif /* GCC_AARCH64_LINUX_ANDROID_H */
-diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h
-index 8bfacf994..262a9a341 100644
---- a/gcc/config/mips/linux-common.h
-+++ b/gcc/config/mips/linux-common.h
-@@ -63,3 +63,7 @@ along with GCC; see the file COPYING3. If not see
-
- /* The default value isn't sufficient in 64-bit mode. */
- #define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024)
-+
-+#ifdef IN_LIBGCC2
-+#define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((visibility("default")))
-+#endif
diff --git a/patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch b/patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch
deleted file mode 100644
index e7c9cf9..0000000
--- a/patches/gcc/linaro-4.8-2015.06/001_gcc_bug_62231.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-As-applied. From:
-
-https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02625.html
-
-Linked from bug62231 comment 4 there
-
-diff -durN a/gcc/defaults.h b/gcc/defaults.h
---- a/gcc/defaults.h 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/defaults.h 2014-12-15 13:26:13.498904465 -0800
-@@ -438,6 +438,11 @@
- #define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
- #endif
-
-+/* The mapping from dwarf CFA reg number to internal dwarf reg numbers. */
-+#ifndef DWARF_REG_TO_UNWIND_COLUMN
-+#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
-+#endif
-+
- /* Map register numbers held in the call frame info that gcc has
- collected using DWARF_FRAME_REGNUM to those that should be output in
- .debug_frame and .eh_frame. */
-diff -durN a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
---- a/gcc/dwarf2cfi.c 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/dwarf2cfi.c 2014-12-15 13:50:24.554883694 -0800
-@@ -225,7 +225,44 @@
- emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
- }
-
--/* Generate code to initialize the register size table. */
-+/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
-+ initialize the dwarf register size table entry corresponding to register
-+ REGNO in REGMODE. TABLE is the table base address, SLOTMODE is the mode
-+ to use for the size entry to initialize, and WROTE_RETURN_COLUMN needs to
-+ be set to true if the dwarf register number for REGNO is the dwarf return
-+ column number. */
-+
-+static
-+void init_one_dwarf_reg_size (int regno, enum machine_mode regmode,
-+ rtx table, enum machine_mode slotmode,
-+ bool *wrote_return_column)
-+{
-+ const unsigned int dnum = DWARF_FRAME_REGNUM (regno);
-+ const unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
-+ const unsigned int dcol = DWARF_REG_TO_UNWIND_COLUMN (rnum);
-+
-+ const HOST_WIDE_INT slotoffset = dcol * GET_MODE_SIZE (slotmode);
-+ const HOST_WIDE_INT regsize = GET_MODE_SIZE (regmode);
-+
-+ if (rnum >= DWARF_FRAME_REGISTERS)
-+ return;
-+
-+ if (dnum == DWARF_FRAME_RETURN_COLUMN)
-+ {
-+ if (regmode == VOIDmode)
-+ return;
-+ *wrote_return_column = true;
-+ }
-+
-+ if (slotoffset < 0)
-+ return;
-+
-+ emit_move_insn (adjust_address (table, slotmode, slotoffset),
-+ gen_int_mode (regsize, slotmode));
-+}
-+
-+/* Generate code to initialize the dwarf register size table located
-+ at the provided ADDRESS. */
-
- void
- expand_builtin_init_dwarf_reg_sizes (tree address)
-@@ -238,30 +275,21 @@
-
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- {
-- unsigned int dnum = DWARF_FRAME_REGNUM (i);
-- unsigned int rnum = DWARF2_FRAME_REG_OUT (dnum, 1);
--
-- if (rnum < DWARF_FRAME_REGISTERS)
-- {
-- HOST_WIDE_INT offset = rnum * GET_MODE_SIZE (mode);
-- enum machine_mode save_mode = reg_raw_mode[i];
-- HOST_WIDE_INT size;
--
-- if (HARD_REGNO_CALL_PART_CLOBBERED (i, save_mode))
-- save_mode = choose_hard_reg_mode (i, 1, true);
-- if (dnum == DWARF_FRAME_RETURN_COLUMN)
-- {
-- if (save_mode == VOIDmode)
-- continue;
-- wrote_return_column = true;
-- }
-- size = GET_MODE_SIZE (save_mode);
-- if (offset < 0)
-- continue;
-+ enum machine_mode save_mode = reg_raw_mode[i];
-+ rtx span;
-
-- emit_move_insn (adjust_address (mem, mode, offset),
-- gen_int_mode (size, mode));
-- }
-+ span = targetm.dwarf_register_span (gen_rtx_REG (save_mode, i));
-+ if (!span)
-+ init_one_dwarf_reg_size (i, save_mode, mem, mode, &wrote_return_column);
-+ else
-+ {
-+ for (int si = 0; si < XVECLEN (span, 0); si++)
-+ {
-+ rtx reg = XVECEXP (span, 0, si);
-+ init_one_dwarf_reg_size
-+ (REGNO (reg), GET_MODE (reg), mem, mode, &wrote_return_column);
-+ }
-+ }
- }
-
- if (!wrote_return_column)
-diff -durN a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c
---- a/libgcc/unwind-dw2.c 2013-05-31 16:21:46.000000000 -0700
-+++ b/libgcc/unwind-dw2.c 2014-12-15 13:26:13.570904866 -0800
-@@ -55,10 +55,6 @@
- #define PRE_GCC3_DWARF_FRAME_REGISTERS DWARF_FRAME_REGISTERS
- #endif
-
--#ifndef DWARF_REG_TO_UNWIND_COLUMN
--#define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO)
--#endif
--
- /* ??? For the public function interfaces, we tend to gcc_assert that the
- column numbers are in range. For the dwarf2 unwind info this does happen,
- although so far in a case that doesn't actually matter.
diff --git a/patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch b/patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch
deleted file mode 100644
index b970ebc..0000000
--- a/patches/gcc/linaro-4.8-2015.06/002_gcc_bug_62231.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-As-applied. From:
-
-https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02605.html
-
-Linked from bug62231 comment 4 there
-
-diff -durN a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
---- a/gcc/config/rs6000/rs6000.c 2014-12-08 17:29:04.000000000 -0800
-+++ b/gcc/config/rs6000/rs6000.c 2014-12-15 14:44:46.568801843 -0800
-@@ -1673,7 +1673,7 @@
- SCmode so as to pass the value correctly in a pair of
- registers. */
- else if (TARGET_E500_DOUBLE && FLOAT_MODE_P (mode) && mode != SCmode
-- && !DECIMAL_FLOAT_MODE_P (mode))
-+ && !DECIMAL_FLOAT_MODE_P (mode) && SPE_SIMD_REGNO_P (regno))
- reg_size = UNITS_PER_FP_WORD;
-
- else
diff --git a/patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch b/patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch
deleted file mode 100644
index d56bf0a..0000000
--- a/patches/gcc/linaro-4.8-2015.06/100-uclibc-conf.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: gcc-4.8.0/contrib/regression/objs-gcc.sh
-===================================================================
---- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200
-+++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100
-@@ -106,6 +106,10 @@
- then
- make all-gdb all-dejagnu all-ld || exit 1
- make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+ make all-gdb all-dejagnu all-ld || exit 1
-+ make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
- make bootstrap || exit 1
- make install || exit 1
diff --git a/patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch b/patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch
deleted file mode 100644
index 525592e..0000000
--- a/patches/gcc/linaro-4.8-2015.06/1000-libtool-leave-framework-alone.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- gcc-4.9.4/libtool-ldflags 2016-12-20 11:13:12.669668125 -0800
-+++ gcc-4.9.4/libtool-ldflags 2016-12-20 11:28:34.894826286 -0800
-@@ -36,6 +36,11 @@
- for arg
- do
- case $arg in
-+ -framework)
-+ # libtool handles this option. It should not be prefixed with
-+ # -Xcompiler, as that would split it from the argument that
-+ # follows.
-+ ;;
- -f*|--*)
- # Libtool does not ascribe any special meaning options
- # that begin with -f or with a double-dash. So, it will
diff --git a/patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional b/patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional
deleted file mode 100644
index b7094fe..0000000
--- a/patches/gcc/linaro-4.8-2015.06/1000-powerpc-link-with-math-lib.patch.conditional
+++ /dev/null
@@ -1,122 +0,0 @@
-http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
-
-On glibc the libc.so carries a copy of the math function copysignl() but
-on uClibc math functions like copysignl() live in libm. Since libgcc_s
-contains unresolved symbols, any attempt to link against libgcc_s
-without explicitely specifying -lm fails, resulting in a broken
-bootstrap of the compiler.
-
-Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
-
----
- libgcc/Makefile.in | 4 +++-
- libgcc/configure | 32 ++++++++++++++++++++++++++++++++
- libgcc/configure.ac | 21 +++++++++++++++++++++
- 3 files changed, 56 insertions(+), 1 deletion(-)
-
-Index: gcc-4.8.0/libgcc/Makefile.in
-===================================================================
---- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100
-+++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100
-@@ -41,6 +41,7 @@
- decimal_float = @decimal_float@
- enable_decimal_float = @enable_decimal_float@
- fixed_point = @fixed_point@
-+LIBGCC_LIBM = @LIBGCC_LIBM@
-
- host_noncanonical = @host_noncanonical@
- target_noncanonical = @target_noncanonical@
-@@ -927,9 +928,10 @@
- @multilib_dir@,$(MULTIDIR),$(subst \
- @shlib_objs@,$(objects) libgcc.a,$(subst \
- @shlib_base_name@,libgcc_s,$(subst \
-+ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
- @shlib_map_file@,$(mapfile),$(subst \
- @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
-- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
-+ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
-
- libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
- # @multilib_flags@ is still needed because this may use
-Index: gcc-4.8.0/libgcc/configure
-===================================================================
---- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100
-+++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100
-@@ -564,6 +564,7 @@
- tmake_file
- sfp_machine_header
- set_use_emutls
-+LIBGCC_LIBM
- set_have_cc_tls
- vis_hide
- fixed_point
-@@ -4481,6 +4482,37 @@
- fi
- fi
-
-+# On powerpc libgcc_s references copysignl which is a libm function but
-+# glibc apparently also provides it via libc as opposed to uClibc where
-+# it lives in libm.
-+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
-+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
-+if test "${libgcc_cv_copysignl_lib+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ echo '#include <features.h>' > conftest.c
-+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
-+ libgcc_cv_copysignl_lib="-lc"
-+ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }
-+ then
-+ libgcc_cv_copysignl_lib="-lm"
-+ fi
-+ rm -f conftest.*
-+
-+fi
-+echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
-+echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
-+
-+case /${libgcc_cv_copysignl_lib}/ in
-+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
-+ *) LIBGCC_LIBM= ;;
-+esac
-
- # Conditionalize the makefile for this target machine.
- tmake_file_=
-Index: gcc-4.8.0/libgcc/configure.ac
-===================================================================
---- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200
-+++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100
-@@ -326,6 +326,27 @@
- fi
- AC_SUBST(set_have_cc_tls)
-
-+# On powerpc libgcc_s references copysignl which is a libm function but
-+# glibc apparently also provides it via libc as opposed to uClibc where
-+# it lives in libm.
-+AC_CACHE_CHECK
-+ libgcc_cv_copysignl_lib,
-+ echo '#include <features.h>' > conftest.c
-+ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
-+ libgcc_cv_copysignl_lib="-lc"
-+ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
-+ then
-+ libgcc_cv_copysignl_lib="-lm"
-+ fi
-+ rm -f conftest.*
-+ ])
-+
-+case /${libgcc_cv_copysignl_lib}/ in
-+ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
-+ *) LIBGCC_LIBM= ;;
-+esac
-+AC_SUBST(LIBGCC_LIBM)
-+
- # See if we have emulated thread-local storage.
- GCC_CHECK_EMUTLS
- set_use_emutls=
diff --git a/patches/gcc/linaro-4.8-2015.06/111-pr65730.patch b/patches/gcc/linaro-4.8-2015.06/111-pr65730.patch
deleted file mode 100644
index f195e30..0000000
--- a/patches/gcc/linaro-4.8-2015.06/111-pr65730.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001
-From: Max Filippov <jcmvbkbc@gmail.com>
-Date: Fri, 10 Apr 2015 17:46:30 +0300
-Subject: [PATCH] Fix PR target/65730
-
-2015-05-20 Max Filippov <jcmvbkbc@gmail.com>
-gcc/
- * config/xtensa/xtensa.c (init_alignment_context): Replace MULT
- by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT).
-
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
-Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452
-Changes to ChangeLog are dropped.
-
- gcc/config/xtensa/xtensa.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
-index eb039ba..7296e36 100644
---- a/gcc/config/xtensa/xtensa.c
-+++ b/gcc/config/xtensa/xtensa.c
-@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem)
- if (ac->shift != NULL_RTX)
- {
- /* Shift is the byte count, but we need the bitcount. */
-- ac->shift = expand_simple_binop (SImode, MULT, ac->shift,
-- GEN_INT (BITS_PER_UNIT),
-+ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0);
-+ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift,
-+ GEN_INT (exact_log2 (BITS_PER_UNIT)),
- NULL_RTX, 1, OPTAB_DIRECT);
- ac->modemask = expand_simple_binop (SImode, ASHIFT,
- GEN_INT (GET_MODE_MASK (mode)),
---
-1.8.1.4
-
diff --git a/patches/gcc/linaro-4.8-2015.06/130-pr43538.patch b/patches/gcc/linaro-4.8-2015.06/130-pr43538.patch
deleted file mode 100644
index 19e57bb..0000000
--- a/patches/gcc/linaro-4.8-2015.06/130-pr43538.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001
-From: glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 25 Apr 2014 08:03:08 +0000
-Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
-
- PR target/43538
- * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- config/mt-gnu | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config/mt-gnu b/config/mt-gnu
-index 15bf417..5c696f5 100644
---- a/config/mt-gnu
-+++ b/config/mt-gnu
-@@ -1 +1 @@
--CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
-+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
---
-2.1.4
-
diff --git a/patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch b/patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 1c49fb0..0000000
--- a/patches/gcc/linaro-4.8-2015.06/131-mt-ospace-preserve-FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9bcf38cd9f382486b3823eb923b50e2e9a89cef7 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 18 Nov 2014 22:12:52 +0000
-Subject: [PATCH] 2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
-
- * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
- overwriting.
- (CXXFLAGS_FOR_TARGET): Similarly.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217739 138bc75d-0d04-0410-961f-82ee72b054a4
-Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
----
- config/mt-ospace | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/config/mt-ospace b/config/mt-ospace
-index 7f09104..ce29ff4 100644
---- a/config/mt-ospace
-+++ b/config/mt-ospace
-@@ -1,3 +1,3 @@
- # Build libraries optimizing for space, not speed.
-- CFLAGS_FOR_TARGET = -g -Os
-- CXXFLAGS_FOR_TARGET = -g -Os
-+ CFLAGS_FOR_TARGET += -g -Os
-+ CXXFLAGS_FOR_TARGET += -g -Os
---
-2.1.4
-
diff --git a/patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch b/patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch
deleted file mode 100644
index ac1d846..0000000
--- a/patches/gcc/linaro-4.8-2015.06/132-build_gcc-5_with_gcc-6.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
-From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 25 Feb 2016 15:33:50 +0000
-Subject: [PATCH 1/1] 2016-02-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- Backported from mainline
- 2016-02-19 Jakub Jelinek <jakub@redhat.com>
- Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * Make-lang.in: Invoke gperf with -L C++.
- * cfns.gperf: Remove prototypes for hash and libc_name_p
- inlines.
- * cfns.h: Regenerated.
- * except.c (nothrow_libfn_p): Adjust.
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4
-diff -urpN a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
---- a/gcc/cp/cfns.gperf 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/cp/cfns.gperf 2016-12-05 13:55:20.331616274 -0800
-@@ -1,3 +1,5 @@
-+%language=C++
-+%define class-name libc_name
- %{
- /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-@@ -16,14 +18,6 @@ for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
--#ifdef __GNUC__
--__inline
--#endif
--static unsigned int hash (const char *, unsigned int);
--#ifdef __GNUC__
--__inline
--#endif
--const char * libc_name_p (const char *, unsigned int);
- %}
- %%
- # The standard C library functions, for feeding to gperf; the result is used
-diff -urpN a/gcc/cp/cfns.h b/gcc/cp/cfns.h
---- a/gcc/cp/cfns.h 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/cp/cfns.h 2016-12-05 13:55:20.331616274 -0800
-@@ -1,5 +1,5 @@
--/* ANSI-C code produced by gperf version 3.0.3 */
--/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
-+/* C++ code produced by gperf version 3.0.4 */
-+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
-
- #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
- && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-@@ -28,7 +28,7 @@
- #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
- #endif
-
--#line 1 "cfns.gperf"
-+#line 3 "cfns.gperf"
-
- /* Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-@@ -47,25 +47,18 @@ for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
--#ifdef __GNUC__
--__inline
--#endif
--static unsigned int hash (const char *, unsigned int);
--#ifdef __GNUC__
--__inline
--#endif
--const char * libc_name_p (const char *, unsigned int);
- /* maximum key range = 391, duplicates = 0 */
-
--#ifdef __GNUC__
--__inline
--#else
--#ifdef __cplusplus
--inline
--#endif
--#endif
--static unsigned int
--hash (register const char *str, register unsigned int len)
-+class libc_name
-+{
-+private:
-+ static inline unsigned int hash (const char *str, unsigned int len);
-+public:
-+ static const char *libc_name_p (const char *str, unsigned int len);
-+};
-+
-+inline unsigned int
-+libc_name::hash (register const char *str, register unsigned int len)
- {
- static const unsigned short asso_values[] =
- {
-@@ -122,14 +115,8 @@ hash (register const char *str, register
- return hval + asso_values[(unsigned char)str[len - 1]];
- }
-
--#ifdef __GNUC__
--__inline
--#ifdef __GNUC_STDC_INLINE__
--__attribute__ ((__gnu_inline__))
--#endif
--#endif
- const char *
--libc_name_p (register const char *str, register unsigned int len)
-+libc_name::libc_name_p (register const char *str, register unsigned int len)
- {
- enum
- {
-diff -urpN a/gcc/cp/except.c b/gcc/cp/except.c
---- a/gcc/cp/except.c 2013-10-25 06:49:48.000000000 -0700
-+++ b/gcc/cp/except.c 2016-12-05 13:55:20.331616274 -0800
-@@ -1025,7 +1025,8 @@ nothrow_libfn_p (const_tree fn)
- unless the system headers are playing rename tricks, and if
- they are, we don't want to be confused by them. */
- id = DECL_NAME (fn);
-- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
-+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
-+ IDENTIFIER_LENGTH (id));
- }
-
- /* Returns nonzero if an exception of type FROM will be caught by a
-diff -urpN a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
---- a/gcc/cp/Make-lang.in 2013-01-10 12:38:27.000000000 -0800
-+++ b/gcc/cp/Make-lang.in 2016-12-05 13:55:20.331616274 -0800
-@@ -115,7 +115,7 @@ else
- # deleting the $(srcdir)/cp/cfns.h file.
- $(srcdir)/cp/cfns.h:
- endif
-- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
-+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
- $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
-
- #
diff --git a/patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch b/patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch
deleted file mode 100644
index 00efda2..0000000
--- a/patches/gcc/linaro-4.8-2015.06/301-missing-execinfo_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: gcc-4.8.0/boehm-gc/include/gc.h
-===================================================================
---- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
-+++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100
-@@ -503,7 +503,7 @@
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
-- && !defined(__ia64__)
-+ && !defined(__ia64__) && !defined(__UCLIBC__)
- # ifndef GC_HAVE_BUILTIN_BACKTRACE
- # define GC_HAVE_BUILTIN_BACKTRACE
- # endif
diff --git a/patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch b/patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch
deleted file mode 100644
index 35d5f50..0000000
--- a/patches/gcc/linaro-4.8-2015.06/305-libmudflap-susv3-legacy.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Index: gcc-4.8.0/libmudflap/mf-hooks2.c
-===================================================================
---- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100
-+++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100
-@@ -424,7 +424,7 @@
- {
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
-- bzero (s, n);
-+ memset (s, 0, n);
- }
-
-
-@@ -434,7 +434,7 @@
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
- MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
-- bcopy (src, dest, n);
-+ memmove (dest, src, n);
- }
-
-
-@@ -444,7 +444,7 @@
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
- MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
-- return bcmp (s1, s2, n);
-+ return n == 0 ? 0 : memcmp (s1, s2, n);
- }
-
-
-@@ -453,7 +453,7 @@
- size_t n = strlen (s);
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
-- return index (s, c);
-+ return strchr (s, c);
- }
-
-
-@@ -462,7 +462,7 @@
- size_t n = strlen (s);
- TRACE ("%s\n", __PRETTY_FUNCTION__);
- MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
-- return rindex (s, c);
-+ return strrchr (s, c);
- }
-
- /* XXX: stpcpy, memccpy */
diff --git a/patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch b/patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
deleted file mode 100644
index 3cf66b2..0000000
--- a/patches/gcc/linaro-4.8-2015.06/370-gcc-plugin-Win-Dont-need-undefined-extern-var-refs-nor-fpic.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-diff -urpN '--exclude=autom4te.cache' gcc-4.8.5.orig/gcc/configure gcc-4.8.5/gcc/configure
---- gcc-4.8.5.orig/gcc/configure 2014-12-08 03:29:43.000000000 -0800
-+++ gcc-4.8.5/gcc/configure 2017-02-11 16:57:27.424807994 -0800
-@@ -27364,6 +27364,9 @@ fi
-
-
- pluginlibs=
-+PICFLAG="-fPIC"
-+UNDEFINEDPREAMBLE="extern int X;"
-+UNDEFINEDCODE="return X == 0;"
-
- case "${host}" in
- *-*-darwin*)
-@@ -27375,6 +27378,11 @@ case "${host}" in
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -27487,23 +27495,23 @@ fi
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fPIC -shared" >&5
--$as_echo_n "checking for -fPIC -shared... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${PICFLAG} -shared" >&5
-+$as_echo_n "checking for ${PICFLAG} -shared... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
--extern int X;
-+${UNDEFINEDPREAMBLE}
- int
- main ()
- {
--return X == 0;
-+${UNDEFINEDCODE}
- ;
- return 0;
- }
-diff -urpN '--exclude=autom4te.cache' gcc-4.8.5.orig/gcc/configure.ac gcc-4.8.5/gcc/configure.ac
---- gcc-4.8.5.orig/gcc/configure.ac 2014-12-08 03:29:43.000000000 -0800
-+++ gcc-4.8.5/gcc/configure.ac 2017-02-11 16:57:27.424807994 -0800
-@@ -5243,6 +5243,9 @@ enable_plugin=$enableval,
- enable_plugin=yes; default_plugin=yes)
-
- pluginlibs=
-+PICFLAG="-fPIC"
-+UNDEFINEDPREAMBLE="extern int X;"
-+UNDEFINEDCODE="return X == 0;"
-
- case "${host}" in
- *-*-darwin*)
-@@ -5254,6 +5257,11 @@ case "${host}" in
- export_sym_check=
- fi
- ;;
-+ *-*-mingw*|*-*-cygwin*|*-*-msys*)
-+ PICFLAG=""
-+ UNDEFINEDPREAMBLE=""
-+ UNDEFINEDCODE=""
-+ ;;
- *)
- if test x$build = x$host; then
- export_sym_check="objdump${exeext} -T"
-@@ -5305,17 +5313,17 @@ if test x"$enable_plugin" = x"yes"; then
- case "${host}" in
- *-*-darwin*)
- CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
-- CFLAGS="$CFLAGS -fPIC"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
- LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
- ;;
- *)
-- CFLAGS="$CFLAGS -fPIC"
-- LDFLAGS="$LDFLAGS -fPIC -shared"
-+ CFLAGS="$CFLAGS ${PICFLAG}"
-+ LDFLAGS="$LDFLAGS ${PICFLAG} -shared"
- ;;
- esac
-- AC_MSG_CHECKING([for -fPIC -shared])
-+ AC_MSG_CHECKING([for ${PICFLAG} -shared])
- AC_TRY_LINK(
-- [extern int X;],[return X == 0;],
-+ [${UNDEFINEDPREAMBLE}],[${UNDEFINEDCODE}],
- [AC_MSG_RESULT([yes]); have_pic_shared=yes],
- [AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
diff --git a/patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch b/patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch
deleted file mode 100644
index c8cb377..0000000
--- a/patches/gcc/linaro-4.8-2015.06/810-arm-softfloat-libgcc.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: gcc-4.8.0/gcc/config/arm/linux-elf.h
-===================================================================
---- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100
-+++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100
-@@ -55,7 +55,7 @@
- %{shared:-lc} \
- %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-
--#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-+#define LIBGCC_SPEC "-lgcc"
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-
-Index: gcc-4.8.0/libgcc/config/arm/t-linux
-===================================================================
---- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100
-+++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100
-@@ -1,6 +1,11 @@
- LIB1ASMSRC = arm/lib1funcs.S
- LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
-- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3
-+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_addsubdf3 _arm_addsubsf3 \
-+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
-+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
-+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
-+ _arm_fixsfsi _arm_fixunssfsi
-
- # Just for these, we omit the frame pointer since it makes such a big
- # difference.
diff --git a/patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch b/patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch
deleted file mode 100644
index 37f8f2a..0000000
--- a/patches/gcc/linaro-4.8-2015.06/830-arm_unbreak_armv4t.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://sourceware.org/ml/crossgcc/2008-05/msg00009.html
-
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -45,7 +45,7 @@
- The ARM10TDMI core is the default for armv5t, so set
- SUBTARGET_CPU_DEFAULT to achieve this. */
- #undef SUBTARGET_CPU_DEFAULT
--#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
-
- /* TARGET_BIG_ENDIAN_DEFAULT is set in
- config.gcc for big endian configurations. */
diff --git a/patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch b/patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch
deleted file mode 100644
index a011e24..0000000
--- a/patches/gcc/linaro-4.8-2015.06/841-PR57717-E500v2.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717
-
-Upstream-Status: Backport
-Signed-off-by: Julian Brown <Julian_Brown@mentor.com>
-[Gustavo: Update for gcc 4.8.3]
-
-fix for PR57717 (PowerPC E500v2)
-http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html
-
-diff -Nura gcc-4.8.3/gcc/config/rs6000/rs6000.c gcc-4.8.3-pr57717/gcc/config/rs6000/rs6000.c
---- gcc-4.8.3/gcc/config/rs6000/rs6000.c 2014-05-04 23:18:35.000000000 -0300
-+++ gcc-4.8.3-pr57717/gcc/config/rs6000/rs6000.c 2014-05-22 15:20:12.554270919 -0300
-@@ -7343,9 +7343,7 @@
- && GET_CODE (XEXP (x, 1)) == CONST_INT
- && reg_offset_p
- && !SPE_VECTOR_MODE (mode)
-- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode
-- || mode == DDmode || mode == TDmode
-- || mode == DImode))
-+ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD)
- && (!VECTOR_MODE_P (mode) || VECTOR_MEM_NONE_P (mode)))
- {
- HOST_WIDE_INT val = INTVAL (XEXP (x, 1));
diff --git a/patches/gcc/linaro-4.8-2015.06/842-PR60155.patch b/patches/gcc/linaro-4.8-2015.06/842-PR60155.patch
deleted file mode 100644
index 7bc2122..0000000
--- a/patches/gcc/linaro-4.8-2015.06/842-PR60155.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155
-Upstream status: in trunk.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
---- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726
-+++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134
-@@ -2502,6 +2502,65 @@
- }
- }
-
-+struct set_data
-+{
-+ rtx insn;
-+ const_rtx set;
-+ int nsets;
-+};
-+
-+/* Increment number of sets and record set in DATA. */
-+
-+static void
-+record_set_data (rtx dest, const_rtx set, void *data)
-+{
-+ struct set_data *s = (struct set_data *)data;
-+
-+ if (GET_CODE (set) == SET)
-+ {
-+ /* We allow insns having multiple sets, where all but one are
-+ dead as single set insns. In the common case only a single
-+ set is present, so we want to avoid checking for REG_UNUSED
-+ notes unless necessary. */
-+ if (s->nsets == 1
-+ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set))
-+ && !side_effects_p (s->set))
-+ s->nsets = 0;
-+
-+ if (!s->nsets)
-+ {
-+ /* Record this set. */
-+ s->nsets += 1;
-+ s->set = set;
-+ }
-+ else if (!find_reg_note (s->insn, REG_UNUSED, dest)
-+ || side_effects_p (set))
-+ s->nsets += 1;
-+ }
-+}
-+
-+static const_rtx
-+single_set_gcse (rtx insn)
-+{
-+ struct set_data s;
-+ rtx pattern;
-+
-+ gcc_assert (INSN_P (insn));
-+
-+ /* Optimize common case. */
-+ pattern = PATTERN (insn);
-+ if (GET_CODE (pattern) == SET)
-+ return pattern;
-+
-+ s.insn = insn;
-+ s.nsets = 0;
-+ note_stores (pattern, record_set_data, &s);
-+
-+ /* Considered invariant insns have exactly one set. */
-+ gcc_assert (s.nsets == 1);
-+ return s.set;
-+}
-+
- /* Emit move from SRC to DEST noting the equivalence with expression computed
- in INSN. */
-
-@@ -2509,7 +2568,8 @@
- gcse_emit_move_after (rtx dest, rtx src, rtx insn)
- {
- rtx new_rtx;
-- rtx set = single_set (insn), set2;
-+ const_rtx set = single_set_gcse (insn);
-+ rtx set2;
- rtx note;
- rtx eqv = NULL_RTX;
-
-@@ -3369,13 +3429,12 @@
- FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr)
- {
- rtx insn;
-- rtx set;
-+ const_rtx set;
-
- gcc_assert (!occr->deleted_p);
-
- insn = occr->insn;
-- set = single_set (insn);
-- gcc_assert (set);
-+ set = single_set_gcse (insn);
-
- /* Create a pseudo-reg to store the result of reaching
- expressions into. Get the mode for the new pseudo
-@@ -3456,10 +3515,8 @@
- {
- rtx reg;
- enum reg_class pressure_class;
-- rtx set = single_set (insn);
-+ const_rtx set = single_set_gcse (insn);
-
-- /* Considered invariant insns have only one set. */
-- gcc_assert (set != NULL_RTX);
- reg = SET_DEST (set);
- if (GET_CODE (reg) == SUBREG)
- reg = SUBREG_REG (reg);
diff --git a/patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch b/patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch
deleted file mode 100644
index afa650c..0000000
--- a/patches/gcc/linaro-4.8-2015.06/843-aarch64-vmlaq_lane_s32-typo.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 845478644ba54a6947e9b224f2e5cd342e8257a9 Mon Sep 17 00:00:00 2001
-From: Andrew Hsieh <andrewhsieh@google.com>
-Date: Wed, 25 Jun 2014 22:13:48 -0700
-Subject: [PATCH] Fix a typo in vmlaq_lane_s32
-
-BUG=15526898
-
-Change-Id: I4e35a764d369d378808dab29beefe34d1f93249b
-Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
----
-
-diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h
-index 73c7e7d..92b0119 100644
---- a/gcc/config/aarch64/arm_neon.h
-+++ b/gcc/config/aarch64/arm_neon.h
-@@ -9984,7 +9984,7 @@
- #define vmlaq_lane_s32(a, b, c, d) \
- __extension__ \
- ({ \
-- int32x4_t c_ = (c); \
-+ int32x2_t c_ = (c); \
- int32x4_t b_ = (b); \
- int32x4_t a_ = (a); \
- int32x4_t result; \
diff --git a/patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch b/patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch
deleted file mode 100644
index 792976f..0000000
--- a/patches/gcc/linaro-4.8-2015.06/850-libstdcxx-uclibc-c99.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-Allow C99-depending features of libstdc++ with uClibc
-
-The libstdc++ code is fairly restrictive on how it checks for C99
-compatibility: it requires *complete* C99 support to enable certain
-features. For example, uClibc provides a good number of C99 features,
-but not C99 complex number support. For this reason, libstdc++
-completely disables many the standard C++ methods that can in fact
-work because uClibc provides the necessary functions.
-
-This patch is similar and highly inspired from
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in
-a way that doesn't involve changing the configure.ac script, as
-autoreconfiguring gcc is complicated. It simply relies on the fact
-that uClibc defines the __UCLIBC__ definition.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/libstdc++-v3/config/locale/generic/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -70,7 +70,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/config/locale/gnu/c_locale.h
-===================================================================
---- a/libstdc++-v3/config/locale/gnu/c_locale.h
-+++ b/libstdc++-v3/config/locale/gnu/c_locale.h
-@@ -88,7 +88,7 @@
- __builtin_va_list __args;
- __builtin_va_start(__args, __fmt);
-
--#ifdef _GLIBCXX_USE_C99
-+#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)
- const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
- #else
- const int __ret = __builtin_vsprintf(__out, __fmt, __args);
-Index: b/libstdc++-v3/include/bits/basic_string.h
-===================================================================
---- a/libstdc++-v3/include/bits/basic_string.h
-+++ b/libstdc++-v3/include/bits/basic_string.h
-@@ -2809,7 +2809,7 @@
- _GLIBCXX_END_NAMESPACE_VERSION
- } // namespace
-
--#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \
-+#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \
- && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
-
- #include <ext/string_conversions.h>
-Index: b/libstdc++-v3/include/bits/locale_facets.tcc
-===================================================================
---- a/libstdc++-v3/include/bits/locale_facets.tcc
-+++ b/libstdc++-v3/include/bits/locale_facets.tcc
-@@ -987,7 +987,7 @@
- char __fbuf[16];
- __num_base::_S_format_float(__io, __fbuf, __mod);
-
--#ifdef _G