Files
RedBear-OS/recipes/wip/text/neovim/redox.patch
T
vasilito 50b731f1b7 Red Bear OS — microkernel OS in Rust, based on Redox
Derivative of Redox OS (https://www.redox-os.org) adding:
- AMD GPU driver (amdgpu) via LinuxKPI compat layer
- ext4 filesystem support (ext4d scheme daemon)
- ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG)
- Custom branding (hostname, os-release, boot identity)

Build system is full upstream Redox with RBOS overlay in local/.
Patches for kernel, base, and relibc are symlinked from local/patches/
and protected from make clean/distclean. Custom recipes live in
local/recipes/ with symlinks into the recipes/ search path.

Build:  make all CONFIG_NAME=redbear-full
Sync:   ./local/scripts/sync-upstream.sh
2026-04-12 19:05:00 +01:00

156 lines
5.2 KiB
Diff

diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index d103b5f4..37d9444e 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -24,37 +24,6 @@ add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
file(GLOB PACKAGES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*)
-set(GENERATED_PACKAGE_TAGS)
-foreach(PACKAGE ${PACKAGES})
- get_filename_component(PACKNAME ${PACKAGE} NAME)
- file(GLOB "${PACKNAME}_DOC_FILES" CONFIGURE_DEPENDS ${PACKAGE}/doc/*.txt)
- if(${PACKNAME}_DOC_FILES)
- file(MAKE_DIRECTORY ${GENERATED_PACKAGE_DIR}/${PACKNAME})
- add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags"
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME}
- COMMAND $<TARGET_FILE:nvim_bin>
- -u NONE -i NONE -e --headless -c "helptags doc" -c quit
- DEPENDS
- nvim_bin
- nvim_runtime_deps
- WORKING_DIRECTORY "${GENERATED_PACKAGE_DIR}/${PACKNAME}"
- )
-
- set("${PACKNAME}_DOC_NAMES")
- foreach(DF "${${PACKNAME}_DOC_FILES}")
- get_filename_component(F ${DF} NAME)
- list(APPEND "${PACKNAME}_DOC_NAMES" ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/${F})
- endforeach()
-
- install_helper(
- FILES ${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags "${${PACKNAME}_DOC_NAMES}"
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/pack/dist/opt/${PACKNAME}/doc)
-
- list(APPEND GENERATED_PACKAGE_TAGS "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags")
- endif()
-endforeach()
-
set(BUILDDOCFILES)
foreach(DF ${DOCFILES})
get_filename_component(F ${DF} NAME)
@@ -65,8 +34,6 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
COMMAND ${CMAKE_COMMAND} -E remove_directory doc
COMMAND ${CMAKE_COMMAND} -E copy_directory
${PROJECT_SOURCE_DIR}/runtime/doc doc
- COMMAND $<TARGET_FILE:nvim_bin>
- -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit
DEPENDS
nvim_bin
nvim_runtime_deps
@@ -78,7 +45,6 @@ add_custom_target(
DEPENDS
${GENERATED_SYN_VIM}
${GENERATED_HELP_TAGS}
- ${GENERATED_PACKAGE_TAGS}
)
# CMake is painful here. It will create the destination using the user's
@@ -87,10 +53,6 @@ add_custom_target(
# seems like the best compromise. If we create it, then everyone can see it.
# If it's preexisting, leave it alone.
-install_helper(
- FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES}
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc)
-
install_helper(
FILES ${GENERATED_SYN_VIM}
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/syntax/vim)
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 4a8fe4c6..55a9ede1 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -93,19 +93,6 @@ if(NOT MSVC)
endif()
# -fstack-protector breaks Mingw-w64 builds
-if(NOT MINGW)
- check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG)
- if(HAS_FSTACK_PROTECTOR_STRONG_FLAG)
- target_compile_options(main_lib INTERFACE -fstack-protector-strong)
- target_link_libraries(main_lib INTERFACE -fstack-protector-strong)
- else()
- check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG)
- if(HAS_FSTACK_PROTECTOR_FLAG)
- target_compile_options(main_lib INTERFACE -fstack-protector --param ssp-buffer-size=4)
- target_link_libraries(main_lib INTERFACE -fstack-protector --param ssp-buffer-size=4)
- endif()
- endif()
-endif()
# Compiler specific options
if(MSVC)
@@ -145,9 +132,6 @@ endif()
# Platform specific options
if(UNIX)
target_link_libraries(main_lib INTERFACE m)
- if (NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
- target_link_libraries(main_lib INTERFACE util)
- endif()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 5c1e415c..fa6fa859 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -698,6 +698,12 @@ void getout(int exitval)
assert(!ui_client_channel_id);
exiting = true;
+ // parent doesn't notice SIGCHILD
+ pid_t ppid = getppid();
+ if (ppid > 1) {
+ kill(ppid, SIGKILL);
+ }
+
// make sure startuptimes have been flushed
time_finish();
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index db575e00..b42cee2a 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -28,6 +28,8 @@
#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX)
# define NAME_MAX _XOPEN_NAME_MAX
+#elif !defined(NAME_MAX)
+# define NAME_MAX 255
#endif
#define BASENAMELEN (NAME_MAX - 5)
diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c
index 7dff8a1b..ebc61542 100644
--- a/src/nvim/os/shell.c
+++ b/src/nvim/os/shell.c
@@ -880,7 +880,16 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu
MultiQueue *events = multiqueue_new_child(main_loop.events);
proc->events = events;
proc->argv = argv;
+#ifdef __redox__
+ msg_puts("Shell execution is disabled until https://gitlab.redox-os.org/redox-os/redox/-/issues/1762 closed and this workaround removed\n");
+ loop_poll_events(&main_loop, 0);
+ multiqueue_free(events);
+ return -1;
+ int status = -1;
+#else
int status = proc_spawn(proc, has_input, true, true);
+#endif
+
if (status) {
loop_poll_events(&main_loop, 0);
// Failed, probably 'shell' is not executable.