blob: ad9b246ab5f483be14cd860c9316eccc752349fb [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 883debc22e30a947fe5858cc07ee5aebd3d07a2e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 16 Aug 2015 20:59:56 -0700
4Subject: [PATCH 5/7] Always use -O2 for compiling fork.c
5
6When compiling in thumb mode for arm with -Os gcc gives up since it can
7not find registers to spill. So we use -O2 option for compiling fork.c
8It may be addressable in gcc.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13
14 libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 6 ++++++
15 1 file changed, 6 insertions(+)
16
17diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
18index 0ea0b29..0767e9c 100644
19--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
20+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
21@@ -21,3 +21,9 @@ ASFLAGS-pt-vfork.S = -marm
22 CFLAGS-OMIT-pt-vfork.S = -mthumb
23 ASFLAGS-vfork.S = -marm
24 CFLAGS-OMIT-vfork.S = -mthumb
25+
26+# For arm fork.c does not compile with -Os when compiling
27+# in thumb1 mode
28+ifeq ($(COMPILE_IN_THUMB_MODE),y)
29+CFLAGS-fork.c = -O2
30+endif
31--
322.1.4
33