Ports: Update gcc patch to match the toolchain

This commit is contained in:
Gunnar Beutner 2021-07-06 12:52:22 +02:00 committed by Gunnar Beutner
parent d86275d271
commit 148679d1b5
2 changed files with 2 additions and 8 deletions

View file

@ -13,12 +13,6 @@ post_fetch() {
run contrib/download_prerequisites
}
pre_configure() {
patch_internal
run sed -i.bak 's@-fno-exceptions @@' gcc/config/serenity.h
run rm -f gcc/config/serenity.h.bak
}
build() {
run make $makeopts
run find "./host-${SERENITY_ARCH}-pc-serenity/gcc/" -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo

View file

@ -129,10 +129,10 @@ diff -Naur gcc-11.1.0-RC-20210420/gcc/config/serenity.h gcc-11.1.0-RC-20210420.s
+#define LINK_SPEC "%{shared:-shared} %{static:-static} %{!static: %{rdynamic:-export-dynamic} %{!fbuilding-libgcc:%{!nodefaultlibs:-lgcc_s} -dynamic-linker /usr/lib/Loader.so}}"
+
+#undef CC1_SPEC
+#define CC1_SPEC "-fno-exceptions -ftls-model=initial-exec %{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}} -fno-semantic-interposition"
+#define CC1_SPEC "-ftls-model=initial-exec %{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}} -fno-semantic-interposition"
+
+#undef CC1PLUS_SPEC
+#define CC1PLUS_SPEC "-fno-exceptions -ftls-model=initial-exec"
+#define CC1PLUS_SPEC "-ftls-model=initial-exec"
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"