diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-09-06 12:12:48 +0200 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-09-16 16:09:19 +0000 |
commit | 77f124c87aceb52c6dae8ddab16669b67c7847e1 (patch) | |
tree | 8685e8278a5549f307e150e9bd98f3b0152aa989 /Toolchain/Patches | |
parent | a4f5a5d783e7b0282d2905be1cb50620f711ae66 (diff) | |
download | serenity-77f124c87aceb52c6dae8ddab16669b67c7847e1.zip |
Toolchain: Remove references to `-lm`
Diffstat (limited to 'Toolchain/Patches')
-rw-r--r-- | Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch | 8 | ||||
-rw-r--r-- | Toolchain/Patches/llvm/0003-Driver-Add-support-for-SerenityOS.patch | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch b/Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch index 0025e7d326..073338ff0a 100644 --- a/Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch +++ b/Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch @@ -21,7 +21,7 @@ Co-Authored-By: Shannon Booth <shannon.ml.booth@gmail.com> --- gcc/config.gcc | 20 ++++++++++++++++ gcc/config/i386/serenity.h | 7 ++++++ - gcc/config/serenity.h | 47 ++++++++++++++++++++++++++++++++++++++ + gcc/config/serenity.h | 51 ++++++++++++++++++++++++++++++++++++++ gcc/config/serenity.opt | 35 ++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 gcc/config/i386/serenity.h @@ -84,7 +84,7 @@ new file mode 100644 index 000000000..dc2f5361e --- /dev/null +++ b/gcc/config/serenity.h -@@ -0,0 +1,47 @@ +@@ -0,0 +1,51 @@ +/* Useful if you wish to make target-specific GCC changes. */ +#undef TARGET_SERENITY +#define TARGET_SERENITY 1 @@ -122,6 +122,10 @@ index 000000000..dc2f5361e +/* Use --as-needed -lgcc_s for eh support. */ +#define USE_LD_AS_NEEDED 1 + ++/* We don't have a separate math library, it's included within libc. While we do have compatibility ++ linker scripts in place, just don't add it to the linker invocation to begin with. */ ++#define MATH_LIBRARY "" ++ +/* Additional predefined macros. */ +#undef TARGET_OS_CPP_BUILTINS +#define TARGET_OS_CPP_BUILTINS() \ diff --git a/Toolchain/Patches/llvm/0003-Driver-Add-support-for-SerenityOS.patch b/Toolchain/Patches/llvm/0003-Driver-Add-support-for-SerenityOS.patch index 3f928dbe24..90d254f249 100644 --- a/Toolchain/Patches/llvm/0003-Driver-Add-support-for-SerenityOS.patch +++ b/Toolchain/Patches/llvm/0003-Driver-Add-support-for-SerenityOS.patch @@ -144,7 +144,7 @@ new file mode 100644 index 000000000..6fc664a05 --- /dev/null +++ b/clang/lib/Driver/ToolChains/Serenity.cpp -@@ -0,0 +1,337 @@ +@@ -0,0 +1,336 @@ +//===---- Serenity.cpp - SerenityOS ToolChain Implementation ----*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -301,7 +301,6 @@ index 000000000..6fc664a05 + TC.AddCXXStdlibLibArgs(Args, CmdArgs); + if (OnlyLibstdcxxStatic) + CmdArgs.push_back("-Bdynamic"); -+ CmdArgs.push_back("-lm"); + CmdArgs.push_back("--pop-state"); + } + |