diff mbox

[5/9] Always use -O2 for compiling fork.c

Message ID 1446316381-5070-5-git-send-email-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Oct. 31, 2015, 6:32 p.m. UTC
When compiling in thumb mode for arm with -Os gcc gives up since it can
not find registers to spill. So we use -O2 option for compiling fork.c
It may be addressable in gcc.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
index 0ea0b29..0767e9c 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
@@ -21,3 +21,9 @@  ASFLAGS-pt-vfork.S = -marm
 CFLAGS-OMIT-pt-vfork.S = -mthumb
 ASFLAGS-vfork.S = -marm
 CFLAGS-OMIT-vfork.S = -mthumb
+
+# For arm fork.c does not compile with -Os when compiling
+# in thumb1 mode
+ifeq ($(COMPILE_IN_THUMB_MODE),y)
+CFLAGS-fork.c = -O2
+endif