1- From 7ffa4a93ab4c1a5a5dd129dce1d03f784ace2e06 Mon Sep 17 00:00:00 2001
1+ From 8b458716d4a65d2da069678130c32c30395fed89 Mon Sep 17 00:00:00 2001
22From: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
3- Date: Mon, 13 Mar 2023 16:14:34 +1100
3+ Date: Tue, 28 Mar 2023 17:15:29 +1100
44Subject: [PATCH] <xxx>
55
66---
77 .gitignore | 2 ++
8- options/ansi/generic/stdlib-stubs.cpp | 6 ++++--
8+ meson.build | 32 ++++++++++++++++-----------
9+ options/ansi/generic/stdlib-stubs.cpp | 6 +++--
910 options/glibc/generic/execinfo.cpp | 5 +++--
1011 options/rtdl/generic/linker.cpp | 2 +-
11- sysdeps/aero/generic/sockets.cpp | 25 +++++++++++++++++++++++++
12- 5 files changed, 35 insertions(+), 5 deletions(-)
12+ sysdeps/aero/generic/sockets.cpp | 25 +++++++++++++++++++++
13+ 6 files changed, 54 insertions(+), 18 deletions(-)
1314
1415diff --git a/.gitignore b/.gitignore
1516index fdd60a0..9f811f4 100644
@@ -21,6 +22,49 @@ index fdd60a0..9f811f4 100644
2122 .vscode
2223+ # clangd cache files:
2324+ .cache
25+ diff --git a/meson.build b/meson.build
26+ index 2261926..92b936d 100644
27+ --- a/meson.build
28+ +++ b/meson.build
29+ @@ -315,19 +315,25 @@ subdir('options/bsd')
30+ rtlib_deps = []
31+
32+ if not headers_only
33+ - libgcc = meson.get_compiler('c').find_library('gcc', required: false)
34+ -
35+ - compiler_rt_name = 'libclang_rt.builtins-' + host_machine.cpu_family()
36+ - compiler_rt = meson.get_compiler('c').find_library(compiler_rt_name, required: false)
37+ -
38+ - if libgcc.found()
39+ - rtlib_deps += libgcc
40+ - elif compiler_rt.found()
41+ - rtlib_deps += compiler_rt
42+ - else
43+ - error('neither libgcc nor ' + compiler_rt_name + ' was found')
44+ - endif
45+ -
46+ + # XXX: for Aero and Lyre, we force link mlibc against prebuilt
47+ + # libgcc-binaries; the alternative is to build GCC twice (which
48+ + # is a tedious task).
49+ + #
50+ + # TODO: maybe upstream this by having a libgcc path option.
51+ +
52+ + # libgcc = meson.get_compiler('c').find_library('gcc', required: false)
53+ + #
54+ + # compiler_rt_name = 'libclang_rt.builtins-' + host_machine.cpu_family()
55+ + # compiler_rt = meson.get_compiler('c').find_library(compiler_rt_name, required: false)
56+ + #
57+ + # if libgcc.found()
58+ + # rtlib_deps += libgcc
59+ + # elif compiler_rt.found()
60+ + # rtlib_deps += compiler_rt
61+ + # else
62+ + # error('neither libgcc nor ' + compiler_rt_name + ' was found')
63+ + # endif
64+ +
65+ ld_cpp_args = [
66+ '-fvisibility=hidden',
67+ '-fno-stack-protector',
2468diff --git a/options/ansi/generic/stdlib-stubs.cpp b/options/ansi/generic/stdlib-stubs.cpp
2569index c0e54fe..ddeec8a 100644
2670--- a/options/ansi/generic/stdlib-stubs.cpp
0 commit comments