diff options
author | Andrew Whatson | 2020-05-05 23:06:56 +1000 |
---|---|---|
committer | Andrew Whatson | 2020-05-05 23:07:22 +1000 |
commit | cfd66e2fba04c3c7bb696f57e19a9c62e294a4ba (patch) | |
tree | 958baf266e8f0323e50168e294c9ab65dfa6b623 | |
parent | 13b8e455a4ef8226de21119c2ca3a2249f06e7be (diff) | |
download | aur-cfd66e2fba04c3c7bb696f57e19a9c62e294a4ba.tar.gz |
Minor fixes and cleanup of compiler flags
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 47 |
2 files changed, 24 insertions, 26 deletions
@@ -1,6 +1,6 @@ pkgbase = emacs-native-comp-git pkgdesc = GNU Emacs. Development native-comp branch. - pkgver = 28.0.50.141681 + pkgver = 28.0.50.141945 pkgrel = 1 url = http://www.gnu.org/software/emacs/ arch = x86_64 @@ -30,7 +30,6 @@ pkgbase = emacs-native-comp-git replaces = emacs27-git replaces = emacs-git replaces = emacs-seq - options = !strip source = emacs-git::git://git.savannah.gnu.org/emacs.git#branch=feature/native-comp md5sums = SKIP @@ -68,11 +68,12 @@ MAGICK= # ImageMagick 7 support. Deprecated (read the logs). NOGZ="YES" # Don't compress .el files. FAST_BOOT= # Only native-compile the bare minimum. Intended for use with # deferred compilation to native-compile on-demand at runtime. +PROFILING= # Enable gprof profiling support. ################################################################################ ################################################################################ pkgname="emacs-native-comp-git" -pkgver=28.0.50.141681 +pkgver=28.0.50.141945 pkgrel=1 pkgdesc="GNU Emacs. Development native-comp branch." arch=('x86_64' ) @@ -87,18 +88,21 @@ source=("emacs-git::git://git.savannah.gnu.org/emacs.git#branch=feature/native-c # If Savannah access is blocked for reasons, use Github instead. # Edit the config file of your local repo copy as well. #source=("emacs-git::git://github.com/emacs-mirror/emacs.git") -options=(!strip) md5sums=('SKIP') ################################################################################ ################################################################################ -if [[ $LTO == "YES" ]] && [[ $CLANG != "YES" ]]; then - CFLAGS+=" -g -flto -fuse-linker-plugin" - CXXFLAGS+=" -g -flto -fuse-linker-plugin" -else - CFLAGS+=" -g -flto" - CXXFLAGS+=" -g -flto" +CFLAGS+=" -g" +CXXFLAGS+=" -g" + +if [[ $LTO == "YES" ]]; then + CFLAGS+=" -flto" + CXXFLAGS+=" -flto" + if [[ $CLANG != "YES" ]]; then + CFLAGS+=" -fuse-linker-plugin" + CXXFLAGS+=" -fuse-linker-plugin" + fi fi if [[ $CLANG == "YES" ]]; then @@ -111,6 +115,10 @@ if [[ $CLANG == "YES" ]]; then export CCFLAGS+=' -fuse-ld=lld' ; export CXXFLAGS+=' -fuse-ld=lld' ; makedepends+=( 'clang' 'lld' 'llvm') ; +else + export LD="/usr/bin/ld.gold" + export CFLAGS+=" -fuse-ld=gold" + export CXXFLAGS+=" -fuse-ld=gold" fi if [[ $NOTKIT == "YES" ]]; then @@ -210,15 +218,15 @@ build() { ################################################################################ if [[ $CLANG == "YES" ]]; then - _conf+=( - '--enable-autodepend' - ); + _conf+=( '--enable-autodepend' ); fi if [[ $LTO == "YES" ]]; then - _conf+=( - '--enable-link-time-optimization' - ); + _conf+=( '--enable-link-time-optimization' ); +fi + +if [[ $PROFILING == "YES" ]]; then + _conf+=( '--enable-profiling' ); fi if [[ $CLI == "YES" ]]; then @@ -239,8 +247,6 @@ fi if [[ $MAGICK == "YES" ]]; then _conf+=( '--with-imagemagick'); -else - _conf+=(); fi if [[ $CAIRO == "YES" ]]; then @@ -254,17 +260,10 @@ fi if [[ $NOGZ == "YES" ]]; then _conf+=( '--without-compress-install' ); fi -################################################################################ ################################################################################ - # Use gold with gcc, unconditionally. - # - if [[ ! $CLANG == "YES" ]]; then - export LD=/usr/bin/ld.gold - export CFLAGS+=" -s -fuse-ld=gold"; - export CXXFLAGS+=" -s -fuse-ld=gold"; - fi +################################################################################ ./configure "${_conf[@]}" |