<commit_before>diff -durN gcc-6.2.0/gcc/config/arm/t-arm-elf gcc-6.2.0.patched/gcc/config/arm/t-arm-elf
--- gcc-6.2.0/gcc/config/arm/t-arm-elf	2016-01-04 06:30:50.000000000 -0800
+++ gcc-6.2.0.patched/gcc/config/arm/t-arm-elf	2016-09-30 11:41:23.318385513 -0700
@@ -25,22 +25,36 @@
 #MULTILIB_DIRNAMES    += fa526 fa626 fa606te fa626te fmp626 fa726te
 #MULTILIB_EXCEPTIONS  += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
 
-#MULTILIB_OPTIONS      += march=armv7
-#MULTILIB_DIRNAMES     += thumb2
-#MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
-#MULTILIB_MATCHES      += march?armv7=march?armv7-a
-#MULTILIB_MATCHES      += march?armv7=march?armv7-r
-#MULTILIB_MATCHES      += march?armv7=march?armv7-m
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
+# build a bunch of specialized versions of libcc for particular cores
+#MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/cortex-a9/march=armv4t/march=armv5t/march=armv5te/march=armv6/march=armv6j/march=armv6k/march=armv6z/march=armv6zk/march=armv7-a/march=armv7-r
+#MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9 cortex-m3 armv4t armv5t armv5te armv6 armv6j armv6k armv6z armv6zk armv7-a armv7-r
+#MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/mcpu=cortex-a9
+#MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9
+
+MULTILIB_OPTIONS      += march=armv7
+MULTILIB_DIRNAMES     += thumb2
+MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
+MULTILIB_MATCHES      += march?armv7=march?armv7-a
+MULTILIB_MATCHES      += march?armv7=march?armv7-r
+MULTILIB_MATCHES      += march?armv7=march?armv7-m
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a15
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a9
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m4
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
+
+#MULTILIB_OPTIONS      += mfpu=vfp
+#MULTILIB_DIRNAMES     += vfp
+#MULTILIB_MATCHES      += mfpu?vfp=mcpu?arm1136jf-s
+#MULTILIB_MATCHES      += mfpu?vfp=mcpu?arm1136jzf-s
 
 # Not quite true.  We can support hard-vfp calling in Thumb2, but how do we
 # express that here?  Also, we really need architecture v5e or later
 # (mcrr etc).
-MULTILIB_OPTIONS       += mfloat-abi=hard
-MULTILIB_DIRNAMES      += fpu
-MULTILIB_EXCEPTIONS    += *mthumb/*mfloat-abi=hard*
+#MULTILIB_OPTIONS       += mfloat-abi=hard
+#MULTILIB_DIRNAMES      += fpu
+#MULTILIB_EXCEPTIONS    += *mthumb/*mfloat-abi=hard*
 #MULTILIB_EXCEPTIONS    += *mcpu=fa526/*mfloat-abi=hard*
 #MULTILIB_EXCEPTIONS    += *mcpu=fa626/*mfloat-abi=hard*
 
@@ -56,8 +70,8 @@
 # MULTILIB_DIRNAMES   += fpu soft
 # MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
 # 
-# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
-# MULTILIB_DIRNAMES   += normal interwork
+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
+MULTILIB_DIRNAMES   += normal interwork
 # 
 # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore
 # MULTILIB_DIRNAMES   += elf under
diff -durN gcc-6.2.0/gcc/config/i386/t-x86_64-elf gcc-6.2.0.patched/gcc/config/i386/t-x86_64-elf
--- gcc-6.2.0/gcc/config/i386/t-x86_64-elf	1969-12-31 16:00:00.000000000 -0800
+++ gcc-6.2.0.patched/gcc/config/i386/t-x86_64-elf	2016-09-30 11:55:53.602700086 -0700
@@ -0,0 +1,7 @@
+# Add redzoneless libgcc
+MULTILIB_OPTIONS  += mno-red-zone
+MULTILIB_DIRNAMES += no-red-zone
+
+# Build a 32bit libgcc as well
+MULTILIB_OPTIONS  += m32
+MULTILIB_DIRNAMES  += 32
Binary files gcc-6.2.0/gcc/config/i386/.t-x86_64-elf.swp and gcc-6.2.0.patched/gcc/config/i386/.t-x86_64-elf.swp differ
diff -durN gcc-6.2.0/gcc/config.gcc gcc-6.2.0.patched/gcc/config.gcc
--- gcc-6.2.0/gcc/config.gcc	2016-06-08 06:34:25.000000000 -0700
+++ gcc-6.2.0.patched/gcc/config.gcc	2016-09-30 11:41:23.318385513 -0700
@@ -1418,6 +1418,7 @@
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
 	;;
 x86_64-*-elf*)
+	tmake_file="${tmake_file} i386/t-x86_64-elf"
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
 	;;
 x86_64-*-rtems*)
<commit_msg>[gcc][riscv] update the patch to add a mcmodel=medany multilib<commit_after>diff -durN gcc-7.4.0/gcc/config/arm/t-arm-elf gcc-7.4.0.patched/gcc/config/arm/t-arm-elf
--- gcc-7.4.0/gcc/config/arm/t-arm-elf	2017-01-01 04:07:43.905435000 -0800
+++ gcc-7.4.0.patched/gcc/config/arm/t-arm-elf	2019-11-02 15:32:31.855001792 -0700
@@ -25,22 +25,36 @@
 #MULTILIB_DIRNAMES    += fa526 fa626 fa606te fa626te fmp626 fa726te
 #MULTILIB_EXCEPTIONS  += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
 
-#MULTILIB_OPTIONS      += march=armv7
-#MULTILIB_DIRNAMES     += thumb2
-#MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
-#MULTILIB_MATCHES      += march?armv7=march?armv7-a
-#MULTILIB_MATCHES      += march?armv7=march?armv7-r
-#MULTILIB_MATCHES      += march?armv7=march?armv7-m
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
-#MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
+# build a bunch of specialized versions of libcc for particular cores
+#MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/cortex-a9/march=armv4t/march=armv5t/march=armv5te/march=armv6/march=armv6j/march=armv6k/march=armv6z/march=armv6zk/march=armv7-a/march=armv7-r
+#MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9 cortex-m3 armv4t armv5t armv5te armv6 armv6j armv6k armv6z armv6zk armv7-a armv7-r
+#MULTILIB_OPTIONS    += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/mcpu=cortex-a9
+#MULTILIB_DIRNAMES   += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9
+
+MULTILIB_OPTIONS      += march=armv7
+MULTILIB_DIRNAMES     += thumb2
+MULTILIB_EXCEPTIONS   += march=armv7* marm/*march=armv7*
+MULTILIB_MATCHES      += march?armv7=march?armv7-a
+MULTILIB_MATCHES      += march?armv7=march?armv7-r
+MULTILIB_MATCHES      += march?armv7=march?armv7-m
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a15
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a9
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-a8
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-r4
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m4
+MULTILIB_MATCHES      += march?armv7=mcpu?cortex-m3
+
+#MULTILIB_OPTIONS      += mfpu=vfp
+#MULTILIB_DIRNAMES     += vfp
+#MULTILIB_MATCHES      += mfpu?vfp=mcpu?arm1136jf-s
+#MULTILIB_MATCHES      += mfpu?vfp=mcpu?arm1136jzf-s
 
 # Not quite true.  We can support hard-vfp calling in Thumb2, but how do we
 # express that here?  Also, we really need architecture v5e or later
 # (mcrr etc).
-MULTILIB_OPTIONS       += mfloat-abi=hard
-MULTILIB_DIRNAMES      += fpu
-MULTILIB_EXCEPTIONS    += *mthumb/*mfloat-abi=hard*
+#MULTILIB_OPTIONS       += mfloat-abi=hard
+#MULTILIB_DIRNAMES      += fpu
+#MULTILIB_EXCEPTIONS    += *mthumb/*mfloat-abi=hard*
 #MULTILIB_EXCEPTIONS    += *mcpu=fa526/*mfloat-abi=hard*
 #MULTILIB_EXCEPTIONS    += *mcpu=fa626/*mfloat-abi=hard*
 
@@ -56,8 +70,8 @@
 # MULTILIB_DIRNAMES   += fpu soft
 # MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
 # 
-# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
-# MULTILIB_DIRNAMES   += normal interwork
+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
+MULTILIB_DIRNAMES   += normal interwork
 # 
 # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore
 # MULTILIB_DIRNAMES   += elf under
diff -durN gcc-7.4.0/gcc/config/i386/t-x86_64-elf gcc-7.4.0.patched/gcc/config/i386/t-x86_64-elf
--- gcc-7.4.0/gcc/config/i386/t-x86_64-elf	1969-12-31 16:00:00.000000000 -0800
+++ gcc-7.4.0.patched/gcc/config/i386/t-x86_64-elf	2019-11-02 15:32:31.855001792 -0700
@@ -0,0 +1,7 @@
+# Add redzoneless libgcc
+MULTILIB_OPTIONS  += mno-red-zone
+MULTILIB_DIRNAMES += no-red-zone
+
+# Build a 32bit libgcc as well
+MULTILIB_OPTIONS  += m32
+MULTILIB_DIRNAMES  += 32
diff -durN gcc-7.4.0/gcc/config/riscv/t-elf-multilib gcc-7.4.0.patched/gcc/config/riscv/t-elf-multilib
--- gcc-7.4.0/gcc/config/riscv/t-elf-multilib	2017-02-06 13:38:37.794530000 -0800
+++ gcc-7.4.0.patched/gcc/config/riscv/t-elf-multilib	2019-11-02 15:51:54.556652490 -0700
@@ -28,3 +28,10 @@
 march.rv32imafc/mabi.ilp32f=march.rv32imafdc/mabi.ilp32f \
 march.rv32imafc/mabi.ilp32f=march.rv32gc/mabi.ilp32f \
 march.rv64imafdc/mabi.lp64d=march.rv64gc/mabi.lp64d
+
+# build variants of the 64bit libgccs with mcmodel=medany flag set
+MULTILIB_OPTIONS += mcmodel=medany
+MULTILIB_DIRNAMES += medany
+MULTILIB_REQUIRED += \
+march=rv64imac/mabi=lp64/mcmodel=medany \
+march=rv64imafdc/mabi=lp64d/mcmodel=medany
diff -durN gcc-7.4.0/gcc/config.gcc gcc-7.4.0.patched/gcc/config.gcc
--- gcc-7.4.0/gcc/config.gcc	2018-06-21 02:36:40.653070000 -0700
+++ gcc-7.4.0.patched/gcc/config.gcc	2019-11-02 15:32:31.859001760 -0700
@@ -1458,6 +1458,7 @@
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
 	;;
 x86_64-*-elf*)
+	tmake_file="${tmake_file} i386/t-x86_64-elf"
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
 	;;
 x86_64-*-rtems*)

{'fraction_non_alphanumeric': 0.15202702702702703, 'fraction_numerical': 0.11397058823529412, 'mean_word_length': 4.328215987294865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3671342', 'n_tokens_mistral': 5608, 'n_tokens_neox': 4756, 'n_words': 562}