1- From 7ffa4a93ab4c1a5a5dd129dce1d03f784ace2e06 Mon Sep 17 00:00:00 2001
1+ From 40764fb1dfc0a1a0dc77f0a6b91937fc95032fd6 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: Mon, 27 Mar 2023 20:43:27 +1100
44Subject: [PATCH] <xxx>
55
66---
77 .gitignore | 2 ++
8- options/ansi/generic/stdlib-stubs.cpp | 6 ++++--
9- options/glibc/generic/execinfo.cpp | 5 +++--
8+ meson.build | 42 +++++++++++++++------------
9+ options/ansi/generic/stdlib-stubs.cpp | 6 ++--
10+ 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, 59 insertions(+), 23 deletions(-)
1314
1415diff --git a/.gitignore b/.gitignore
1516index fdd60a0..9f811f4 100644
@@ -21,6 +22,59 @@ index fdd60a0..9f811f4 100644
2122 .vscode
2223+ # clangd cache files:
2324+ .cache
25+ diff --git a/meson.build b/meson.build
26+ index 2261926..3ddf806 100644
27+ --- a/meson.build
28+ +++ b/meson.build
29+ @@ -315,24 +315,30 @@ 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+ - ld_cpp_args = [
47+ - '-fvisibility=hidden',
48+ - '-fno-stack-protector',
49+ - '-DMLIBC_BUILDING_RTDL'
50+ - ]
51+ + # XXX: for Aero and Lyre, we force link mlibc against prebuilt
52+ + # libgcc-binaries; the alternative is to build GCC twice (which
53+ + # is a tedious task).
54+ + #
55+ + # TODO: maybe upstream this by having a libgcc path option.
56+ +
57+ + # libgcc = meson.get_compiler('c').find_library('gcc', required: false)
58+ + #
59+ + # compiler_rt_name = 'libclang_rt.builtins-' + host_machine.cpu_family()
60+ + # compiler_rt = meson.get_compiler('c').find_library(compiler_rt_name, required: false)
61+ + #
62+ + # if libgcc.found()
63+ + # rtlib_deps += libgcc
64+ + # elif compiler_rt.found()
65+ + # rtlib_deps += compiler_rt
66+ + # else
67+ + # error('neither libgcc nor ' + compiler_rt_name + ' was found')
68+ + # endif
69+ + #
70+ + # ld_cpp_args = [
71+ + # '-fvisibility=hidden',
72+ + # '-fno-stack-protector',
73+ + # '-DMLIBC_BUILDING_RTDL'
74+ + # ]
75+
76+ libc_all_sources = [
77+ libc_sources,
2478diff --git a/options/ansi/generic/stdlib-stubs.cpp b/options/ansi/generic/stdlib-stubs.cpp
2579index c0e54fe..ddeec8a 100644
2680--- a/options/ansi/generic/stdlib-stubs.cpp
0 commit comments