This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MIPS] Handle CFLAGS with -funwind-tables.


Hi,

when doing a MIPS build with CFLAGS -g -O2 -funwind-tables, we run into the
following errors:
...
/tmp/ccNETuvb.s: Assembler messages:
ccNETuvb.s: Error: open CFI at the end of file; missing .cfi_endproc directive
ccNETuvb.s: Error: open CFI at the end of file; missing .cfi_endproc directive
make[2]: *** [default/csu/crti.o] Error 1
default/csu/crtn.S: Assembler messages:
crtn.S:33: Error: CFI instruction used without previous .cfi_startproc
crtn.S:34: Error: CFI instruction used without previous .cfi_startproc
crtn.S:35: Error: .cfi_endproc without corresponding .cfi_startproc
crtn.S:56: Error: CFI instruction used without previous .cfi_startproc
crtn.S:57: Error: CFI instruction used without previous .cfi_startproc
crtn.S:58: Error: .cfi_endproc without corresponding .cfi_startproc
make[2]: *** [default/csu/crtn.o] Error 1
...

With attached patch, we manage to complete the build.

The fix is also present in glibc-ports/sysdeps/arm/eabi/Makefile.

I tested the patch on MIPS qemu (mips-linux-gnu) with host i686-pc-linux-gnu.

Thanks,
- Tom
2012-01-04  Tom de Vries  <tom@codesourcery.com>

	* sysdeps/mips/Makefile: Compile initfini.c, pt-initfini.c with
	-fno-unwind-tables.

diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 9d01522..ff9400d 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -11,4 +11,12 @@ ifeq ($(subdir),rt)
 librt-sysdep_routines += rt-sysdep
 endif
 
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -fno-unwind-tables
+endif
+
 ASFLAGS-.os += $(pic-ccflag)
+
+ifeq ($(subdir),nptl)
+CFLAGS-pt-initfini.s += -fno-unwind-tables
+endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]