Skip to content

Commit 1276f01

Browse files
authored
[mono] Cleanup unused code and remove sparc and mips architectures (#67503)
* Remove linux_magic.h * Remove dead files * Remove remap_keys() in assembly.c It is no longer needed. * Remove mono_dump_jit_offsets/mono_dump_metadata_offsets It was actually producing incorrect code, see mono/mono#13689 This wasn't noticed because we're generating the offsets file via offsets-tool.py and that uses the correct target.platform_define which is passed to the script. The code in metadata-cross-helpers.c was only used as a verification helper but I don't think it has enough value to keep. * Remove leftover code from Mono.Simd * Remove leftover code from Mono.Tasklets * Remove unused functions in mono-proclib.c * Remove sparc and mips architecture * Disable the Vector4 SIMD fix, it causes an issue See #67762
1 parent c1f6785 commit 1276f01

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+54
-20728
lines changed

src/mono/CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -857,10 +857,6 @@ if(HOST_IOS OR HOST_ANDROID OR HOST_MACCAT)
857857
else()
858858
set(DISABLE_DLLMAP 1)
859859
endif()
860-
if (TARGET_BROWSER)
861-
# sys/errno.h exists, but just emits a warning and includes errno.h
862-
unset(HAVE_SYS_ERRNO_H)
863-
endif()
864860
### End of OS specific checks
865861

866862
include_directories("${CLR_SRC_NATIVE_DIR}")

src/mono/cmake/config.h.in

-24
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,6 @@
536536
/* Have mktemp */
537537
#cmakedefine HAVE_MKTEMP 1
538538

539-
/* Define to 1 if you have the <sys/errno.h> header file. */
540-
#cmakedefine HAVE_SYS_ERRNO_H 1
541-
542539
/* Define to 1 if you have the <sys/sendfile.h> header file. */
543540
#cmakedefine HAVE_SYS_SENDFILE_H 1
544541

@@ -631,9 +628,6 @@
631628
/* Define to 1 if `st_atimespec' is a member of `struct stat'. */
632629
#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC 1
633630

634-
/* Define to 1 if `kp_proc' is a member of `struct kinfo_proc'. */
635-
#cmakedefine HAVE_STRUCT_KINFO_PROC_KP_PROC 1
636-
637631
/* Define to 1 if you have the <sys/time.h> header file. */
638632
#cmakedefine HAVE_SYS_TIME_H 1
639633

@@ -733,15 +727,6 @@
733727
/* ... */
734728
#cmakedefine TARGET_S390X 1
735729

736-
/* ... */
737-
#cmakedefine TARGET_MIPS 1
738-
739-
/* ... */
740-
#cmakedefine TARGET_SPARC 1
741-
742-
/* ... */
743-
#cmakedefine TARGET_SPARC64 1
744-
745730
/* ... */
746731
#cmakedefine HOST_WASM 1
747732

@@ -772,15 +757,6 @@
772757
/* ... */
773758
#cmakedefine HOST_S390X 1
774759

775-
/* ... */
776-
#cmakedefine HOST_MIPS 1
777-
778-
/* ... */
779-
#cmakedefine HOST_SPARC 1
780-
781-
/* ... */
782-
#cmakedefine HOST_SPARC64 1
783-
784760
/* Host is RISC-V */
785761
#cmakedefine HOST_RISCV 1
786762

src/mono/cmake/configure.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ac_check_headers (
6969
sys/prctl.h sys/socket.h sys/utsname.h sys/select.h sys/poll.h sys/wait.h sys/resource.h
7070
sys/ioctl.h sys/errno.h sys/sendfile.h sys/statvfs.h sys/statfs.h sys/mman.h sys/mount.h sys/time.h sys/random.h
7171
strings.h stdint.h unistd.h signal.h setjmp.h syslog.h netdb.h utime.h semaphore.h alloca.h ucontext.h pwd.h elf.h
72-
gnu/lib-names.h netinet/tcp.h netinet/in.h link.h arpa/inet.h unwind.h poll.h wchar.h linux/magic.h
72+
gnu/lib-names.h netinet/tcp.h netinet/in.h link.h arpa/inet.h unwind.h poll.h wchar.h
7373
android/legacy_signal_inlines.h execinfo.h pthread.h pthread_np.h net/if.h dirent.h
7474
CommonCrypto/CommonDigest.h dlfcn.h getopt.h pwd.h alloca.h
7575
/usr/include/malloc.h)
@@ -85,8 +85,8 @@ ac_check_funcs (
8585
gethrtime read_real_time gethostbyname gethostbyname2 getnameinfo getifaddrs
8686
access inet_ntop Qp2getifaddrs getpid mktemp)
8787

88-
if (HOST_LINUX)
89-
# sysctl is deprecated on Linux
88+
if (HOST_LINUX OR HOST_BROWSER)
89+
# sysctl is deprecated on Linux and doesn't work on Browser
9090
set(HAVE_SYS_SYSCTL_H 0)
9191
else ()
9292
check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYS_SYSCTL_H)
@@ -112,6 +112,7 @@ check_symbol_exists(madvise "sys/mman.h" HAVE_MADVISE)
112112
check_symbol_exists(pthread_mutexattr_setprotocol "pthread.h" HAVE_DECL_PTHREAD_MUTEXATTR_SETPROTOCOL)
113113
check_symbol_exists(CLOCK_MONOTONIC "time.h" HAVE_CLOCK_MONOTONIC)
114114
check_symbol_exists(CLOCK_MONOTONIC_COARSE "time.h" HAVE_CLOCK_MONOTONIC_COARSE)
115+
115116
check_symbol_exists(sys_signame "signal.h" HAVE_SYSSIGNAME)
116117
check_symbol_exists(pthread_jit_write_protect_np "pthread.h" HAVE_PTHREAD_JIT_WRITE_PROTECT_NP)
117118
check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL)
@@ -123,7 +124,6 @@ ac_check_type("struct ip_mreqn" ip_mreqn "netinet/in.h")
123124
ac_check_type("struct ip_mreq" ip_mreq "netinet/in.h")
124125
ac_check_type("clockid_t" clockid_t "sys/types.h")
125126

126-
check_struct_has_member("struct kinfo_proc" kp_proc "sys/types.h;sys/param.h;sys/sysctl.h;sys/proc.h" HAVE_STRUCT_KINFO_PROC_KP_PROC)
127127
check_struct_has_member("struct sockaddr_in" sin_len "netinet/in.h" HAVE_SOCKADDR_IN_SIN_LEN)
128128
check_struct_has_member("struct sockaddr_in6" sin6_len "netinet/in.h" HAVE_SOCKADDR_IN6_SIN_LEN)
129129
check_struct_has_member("struct stat" st_atim "sys/types.h;sys/stat.h;unistd.h" HAVE_STRUCT_STAT_ST_ATIM)

src/mono/mono/arch/mips/.gitignore

-4
This file was deleted.

0 commit comments

Comments
 (0)