diff options
author | Peter Jung | 2022-09-11 17:46:25 +0200 |
---|---|---|
committer | Peter Jung | 2022-09-11 17:46:25 +0200 |
commit | e475599c2f1b1dcc2531927201a0c7e95df949f2 (patch) | |
tree | b947953c6fef1405b2b429747df918226cb3ece7 | |
parent | a0a8956bb86891737bca4760c6b969da1a546a41 (diff) | |
download | aur-e475599c2f1b1dcc2531927201a0c7e95df949f2.tar.gz |
update with some fixes
Signed-off-by: Peter Jung <admin@ptr1337.dev>
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | ZZ-lto.sh.in | 34 | ||||
-rw-r--r-- | bolt.sh.in | 2 | ||||
-rwxr-xr-x | buildcache-bin.sh | 13 | ||||
-rw-r--r-- | gcc11-support-mold.patch | 208 | ||||
-rw-r--r-- | mold.sh.in | 2 |
7 files changed, 8 insertions, 263 deletions
@@ -1,6 +1,6 @@ pkgbase = makepkg-optimize-mold pkgdesc = Supplemental build and packaging optimizations for makepkg - pkgver = 29 + pkgver = 30 pkgrel = 1 url = https://wiki.archlinux.org/index.php/Makepkg-optimize arch = any @@ -46,8 +46,8 @@ pkgbase = makepkg-optimize-mold sha1sums = 1acc26a5a5737804f5aa6cca9d4bbce733e0f429 sha1sums = 7556b8a8faff5b943efa5058ce9d8e325c4d35a6 sha1sums = d4e8f5ec1c30ebd69cce5121ea7823e1b42c3d27 - sha1sums = afa85fbda1e4d21afb1980f9b8b70e6eaa5ee625 - sha1sums = 5d381e921bc99c611a73c061139b30eb8a25c2e6 + sha1sums = c843989be6b9eca5a4a632a89165789f507cbd51 + sha1sums = 70a051f37515bb9be5ac22a1946c259c80da4c96 sha1sums = 2374539e56aeed165cc15e790e17fe841fa0970d sha1sums = ab510f1789a9bcd1352706f13f6a0bb662d25831 sha1sums = 28b5ce40ba54198e715d79d97adaa54b67c2c7e5 @@ -3,7 +3,7 @@ # Contributor: bartus ( aur\at\bartus.33mail.com ) pkgname=makepkg-optimize-mold -pkgver=29 +pkgver=30 pkgrel=1 pkgdesc='Supplemental build and packaging optimizations for makepkg' arch=('any') @@ -32,8 +32,8 @@ ${_conf[@]}) sha1sums=('1acc26a5a5737804f5aa6cca9d4bbce733e0f429' '7556b8a8faff5b943efa5058ce9d8e325c4d35a6' 'd4e8f5ec1c30ebd69cce5121ea7823e1b42c3d27' - 'afa85fbda1e4d21afb1980f9b8b70e6eaa5ee625' - '5d381e921bc99c611a73c061139b30eb8a25c2e6' + 'c843989be6b9eca5a4a632a89165789f507cbd51' + '70a051f37515bb9be5ac22a1946c259c80da4c96' '2374539e56aeed165cc15e790e17fe841fa0970d' 'ab510f1789a9bcd1352706f13f6a0bb662d25831' '28b5ce40ba54198e715d79d97adaa54b67c2c7e5' diff --git a/ZZ-lto.sh.in b/ZZ-lto.sh.in deleted file mode 100644 index 58452c6419de..000000000000 --- a/ZZ-lto.sh.in +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/bash -# -# ZZ-lto.sh - Compile with link-time optimization -# - -[[ -n "$LIBMAKEPKG_BUILDENV_LTO_SH" ]] && return -LIBMAKEPKG_BUILDENV_LTO_SH=1 - -LIBRARY=${LIBRARY:-'@libmakepkgdir@'} - -source "$LIBRARY/util/option.sh" - -build_options+=('lto' 'lto-thin' 'lto-clang' 'lto-thin-clang') -buildenv_functions+=('buildenv_lto') - -buildenv_lto() { - if check_buildoption "lto" "y" || check_buildoption "lto-thin" "y" || \ - check_buildoption "lto-clang" "y" || check_buildoption "lto-thin-clang" "y"; then - ltoflags=" -flto" - check_buildoption "lto-thin-clang" "y" && ltoflags+="=thin" - check_buildoption "lto-thin" "y" || check_buildoption "lto" "y" && \ - [[ -f "$(gcc -print-search-dirs | grep install | awk '{print $2 "liblto_plugin.so"}')" ]] && \ - ltoflags+="=auto -fno-fat-lto-objects" - check_buildoption "lto" "y" && ltoflags+=" -flto-partition=none" - - CFLAGS+="$ltoflags" - CXXFLAGS+="$ltoflags" - LDFLAGS+=" -fuse-linker-plugin $CFLAGS $CXXFLAGS" - ltoplugin="$(gcc -print-search-dirs | grep install | awk '{print $2 "liblto_plugin.so"}')" - ARFLAGS+=" --plugin $ltoplugin" - RANLIBFLAGS+=" --plugin $ltoplugin" - NMFLAGS+=" --plugin $ltoplugin" - fi -} diff --git a/bolt.sh.in b/bolt.sh.in index 995cf566ab03..9adbf1fd114a 100644 --- a/bolt.sh.in +++ b/bolt.sh.in @@ -16,7 +16,7 @@ buildenv_functions+=('buildenv_bolt') buildenv_bolt() { if check_buildoption "bolt" "y"; then - export PATH="~/.toolchain/llvm/bin:$PATH" + export PATH="$HOME/.toolchain/llvm/bin:$PATH" export CC=clang export CXX=clang++ export CC_LD=lld diff --git a/buildcache-bin.sh b/buildcache-bin.sh deleted file mode 100755 index 051d508496df..000000000000 --- a/buildcache-bin.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -sudo mkdir -p /usr/lib/buildcache/bin -cd /usr/lib/buildcache/bin -sudo ln -s /usr/bin/buildcache x86_64-pc-linux-gnu-g++ -sudo ln -s /usr/bin/buildcache x86_64-pc-linux-gnu-c++ -sudo ln -s /usr/bin/buildcache x86_64-pc-linux-gnu-gcc -sudo ln -s /usr/bin/buildcache x86_64-pc-linux-gnu-c -sudo ln -s /usr/bin/buildcache cc -sudo ln -s /usr/bin/buildcache c++ -sudo ln -s /usr/bin/buildcache clang++ -sudo ln -s /usr/bin/buildcache clang -sudo ln -s /usr/bin/buildcache g++ -sudo ln -s /usr/bin/buildcache gcc diff --git a/gcc11-support-mold.patch b/gcc11-support-mold.patch deleted file mode 100644 index edfbc83abb4b..000000000000 --- a/gcc11-support-mold.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 42a673211621b28d968d3556076a8881278ec5f1 Mon Sep 17 00:00:00 2001 -From: "P. Jung" <ptr1337@cachyos.org> -Date: Fri, 21 Jan 2022 16:40:01 +0000 -Subject: [PATCH] mold-gcc11 - ---- - gcc/collect2.c | 10 +++++++--- - gcc/common.opt | 4 ++++ - gcc/configure | 18 ++++++++++++++++++ - gcc/configure.ac | 16 ++++++++++++++++ - gcc/doc/invoke.texi | 4 ++++ - gcc/gcc.c | 4 ++++ - gcc/opts.c | 1 + - 7 files changed, 54 insertions(+), 3 deletions(-) - -diff --git a/gcc/collect2.c b/gcc/collect2.c -index 0c8af29879d..f0e1bcfaeb4 100644 ---- a/gcc/collect2.c -+++ b/gcc/collect2.c -@@ -785,6 +785,7 @@ main (int argc, char **argv) - USE_GOLD_LD, - USE_BFD_LD, - USE_LLD_LD, -+ USE_MOLD_LD, - USE_LD_MAX - } selected_linker = USE_DEFAULT_LD; - static const char *const ld_suffixes[USE_LD_MAX] = -@@ -793,7 +794,8 @@ main (int argc, char **argv) - PLUGIN_LD_SUFFIX, - "ld.gold", - "ld.bfd", -- "ld.lld" -+ "ld.lld", -+ "ld.mold" - }; - static const char *const real_ld_suffix = "real-ld"; - static const char *const collect_ld_suffix = "collect-ld"; -@@ -970,6 +972,8 @@ main (int argc, char **argv) - selected_linker = USE_GOLD_LD; - else if (strcmp (argv[i], "-fuse-ld=lld") == 0) - selected_linker = USE_LLD_LD; -+ else if (strcmp (argv[i], "-fuse-ld=mold") == 0) -+ selected_linker = USE_MOLD_LD; - else if (strncmp (argv[i], "-o", 2) == 0) - { - /* Parse the output filename if it's given so that we can make -@@ -1082,7 +1086,7 @@ main (int argc, char **argv) - ld_file_name = 0; - #ifdef DEFAULT_LINKER - if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD || -- selected_linker == USE_LLD_LD) -+ selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD) - { - char *linker_name; - # ifdef HOST_EXECUTABLE_SUFFIX -@@ -1317,7 +1321,7 @@ main (int argc, char **argv) - else if (!use_collect_ld - && strncmp (arg, "-fuse-ld=", 9) == 0) - { -- /* Do not pass -fuse-ld={bfd|gold|lld} to the linker. */ -+ /* Do not pass -fuse-ld={bfd|gold|lld|mold} to the linker. */ - ld1--; - ld2--; - } -diff --git a/gcc/common.opt b/gcc/common.opt -index a75b44ee47e..c24e135e2ee 100644 ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -2967,6 +2967,10 @@ fuse-ld=lld - Common Driver Negative(fuse-ld=lld) - Use the lld LLVM linker instead of the default linker. - -+fuse-ld=mold -+Common Driver Negative(fuse-ld=mold) -+Use the Modern linker (MOLD) linker instead of the default linker. -+ - fuse-linker-plugin - Common Undocumented Var(flag_use_linker_plugin) - -diff --git a/gcc/configure b/gcc/configure -index 708328e1670..5982dc3ddd3 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -23017,6 +23017,20 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_gold" >&5 - $as_echo "$ld_is_gold" >&6; } - -+# Check to see if we are using mold instead of ld -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using mold" >&5 -+$as_echo_n "checking whether we are using mold... " >&6; } -+ld_is_mold=no -+if test x$gcc_cv_ld != x; then -+ if $gcc_cv_ld --version 2>/dev/null | sed 1q \ -+ | grep "mold" > /dev/null; then -+ ld_is_mold=yes -+ fi -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_is_mold" >&5 -+$as_echo "$ld_is_mold" >&6; } -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking gold linker with split stack support as non default" >&5 - $as_echo_n "checking gold linker with split stack support as non default... " >&6; } - # Check to see if default ld is not gold, but gold is -@@ -23868,6 +23882,8 @@ else - gcc_cv_ld_hidden=yes - if test x"$ld_is_gold" = xyes; then - : -+ elif test x"$ld_is_mold" = xyes; then -+ : - elif echo "$ld_ver" | grep GNU > /dev/null; then - if test 0"$ld_date" -lt 20020404; then - if test -n "$ld_date"; then -@@ -24980,6 +24996,8 @@ $as_echo "$gcc_cv_as_comdat_group_group" >&6; } - fi - if test x"$ld_is_gold" = xyes; then - comdat_group=yes -+elif test x"$ld_is_mold" = xyes; then -+ comdat_group=yes - elif test $in_tree_ld = yes ; then - comdat_group=no - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -diff --git a/gcc/configure.ac b/gcc/configure.ac -index df1c9cc3200..3146d90d4e3 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -2645,6 +2645,18 @@ if test x$gcc_cv_ld != x; then - fi - AC_MSG_RESULT($ld_is_gold) - -+# Check to see if we are using mold instead of ld -+AC_MSG_CHECKING(whether we are using mold) -+ld_is_mold=no -+if test x$gcc_cv_ld != x; then -+ if $gcc_cv_ld --version 2>/dev/null | sed 1q \ -+ | grep "mold" > /dev/null; then -+ ld_is_mold=yes -+ fi -+fi -+AC_MSG_RESULT($ld_is_mold) -+ -+ - AC_MSG_CHECKING(gold linker with split stack support as non default) - # Check to see if default ld is not gold, but gold is - # available and has support for split stack. If gcc was configured -@@ -3030,6 +3042,8 @@ else - gcc_cv_ld_hidden=yes - if test x"$ld_is_gold" = xyes; then - : -+ elif test x"$ld_is_mold" = xyes; then -+ : - elif echo "$ld_ver" | grep GNU > /dev/null; then - if test 0"$ld_date" -lt 20020404; then - if test -n "$ld_date"; then -@@ -3503,6 +3517,8 @@ else - fi - if test x"$ld_is_gold" = xyes; then - comdat_group=yes -+elif test x"$ld_is_mold" = xyes; then -+ comdat_group=yes - elif test $in_tree_ld = yes ; then - comdat_group=no - if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 5a4b3c6c234..c5887c589b3 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -15605,6 +15605,10 @@ Use the @command{gold} linker instead of the default linker. - @opindex fuse-ld=lld - Use the LLVM @command{lld} linker instead of the default linker. - -+@item -fuse-ld=mold -+@opindex fuse-ld=mold -+Use the Modern Linker (@command{mold}) instead of the default linker. -+ - @cindex Libraries - @item -l@var{library} - @itemx -l @var{library} -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 8ba410c9e17..08fb827340a 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -4189,6 +4189,10 @@ driver_handle_option (struct gcc_options *opts, - use_ld = ".gold"; - break; - -+ case OPT_fuse_ld_mold: -+ use_ld = ".mold"; -+ break; -+ - case OPT_fcompare_debug_second: - compare_debug_second = 1; - break; -diff --git a/gcc/opts.c b/gcc/opts.c -index 24bb64198c8..9192ca75743 100644 ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2875,6 +2875,7 @@ common_handle_option (struct gcc_options *opts, - case OPT_fuse_ld_bfd: - case OPT_fuse_ld_gold: - case OPT_fuse_ld_lld: -+ case OPT_fuse_ld_mold: - case OPT_fuse_linker_plugin: - /* No-op. Used by the driver and passed to us because it starts with f.*/ - break; --- -2.34.1 - diff --git a/mold.sh.in b/mold.sh.in index 3509f40a7538..4ddfeede48d7 100644 --- a/mold.sh.in +++ b/mold.sh.in @@ -16,6 +16,6 @@ buildenv_functions+=('buildenv_mold') buildenv_mold() { if check_buildoption "mold" "y"; then - LDFLAGS+=" -fuse-ld=mold" + LDFLAGS+=",-fuse-ld=mold" fi } |