71dcbe0a86
- add gcc12-riscv-inline-atomics.patch, gcc12-riscv-pthread.patch: handle subword size inline atomics (needed by several openSUSE packages) OBS-URL: https://build.opensuse.org/request/show/1006095 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc12?expand=0&rev=66
22 lines
875 B
Diff
22 lines
875 B
Diff
Index: gcc-12.0.1+git192423/gcc/config/riscv/linux.h
|
|
===================================================================
|
|
--- gcc-12.0.1+git192423.orig/gcc/config/riscv/linux.h
|
|
+++ gcc-12.0.1+git192423/gcc/config/riscv/linux.h
|
|
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
|
|
#undef MUSL_DYNAMIC_LINKER
|
|
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
|
|
|
|
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
|
- others do not. So link libatomic by default, as needed. */
|
|
-#undef LIB_SPEC
|
|
-#ifdef LD_AS_NEEDED_OPTION
|
|
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
|
|
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
|
|
-#else
|
|
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
|
|
-#endif
|
|
-
|
|
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
|
|
|
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|