From 9e8c4bb072f1b6c12096327ef9eb0a12b2bb9457 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Tue, 11 Jan 2022 19:53:44 +0100 Subject: [PATCH] Toolchain: Enable the `-rdynamic` flag in the gcc driver Although we handle it in the linker spec file, gcc will actually reject this argument unless it's also enabled in the option file. CMake adds this flag if the minimum required version is 3.3 or less (see CMP0065), so old projects would fail to compile because of this unrecognized option. --- Toolchain/Patches/gcc.patch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Toolchain/Patches/gcc.patch b/Toolchain/Patches/gcc.patch index bc1b1fa5e4..adc641926a 100644 --- a/Toolchain/Patches/gcc.patch +++ b/Toolchain/Patches/gcc.patch @@ -224,10 +224,10 @@ index 000000000..dc2f5361e + } while(0); diff --git a/gcc/config/serenity.opt b/gcc/config/serenity.opt new file mode 100644 -index 000000000..6ce2af2d7 +index 000000000..2756a5575 --- /dev/null +++ b/gcc/config/serenity.opt -@@ -0,0 +1,32 @@ +@@ -0,0 +1,35 @@ +; SerenityOS options. + +; Copyright (C) 2021 Gunnar Beutner @@ -259,6 +259,9 @@ index 000000000..6ce2af2d7 +pthread +Driver + ++rdynamic ++Driver ++ +; This comment is to ensure we retain the blank line above. diff --git a/gcc/configure b/gcc/configure index 9b28369e3..6821ed4ba 100755