Browse Source

Build with debug information

main
Kien Nguyen 3 months ago
parent
commit
a5ef02e9e4
  1. 2
      .github/workflows/build.yml
  2. 10
      emacs-build.sh
  3. 30
      patches/emacs/0001-Stop-using-legacy-ffat-lto-objects-option-in-LTO-bui.patch

2
.github/workflows/build.yml

@ -55,7 +55,7 @@ jobs:
- os: windows-2022
shell: powershell
msystem: UCRT64
build_options: --variant mps --with-rsvg --with-mps --no-strip
build_options: --variant mps --with-rsvg --with-mps --no-strip --enable-build-details
- os: ubuntu-22.04
shell: bash
build_options: --with-rsvg --with-mps --without-xwidgets

10
emacs-build.sh

@ -144,7 +144,7 @@ function emacs_dependencies ()
function emacs_configure_build_dir ()
{
cd "$emacs_build_dir"
options="--disable-build-details --without-dbus"
options="$emacs_build_options"
if test "$emacs_compress_files" = "no"; then
options="$options --without-compress-install"
else
@ -163,11 +163,11 @@ function emacs_configure_build_dir ()
# fi
# done
for f in $features; do
options="--with-$f $options"
options="$options --with-$f"
done
for f in $inactive_features; do
options="--without-$f $options"
options="$options --without-$f"
done
echo Configuring Emacs with options
@ -465,6 +465,7 @@ emacs_compress_files=no
emacs_build_version=0.4
emacs_slim_build=no
emacs_build_threads=$((`nproc`*2))
emacs_build_options="--disable-build-details --without-dbus --enable-link-time-optimization"
emacs_apply_patches=yes
emacs_pkg_msix=no
# This is needed for pacman to return the right text
@ -483,7 +484,7 @@ emacs_pkg_var=""
# -fassociative-math -fno-signed-zeros -frename-registers -funroll-loops \
# -fomit-frame-pointer \
# -fallow-store-data-races -fno-semantic-interposition -floop-parallelize-all -ftree-parallelize-loops=4"
CFLAGS="-O2 -fno-semantic-interposition -floop-parallelize-all -ftree-parallelize-loops=4"
CFLAGS="-O2 -fno-semantic-interposition -floop-parallelize-all -ftree-parallelize-loops=4 -g3 $CFLAGS"
while test -n "$*"; do
case $1 in
@ -494,6 +495,7 @@ while test -n "$*"; do
--with-all) add_all_features;;
--without-*) delete_feature `echo $1 | sed -e 's,--without-,,'`;;
--with-*) add_feature `echo $1 | sed -e 's,--with-,,'`;;
--enable-*|--disable-*) emacs_build_options="$emacs_build_options $1";;
--nativecomp-aot) export NATIVE_FULL_AOT=1;;
--slim) add_all_features
delete_feature cairo # We delete features here, so that user can repopulate them

30
patches/emacs/0001-Stop-using-legacy-ffat-lto-objects-option-in-LTO-bui.patch

@ -0,0 +1,30 @@
From c7513e8220563d65cb40d5313196277875c0fa26 Mon Sep 17 00:00:00 2001
From: Kien Nguyen <kien.n.quang@gmail.com>
Date: Fri, 23 Aug 2024 04:51:47 -0700
Subject: [PATCH] Stop using legacy -ffat-lto-objects option in LTO builds
---
configure.ac | 7 -------
1 file changed, 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index ac5660bbd..1323844f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1974,13 +1974,6 @@ AC_DEFUN
# command, so plugin name is appended to ARFLAGS.
ARFLAGS="cru --plugin $GOLD_PLUGIN"
RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
- else
- dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes
- dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
- dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
- dnl dump core on Fedora 20, so play it safe for now.
- gl_COMPILER_OPTION_IF([-ffat-lto-objects],
- [CFLAGS="$CFLAGS -ffat-lto-objects"])
fi
fi
fi)
--
2.46.0.vfs.0.0
Loading…
Cancel
Save