This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] avoid compiling some dead code
- From: "Jan Beulich" <jbeulich at novell dot com>
- To: <binutils at sourceware dot org>
- Date: Tue, 25 Sep 2007 16:42:59 +0100
- Subject: [PATCH] avoid compiling some dead code
(Sorry for the resend, first one got sent out without proper changelog.)
Suppress compilation of the .cfi_* directive handling code if the
target isn't using them.
Built and tested on x86_64-unknown-linux-gnu and ia64-unknown-linux-gnu.
gas/
2007-09-25 Jan Beulich <jbeulich@novell.com>
* dw2gencfi.c: Conditionalize whole body upon TARGET_USE_CFIPOP.
(cfi_finish): Add second empty instance.
--- 2007-09-25/gas/dw2gencfi.c 2007-08-22 11:01:50.000000000 +0200
+++ 2007-09-25/gas/dw2gencfi.c 2007-09-24 17:07:15.000000000 +0200
@@ -23,6 +23,7 @@
#include "dw2gencfi.h"
#include "subsegs.h"
+#ifdef TARGET_USE_CFIPOP
/* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
of the CIE. Default to 1 if not otherwise specified. */
@@ -30,18 +31,6 @@
# define DWARF2_LINE_MIN_INSN_LENGTH 1
#endif
-/* If TARGET_USE_CFIPOP is defined, it is required that the target
- provide the following definitions. Otherwise provide them to
- allow compilation to continue. */
-#ifndef TARGET_USE_CFIPOP
-# ifndef DWARF2_DEFAULT_RETURN_COLUMN
-# define DWARF2_DEFAULT_RETURN_COLUMN 0
-# endif
-# ifndef DWARF2_CIE_DATA_ALIGNMENT
-# define DWARF2_CIE_DATA_ALIGNMENT 1
-# endif
-#endif
-
#ifndef EH_FRAME_ALIGNMENT
# define EH_FRAME_ALIGNMENT (bfd_get_arch_size (stdoutput) == 64 ? 3 : 2)
#endif
@@ -1346,3 +1335,10 @@ cfi_finish (void)
flag_traditional_format = save_flag_traditional_format;
}
+
+#else /* TARGET_USE_CFIPOP */
+void
+cfi_finish (void)
+{
+}
+#endif /* TARGET_USE_CFIPOP */