diff --git a/Ports/gcc/package.sh b/Ports/gcc/package.sh index 1ce319112c..9a99fd864a 100755 --- a/Ports/gcc/package.sh +++ b/Ports/gcc/package.sh @@ -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 diff --git a/Ports/gcc/patches/gcc.patch b/Ports/gcc/patches/gcc.patch index d6eef6e996..89f1fa125f 100644 --- a/Ports/gcc/patches/gcc.patch +++ b/Ports/gcc/patches/gcc.patch @@ -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}"